You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This example attempts to replicate one of the results from the AlphaEvolve paper (Section B.12): packing circles inside a unit square to maximize the sum of their radii.
3
+
This example attempts to replicate one of the specific results from the AlphaEvolve paper (Section B.12): packing 26 circles inside a unit square to maximize the sum of their radii.
4
4
5
5
## Problem Description
6
6
7
-
Given a positive integer n, the problem is to pack n disjoint circles inside a unit square so as to maximize the sum of their radii. The circles must:
7
+
The problem is to pack 26 disjoint circles inside a unit square so as to maximize the sum of their radii. The circles must:
8
8
- Lie entirely within the unit square [0,1] × [0,1]
9
9
- Not overlap with each other
10
10
11
11
This is a well-studied problem in computational geometry with applications in various fields including material science, facility location, and computer graphics.
12
12
13
-
## AlphaEvolve Results
13
+
## AlphaEvolve Result
14
14
15
-
According to the paper, AlphaEvolve found new constructions improving the state of the art:
16
-
- For n = 26, improved from 2.634 to 2.635
17
-
- For n = 32, improved from 2.936 to 2.937
15
+
According to the paper, AlphaEvolve improved the state of the art for n=26 from 2.634 to 2.635.
-`sum_radii`: The best sum of radii achieved across all trials
27
+
-`avg_sum_radii`: Average sum of radii across successful trials
28
+
-`target_ratio`: Ratio of achieved sum to target (2.635)
29
+
-`reliability`: Fraction of trials that produced valid solutions
30
+
-`avg_time`: Average execution time
31
+
-`combined_score`: A weighted combination of the above metrics (main fitness metric)
35
32
36
33
## Expected Results
37
34
38
-
A successful run should find packing arrangements with sums approaching or exceeding the values reported in the AlphaEvolve paper:
39
-
- n=26: 2.635
40
-
- n=32: 2.937
35
+
A successful run should find a packing arrangement with sum of radii approaching or exceeding the value reported in the AlphaEvolve paper: 2.635 for n=26.
36
+
37
+
## Visualization
38
+
39
+
The initial program includes a visualization function that you can use to see the packing arrangement:
Copy file name to clipboardExpand all lines: examples/circle_packing/config.yaml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ llm:
21
21
22
22
# Prompt configuration
23
23
prompt:
24
-
system_message: "You are an expert programmer specializing in optimization algorithms and computational geometry. Your task is to improve a circle packing algorithm to maximize the sum of radii when packing n circles in a unit square without overlaps. The AlphaEvolve paper achieved a sum of 2.635 for n=26 and 2.937 for n=32. Focus on finding better optimization strategies to reach or exceed these values."
24
+
system_message: "You are an expert programmer specializing in optimization algorithms and computational geometry. Your task is to improve a circle packing algorithm to maximize the sum of radii when packing 26 circles in a unit square without overlaps. The AlphaEvolve paper achieved a sum of 2.635 for n=26, which is the target value to reach or exceed. Focus on finding better optimization strategies, leveraging geometric insights about optimal packing arrangements, and developing more effective search techniques."
0 commit comments