Skip to content

Benchmarks

Reusable benchmark suite: Problem instances with known best values.

Use get(name) / all_benchmarks(); see docs/benchmarks.md. Pass an rng (or seed) to a heuristic for reproducible runs. Call the factories (knapsack, tsp, continuous) for custom instances.

gap(benchmark, value)

Non-negative gap to the known best: |value - best| / max(|best|, 1).

Relative for large optima, absolute for optima near 0 (e.g. Sphere).