Example: Add graph coloring example with DIMACS benchmarks#396
Open
eilamt wants to merge 11 commits intoalgorithmicsuperintelligence:mainfrom
Open
Example: Add graph coloring example with DIMACS benchmarks#396eilamt wants to merge 11 commits intoalgorithmicsuperintelligence:mainfrom
eilamt wants to merge 11 commits intoalgorithmicsuperintelligence:mainfrom
Conversation
New OpenEvolve example demonstrating evolution of graph coloring algorithms: - Simple greedy coloring as initial program with EVOLVE-BLOCK - Evaluator testing on Petersen, K5, bipartite, cycle, and random graphs - Visualization support with networkx/matplotlib - Custom graph file loading with sample graphs - 26 unit tests covering coloring validity and file loading Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ring - Implement 3-stage cascade evaluation: - Stage 1: Validity gate (quick pass/fail on 3 small graphs) - Stage 2: Quick scoring on small graphs with chromatic numbers - Stage 3: Full evaluation on all 6 test graphs - Enforce combined_score = 0 for any invalid coloring - Add TestEvaluatorFailureCases class with 10 mock program tests: - Invalid coloring, partial coloring, suboptimal coloring - Missing functions, syntax errors, runtime errors - Exception handling for all stages - Update config.yaml with cascade threshold documentation - Total test count: 50 tests (40 existing + 10 new failure cases) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add Crown, Mycielski, Chvátal graphs that trip up greedy/DSatur - Add DSatur-adversarial random graphs (seeds 19, 70) - Archive Gemini run (score 0.9667) and Claude manual evolution (score 1.0) - Switch config from Gemini to Claude API Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implement quadratic time budget formula that scales with graph complexity: - budget = BASE_TIME_BUDGET + COEFF_TIME × (n² + m) - BASE_TIME_BUDGET = 1ms, COEFF_TIME = 8.8e-7 seconds - TIME_PENALTY_WEIGHT = 0.3 (30% of combined score) - Time score decays as 1/overage_ratio with floor at 0.1 This penalizes brute-force multi-start algorithms while allowing efficient single-pass algorithms to pass comfortably. Add 12 unit tests for time budget functionality covering: - Formula correctness and quadratic scaling - Time score calculation and decay behavior - Integration with evaluate() function Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add DIMACS .col file parser with 1-indexed to 0-indexed conversion - Create benchmarks directory with 22 full and 5 small benchmark graphs - Add chromatic numbers registry JSON for known optimal values - Update evaluator to use DIMACS benchmarks when available - Add fallback to built-in graphs if benchmarks not present - Handle unknown chromatic numbers with max_degree/2 heuristic - Add 15 unit tests for DIMACS functionality - Archive previous Claude OpenEvolve run results Benchmark includes challenging graphs: queen (n=5-13), myciel, le450_15c, mulsol, zeroin, inithx - current DSatur scores 0.916. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add archived experiment run_20260202_claude_openevolve_dimacs with: - DSatur initial program, evolved best program, config, and run notes - Key finding: post-processing is dead code (0 recolorings) - Improvement came from starting with highest-degree vertex - Add analyze_postprocessing.py script for analyzing recoloring effectiveness Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
OpenEvolve successfully evolved simple greedy to DSatur algorithm: - Score improved from 0.8934 to 0.9384 (+5%) - Optimal colorings: 10 → 15 out of 22 DIMACS graphs - Total colors: 389 → 362 (-27) - DSatur discovered at iteration 2, no improvement in 107 more iterations Config updated with exploration-focused parameters (temp 0.9, 70% exploration). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
A complete graph coloring example demonstrating OpenEvolve's ability to evolve sophisticated algorithms from simple starting points. Features: - 3-stage cascade evaluation with DIMACS benchmark graphs - Simple greedy initial algorithm that evolves into DSatur - Comprehensive test suite with 22 benchmark graphs - Benchmark runner for testing algorithms (run_benchmarks.py) Results from 100 iterations: - Initial greedy: 389 colors, 10/22 optimal - Evolved DSatur: 362 colors, 15/22 optimal Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace environment variable references with placeholder strings to avoid CI test failures - Add Prerequisites section to README explaining API key setup Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Author
|
Fixed API Key issue (failed test). Added use of placeholder strings like YOUR_API_KEY instead of ${ENV_VAR} |
1 similar comment
Author
|
Fixed API Key issue (failed test). Added use of placeholder strings like YOUR_API_KEY instead of ${ENV_VAR} |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A complete graph coloring example demonstrating OpenEvolve's ability to evolve sophisticated algorithms from simple starting points.
run_benchmarks.py) for testing algorithmsResults
After 100 iterations, OpenEvolve evolved a DSatur algorithm:
The evolved algorithm uses 27 fewer colors and achieves optimal coloring on 5 additional graphs.