Skip to content

v0.2.0

Choose a tag to compare

@maxencefaldor maxencefaldor released this 19 Aug 13:24
· 20 commits to main since this release

Verified against official BBOB, and rebuilt around how COCO defines a problem.

This release changes both the API and the numbers. Several functions were
wrong, so no result from 0.1.0 is comparable to one from 0.2.0.

Fixed — alignment with official BBOB

Every function and noise model is now checked numerically against the official
2009 implementation on identical instances (tests/test_alignment.py), which
found four real defects in the functions:

  • bueche_rastrigin skewed the wrong half of the coordinates. The paper's
    1-based "i odd" is 0-based even, as both official implementations have it.
  • step_ellipsoidal carried an extra factor of 100 on the ellipsoid sum,
    so values ran ~98x high and the plateau branch almost never selected.
  • gallagher_101_me / gallagher_21_hi derived their peak layout from
    fold_in(key, q[0, 0]), which int-casts the float; every rotated instance
    shared one frozen layout. Layouts now come from the instance's own key.
  • katsuura truncated its inner sum at 30 terms instead of 32.

and three in the noise models, against the noisy-functions paper:

  • Cauchy noise divided by |Uniform(0, 1)| rather than |N(0, 1)|, giving
    ~30% heavier tails and the wrong central law.
  • Uniform noise used an epsilon of 1e-8 where the paper specifies 1e-99,
    distorting the ratio by up to 2x in the 1e-8 target-precision band.
  • Uniform noise dropped the paper's (0.49 + 1/D) dimension term from
    alpha, so its severity did not vary with the dimension.

Fixed — noise stabilization was optional, and off

In official BBOB the +1.01 * 1e-8 offset and below-tolerance passthrough are
inside fGauss, fUniform and fCauchy, applied unconditionally. bbobax
had them behind a flag defaulting to False, so every noisy model was
missing them unless you knew to ask. They are now part of the three official
models and cannot be switched off.

Fixed — the noise epsilons were zero in float32

The uniform and Cauchy models divide by a quantity that can be zero, and the
paper guards each with a literal (1e-99, 1e-199). Both round to exactly
0.0 in float32 — JAX's default — so neither guarded anything. The guard is
now the smallest positive normal of the working dtype.

Changed — a problem is an object

  • BBOB(fn_id=..., min_num_dims=..., max_num_dims=...) becomes one class per
    function: Sphere(num_dims=10). A problem is one function at one
    dimension
    , as COCO enumerates them, and bbobax.DIMENSIONS records COCO's
    own set (2, 3, 5, 10, 20, 40).
  • Instance generation is per function. params.x_opt is always the true
    argmin: linear_slope is minimized on a corner of the box, schwefel and
    lunacek are built around fixed constants, bueche_rastrigin forces its
    skewed coordinates non-negative.
  • BBOBState is gone. All 24 functions are memoryless:
    evaluate(key, x, params) -> BBOBEval.
  • lax.switch is gone, for functions and for noise models: under vmap
    with a varying branch it evaluated every branch for every solution.
  • A noise model is an object too, held by a problem rather than switched on:
    Sphere(noise_model=Gaussian()).
  • The PRNG key comes first in every signature, as jax.random has it.

Added — the suites

  • bbob_suite() — the 24 standard noiseless functions.
  • bbob_noisy_suite() — f101–f130. Not "the 24 plus noise": boundary
    handling is uniform at factor 100, each problem is pinned to one of the
    paper's two severities, and two of the bases are reparameterized (f116–f118
    use conditioning 1e4 where f10 has 1e6; f125–f127 scale by 1 where f19 uses
    10) — all read out of the vendored reference rather than assumed.
  • ManyAffine — MA-BBOB, all 24 blended under a sparse weight vector in
    log space, turning the suite from 24 atoms into a continuous space of
    problems. Measured at 0.92x the cost of the 24 run separately at D=10.

A suite is a plain dict[str, BBOBProblem], so composing your own is a dict
comprehension.

Added — Quality-Diversity, rebuilt

Quality-Diversity is composed, not inherited: QDProblem(problem, descriptor)
pairs any function with any descriptor. Six descriptor families now span the
phenomena of real genotype-to-behavior maps, built from the same
transformations the functions themselves are built from:

RandomProjection (smooth baseline), IrregularProjection (non-uniform
sensitivity), QuantizedProjection (discontinuity), FourierProjection
(arbitrary sensitivity, Lipschitz constant as a dial), SubsetProjection
(redundancy), AlignedProjection (fitness–behavior conflict).

Descriptor space is [-1, 1]^k by construction, the way COCO's search
space is [-5, 5]^D — so problem.descriptor_range is exact, and the archive
bounds every QD algorithm needs no longer have to be guessed. Whether an
algorithm is told the bounds is the experiment's choice, which is what lets
bounds-free methods be compared honestly against bounds-given ones.

And for Sphere under a linear descriptor, sphere_descriptor_optimum gives
the exact best fitness achievable at any descriptor value, in closed form —
the per-cell ground truth QD-score normalization has always lacked.

Added — the notebooks

Six tutorials, executed in CI so they cannot drift: the contract, the suites,
optimizing one problem, benchmarking across the suite with COCO's ECDF over
its own 51 target precisions, meta-learning a component over the suite, and
Quality-Diversity.

Removed

  • The Additive noise model. It applied noise at an absolute scale to
    functions whose values span eight orders of magnitude, so its parameter meant
    something different on every one of the 24.
  • types.py — each module owns its own types.

Tooling

ty replaces mypy. CI runs ruff, ty, 388 tests on Python 3.11–3.14, and
executes every notebook.