Overview
Frontier-CS is a benchmark from Meta Research testing algorithmic problem-solving capabilities. Problems cover:- Graph algorithms (shortest paths, flows, matchings)
- Dynamic programming
- Greedy algorithms
- Data structures (trees, heaps, segment trees)
- Computational geometry
- Number theory
- Combinatorics
Note: Unlike Python-based benchmarks, Frontier-CS evolves C++ code. The evaluator compiles and tests solutions against hidden test cases.
Setup
Frontier-CS requires Docker for the judge server:1
Clone Frontier-CS
2
Start Judge Server
http://localhost:80813
Install Dependencies
4
Set API Key
Initial Program
The seed program is a minimal C++ skeleton:Evaluator
The evaluator submits C++ code to the Frontier-CS judge:Running Single Problem
Specify which problem to solve with theFRONTIER_CS_PROBLEM environment variable:
Running All Problems in Parallel
The benchmark includes a script to evolve solutions for all 172 problems:Evaluating Best Programs
After evolution, re-evaluate the best solutions on test sets:Analyzing Results
Combine training and testing scores into CSV:Environment Variables
Load Balancing: If running many problems in parallel, you can start multiple judge servers and specify all URLs:
Configuration
Theconfig.yaml specifies C++ as the language:
Tips for Algorithm Benchmarks
Start Small
Test on a few problems first. Some are significantly harder than others.
Use Load Balancing
Run multiple judge servers if evolving many problems in parallel.
Check Logs
Judge logs show compilation errors and runtime failures.
Unbounded Scores
Solutions can score >100 if they beat the reference implementation.
Common Issues
Judge server not responding
Judge server not responding
Verify Docker is running:Restart if needed:
Compilation errors
Compilation errors
Check the judge logs for detailed error messages:The evaluator returns logs in the result dictionary.
Timeouts
Timeouts
Solutions must complete within the judge’s time limit. Optimize algorithmic complexity.
Missing Frontier-CS
Missing Frontier-CS
Ensure you cloned the repository:
Supported Search Algorithms
adaevolve(recommended)evoxopenevolvegepashinkaevolve
--extra external installation:
Next Steps
Math Examples
Explore math benchmarks
Systems Examples
See systems optimization
Create Custom
Build your own benchmark