Cahn-Hilliard Solver
Write a C++ solver for a forced Cahn-Hilliard equation on an eccentric annulus from black-box data oracles, to 1e-6.
Results
Each square represents one run. Score is the percentage of runs that pass: 0, 25, 50, 75, or 100 for four runs.
| # | Model | Rollouts | Pass@1 | Score | Time |
|---|---|---|---|---|---|
| 1 | Claude Opus 5.5 max | 4/4 | 7.5h | ||
| 2 | GPT-6.1 Sol max | 4/4 | 10.6h | ||
| 3 | Claude Sonnet 5.5 max | 4/4 | 10.8h | ||
| 4 | GPT-6 Astra xhigh | 3/4 | 11.8h | ||
| 5 | GPT-5.6 Sol max | 2/4 | 6.4h | ||
| 6 | Qwen3.8 Max xhigh | 1/4 | 11.7h | ||
| 7 | Muse Spark 1.3 max | 1/4 | 11.9h | ||
| 8 | Kimi K3 max | 1/4 | 11.9h | ||
| 9 | Gemini 3.8 Flash high | 0/4 | 10.4h | ||
| 10 | GLM 5.3 Flash max | 0/4 | 12.0h | ||
| 11 | Grok 4.7 xhigh | 0/4 | 8.0h |
Background
The Cahn-Hilliard equation describes how a mixture separates and coarsens. Here it is forced with concentration-dependent mobility and boundary fluxes, posed on an eccentric annulus (the region between two non-concentric circles) where the gap can shrink to 1e-4. The equation is fourth order, nonlinear and stiff, and the solution must match the exact answer to relative error 1e-6 anywhere in space and time. All instance data come from black-box oracle functions that charge time per call and per row, under strict per-instance budgets on four cores.
Task
The agent delivers C++17 sources defining a C function that a fresh process calls once per instance with up to 1,048,576 space-time points. The sources may use only the standard library, OpenMP, Eigen and the oracle library. The stated family bounds the geometry, parameters and sharpness. The solver must compute its answer from oracle data: reading instance data any other way, hard-coding values or fitting a closed form voids the result. Each instance gets 240 seconds of wall time including all oracle calls, 900 seconds of CPU time and 6 GiB, scaled by machine speed. The oracle serves at most four calls at once.
Workspace
The offline sandbox (4 CPUs, 8 GB, 12 hours) holds g++ 12.2 with OpenMP and Eigen 3.4, three closed-form example instances and a corpus of 32 instances drawn from the whole family. Only six corpus instances come with the exact solution; the rest, including every near-contact one, come with evaluation points and tolerances only. Tools build and run instances as graded. The graded instances are held out.
Verification
The sources are built with the fixed command in a separate environment. Ten hidden instances from a private seed cover both geometries, the smallest gaps, the stiffest parameter corners and one call at the maximum number of points. Each runs once. The error is the L2 norm of the difference from the exact solution, divided by the L2 spread about its mean. The solver passes when the worst error is at most 1e-6. A build failure, exceeded limit or non-finite output fails the instance.
Environment
- Toolchain
- g++ 12.2 with OpenMP, Eigen 3.4, CMake 3.25, gdb 13.1, Python 3.12 (standard library)
- Compute
- 4 CPUs · 8 GB RAM
- Network
- Offline
- Time limit
- 12 hours
References
- Cahn and Hilliard: Free Energy of a Nonuniform System. I. Interfacial Free Energy (J. Chem. Phys. 1958): The paper introducing the phase separation model the task's equation extends.
- Eigen: Version 3.4 is the only third-party library the solver may use besides OpenMP and the oracle library.