Skip to content

Commit a232be3

Browse files
committed
second phase config
1 parent 2042959 commit a232be3

File tree

4 files changed

+62
-4
lines changed

4 files changed

+62
-4
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ ENV/
3434

3535
# Output files
3636
examples/*/output/
37-
openevolve_output/
37+
openevolve_output*/
3838
*.log
3939

4040
# Test cache

examples/circle_packing/evaluator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def evaluate(program_path):
185185

186186
# Use subprocess to run with timeout
187187
centers, radii, reported_sum = run_with_timeout(
188-
program_path, timeout_seconds=15 # Single timeout
188+
program_path, timeout_seconds=60 # Single timeout
189189
)
190190

191191
end_time = time.time()
@@ -256,7 +256,7 @@ def evaluate_stage1(program_path):
256256
try:
257257
# Use the simplified subprocess approach
258258
try:
259-
centers, radii, sum_radii = run_with_timeout(program_path, timeout_seconds=10)
259+
centers, radii, sum_radii = run_with_timeout(program_path, timeout_seconds=60)
260260

261261
# Ensure centers and radii are numpy arrays
262262
if not isinstance(centers, np.ndarray):

examples/circle_packing/initial_program.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,4 @@ def visualize(centers, radii):
130130
# AlphaEvolve improved this to 2.635
131131

132132
# Uncomment to visualize:
133-
# visualize(centers, radii)
133+
visualize(centers, radii)
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Configuration for breaking through the circle packing plateau
2+
max_iterations: 100
3+
checkpoint_interval: 10
4+
log_level: "INFO"
5+
6+
# LLM configuration
7+
llm:
8+
primary_model: "google/gemini-2.0-flash-001"
9+
# primary_model: "llama3.1-8b"
10+
primary_model_weight: 0.8
11+
secondary_model: "anthropic/claude-3.7-sonnet"
12+
# secondary_model: "llama-4-scout-17b-16e-instruct"
13+
secondary_model_weight: 0.2
14+
api_base: "https://openrouter.ai/api/v1"
15+
# api_base: "https://api.cerebras.ai/v1"
16+
temperature: 0.7
17+
top_p: 0.95
18+
max_tokens: 8192
19+
timeout: 600
20+
21+
# Prompt configuration
22+
prompt:
23+
system_message: |
24+
You are an expert mathematician specializing in circle packing problems and computational geometry. We're trying to reach the AlphaEvolve target of 2.635 for the sum of radii when packing 26 circles in a unit square. The current implementation has plateaued at 2.377, so we need significant improvements.
25+
26+
Key insights to explore:
27+
1. The optimal arrangement likely involves variable-sized circles
28+
2. A pure hexagonal arrangement may not be optimal due to edge effects
29+
3. The densest known circle packings often use a hybrid approach
30+
4. The optimization routine is critically important - simple physics-based models with carefully tuned parameters
31+
5. Consider strategic placement of circles at square corners and edges
32+
6. Adjusting the pattern to place larger circles at the center and smaller at the edges
33+
7. The math literature suggests special arrangements for specific values of n
34+
35+
Focus on breaking through the plateau by trying fundamentally different approaches - don't just tweak parameters.
36+
num_top_programs: 4
37+
use_template_stochasticity: true
38+
39+
# Database configuration
40+
database:
41+
population_size: 70 # Larger population for more diversity
42+
archive_size: 30
43+
num_islands: 5
44+
elite_selection_ratio: 0.3
45+
exploitation_ratio: 0.6 # Slightly lower to encourage exploration
46+
47+
# Evaluator configuration
48+
evaluator:
49+
timeout: 90 # Extended timeout to allow for more complex optimization
50+
cascade_evaluation: true
51+
cascade_thresholds: [0.5, 0.8]
52+
parallel_evaluations: 4
53+
use_llm_feedback: false
54+
55+
# Evolution settings
56+
diff_based_evolution: false
57+
allow_full_rewrites: true # Definitely allow full rewrites
58+
max_code_length: 100000

0 commit comments

Comments
 (0)