fcmaes 2.0.3__tar.gz → 2.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fcmaes-2.2.0/AGENTS.md +54 -0
- fcmaes-2.2.0/CHANGELOG.md +550 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/CMakeLists.txt +3 -0
- fcmaes-2.2.0/PKG-INFO +119 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/README.adoc +143 -27
- fcmaes-2.2.0/README.md +77 -0
- fcmaes-2.2.0/RELEASING.md +79 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/acmaesoptimizer.cpp +72 -13
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/bindings/acma_bindings.cpp +32 -19
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/bindings/de_bindings.cpp +17 -13
- fcmaes-2.2.0/_fcmaescpp/bindings/jso_bindings.cpp +82 -0
- fcmaes-2.2.0/_fcmaescpp/bindings/jso_bindings.hpp +9 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/bindings/module.cpp +4 -0
- fcmaes-2.2.0/_fcmaescpp/bindings/pareto_bindings.cpp +64 -0
- fcmaes-2.2.0/_fcmaescpp/bindings/pareto_bindings.hpp +5 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/crfmnes.cpp +4 -2
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/daoptimizer.cpp +20 -10
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/deoptimizer.cpp +4 -2
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/acmaesoptimizer.hpp +3 -2
- fcmaes-2.2.0/_fcmaescpp/include/callback_context.hpp +18 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/evaluator.h +37 -15
- fcmaes-2.2.0/_fcmaescpp/include/jsooptimizer.hpp +78 -0
- fcmaes-2.2.0/_fcmaescpp/include/paretoarchive.hpp +84 -0
- fcmaes-2.2.0/_fcmaescpp/include/paretofront2d.h +249 -0
- fcmaes-2.2.0/_fcmaescpp/jsooptimizer.cpp +275 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/modeoptimizer.cpp +71 -63
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/pgpe.cpp +26 -15
- {fcmaes-2.0.3 → fcmaes-2.2.0}/ai-context.md +212 -32
- {fcmaes-2.0.3 → fcmaes-2.2.0}/fcmaes/__init__.py +5 -2
- {fcmaes-2.0.3 → fcmaes-2.2.0}/fcmaes/_fcmaes_ext.pyi +31 -2
- {fcmaes-2.0.3 → fcmaes-2.2.0}/fcmaes/cmaes.py +72 -6
- {fcmaes-2.0.3 → fcmaes-2.2.0}/fcmaes/cmaescpp.py +26 -3
- fcmaes-2.2.0/fcmaes/jso.py +331 -0
- fcmaes-2.2.0/fcmaes/jsocpp.py +74 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/fcmaes/mode.py +46 -37
- {fcmaes-2.0.3 → fcmaes-2.2.0}/fcmaes/moretry.py +27 -13
- {fcmaes-2.0.3 → fcmaes-2.2.0}/fcmaes/optimizer.py +106 -20
- fcmaes-2.2.0/fcmaes/pareto.py +111 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/pyproject.toml +9 -5
- fcmaes-2.0.3/PKG-INFO +0 -51
- fcmaes-2.0.3/README.md +0 -13
- {fcmaes-2.0.3 → fcmaes-2.2.0}/.gitignore +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/LICENSE +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/CMakeLists.txt +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/bindings/acma_bindings.hpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/bindings/bite_bindings.cpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/bindings/bite_bindings.hpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/bindings/common.hpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/bindings/crfmnes_bindings.cpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/bindings/crfmnes_bindings.hpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/bindings/da_bindings.cpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/bindings/da_bindings.hpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/bindings/de_bindings.hpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/bindings/gil_utils.hpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/bindings/gtop_bindings.cpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/bindings/gtop_bindings.hpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/bindings/mode_bindings.cpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/bindings/mode_bindings.hpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/bindings/ndarray_utils.hpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/bindings/pgpe_bindings.cpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/bindings/pgpe_bindings.hpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/biteoptimizer.cpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/gtop.cpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/LBFGS.h +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/LBFGSB.h +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/LBFGSpp/BFGSMat.h +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/LBFGSpp/BKLDLT.h +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/LBFGSpp/Cauchy.h +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/LBFGSpp/LineSearchBacktracking.h +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/LBFGSpp/LineSearchBracketing.h +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/LBFGSpp/LineSearchMoreThuente.h +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/LBFGSpp/LineSearchNocedalWright.h +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/LBFGSpp/Param.h +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/LBFGSpp/SubspaceMin.h +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/biteaux.h +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/biteopt.h +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/biteopt_asktell.h +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/biteoptimizer.hpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/biteort.h +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/crfmnesoptimizer.hpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/daoptimizer.hpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/deopt.h +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/deoptimizer.hpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/gtop.hpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/modeoptimizer.hpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/nmsopt.h +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/pcg_extras.hpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/pcg_random.hpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/pcg_uint128.hpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/pgpeoptimizer.hpp +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/smaesopt.h +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/_fcmaescpp/include/spheropt.h +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/fcmaes/_native.py +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/fcmaes/advretry.py +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/fcmaes/astro.py +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/fcmaes/bitecpp.py +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/fcmaes/crfmnes.py +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/fcmaes/crfmnescpp.py +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/fcmaes/dacpp.py +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/fcmaes/de.py +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/fcmaes/decpp.py +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/fcmaes/diversifier.py +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/fcmaes/evaluator.py +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/fcmaes/journal.py +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/fcmaes/mapelites.py +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/fcmaes/modecpp.py +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/fcmaes/multiretry.py +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/fcmaes/pgpecpp.py +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/fcmaes/pygmoretry.py +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/fcmaes/retry.py +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/fcmaes/test_cma.py +0 -0
- {fcmaes-2.0.3 → fcmaes-2.2.0}/fcmaes/testfun.py +0 -0
fcmaes-2.2.0/AGENTS.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
This repository is **fcmaes**, a Python 3.10+ library of gradient-free
|
|
4
|
+
optimizers with a C++17 backend exposed through nanobind:
|
|
5
|
+
|
|
6
|
+
- scalar: BiteOpt, DE, jSO, CMA-ES, CR-FM-NES, PGPE, Dual Annealing, and parallel
|
|
7
|
+
retry;
|
|
8
|
+
- multi-objective: MODE and the exact two-objective archive `fcmaes.pareto`;
|
|
9
|
+
- quality diversity: MAP-Elites and the Diversifier.
|
|
10
|
+
|
|
11
|
+
## Read first
|
|
12
|
+
|
|
13
|
+
- [`ai-context.md`](ai-context.md) shows how to choose an optimizer for a
|
|
14
|
+
user's problem, encode constraints and variables, set budgets and
|
|
15
|
+
parallelism, and validate and report results.
|
|
16
|
+
- When the solver is not chosen yet, start at the cross-repository entry
|
|
17
|
+
point,
|
|
18
|
+
[optimization-jobs `ai-context.md`](https://github.com/dietmarwo/optimization-jobs/blob/main/ai-context.md).
|
|
19
|
+
Linear and mixed-integer models go to LP-IP-craft, smooth NLPs with
|
|
20
|
+
derivatives to SQP-craft, and Rust objectives or durable agent jobs to
|
|
21
|
+
fcmaes-rust.
|
|
22
|
+
- This package has no job worker or MCP server. A Python objective runs in
|
|
23
|
+
process. A long run that must outlive the agent's session runs as a
|
|
24
|
+
detached script (see `ai-context.md`, "Related projects").
|
|
25
|
+
|
|
26
|
+
## Build and test
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
python -m venv .venv && . .venv/bin/activate
|
|
30
|
+
python -m pip install . --config-settings=cmake.define.FCMAES_FETCH_EIGEN=ON
|
|
31
|
+
python -m pip install pytest # the tests' only extra dependency
|
|
32
|
+
cd .. && python -m pytest fast-cma-es/tests -q # outside the checkout, so the installed extension is imported
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Native archive and jSO tests (CMake, GCC or Clang):
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
cmake -S tests/native -B build-native -DCMAKE_BUILD_TYPE=Release
|
|
39
|
+
cmake --build build-native --parallel && ctest --test-dir build-native --output-on-failure
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Documentation site: `python scripts/build_docs.py` (needs Asciidoctor 2.0.23+).
|
|
43
|
+
|
|
44
|
+
## Conventions
|
|
45
|
+
|
|
46
|
+
- All optimizers minimize. Constraints are feasible at `g(x) <= 0`.
|
|
47
|
+
- The public API is the Python wrappers (`fcmaes.bitecpp`, `decpp`,
|
|
48
|
+
`cmaescpp`, `modecpp`, ...). Do not call private extension symbols.
|
|
49
|
+
- Wheel CI runs `tests/` on every installed wheel, and the sdist job does the
|
|
50
|
+
same. An example that a test imports must also be listed in
|
|
51
|
+
`[tool.cibuildwheel] test-sources` in `pyproject.toml` and copied in the
|
|
52
|
+
sdist job of `.github/workflows/wheels.yml`.
|
|
53
|
+
- Record user-visible changes in `CHANGELOG.md` under `[Unreleased]`.
|
|
54
|
+
[`RELEASING.md`](RELEASING.md) describes releases. Do not tag or publish.
|
|
@@ -0,0 +1,550 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the `fcmaes` Python package are documented here, in
|
|
4
|
+
the format of [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
5
|
+
Versions follow the PyPI releases; since 2.0.0, pushing a tag `vX.Y.Z`
|
|
6
|
+
publishes that version to PyPI.
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [2.2.0] - 2026-11-20
|
|
11
|
+
|
|
12
|
+
Behaviour changes: PGPE (`pgpecpp`, `PGPE_C`, `Pgpe_cpp` and the
|
|
13
|
+
Diversifier's `'PGPE'` solver) gives different results than 2.1.0 with
|
|
14
|
+
`normalize=True` and bounds other than `[-1, 1]`, and returns the best
|
|
15
|
+
evaluated point and its objective value instead of an unevaluated point and
|
|
16
|
+
a rank value. Seeded C++ runs after other runs in the same process now
|
|
17
|
+
reproduce the first run in a fresh process. `de_cma`, `da_cma`, `bite_cma`
|
|
18
|
+
and `cma_bite` called directly through `Sequence.minimize` run their CMA-ES
|
|
19
|
+
stage again. The default `repair_z=False` keeps the CMA-ES update of 2.1.0;
|
|
20
|
+
`retry.minimize` and `advretry.minimize` results are unchanged except
|
|
21
|
+
through these fixes. See Fixed for the details.
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- Stock jSO for bounded continuous scalar optimization. `fcmaes.jso` and
|
|
26
|
+
`fcmaes.jsocpp` expose `minimize` and synchronous `Jso` ask/tell with a
|
|
27
|
+
hard evaluation cap and optional process-parallel objective evaluation.
|
|
28
|
+
`Jso_python` and `Jso_cpp` support retry, and `optimizer.jso_cma` starts
|
|
29
|
+
CMA-ES from the native jSO incumbent with a nominal 40/60 budget split.
|
|
30
|
+
- Links to the eight CRN/CFD simulator optimization lessons, distinguishing their native Rust/command execution from this package's in-process Python API.
|
|
31
|
+
- [Prompt-driven optimization tutorials](https://github.com/dietmarwo/optimization-jobs/tree/main/tutorials/agentic) demonstrate the shared agent workflow with native Rust application workers. Python objectives continue to use this package in process; these tutorials do not add a worker to fast-cma-es.
|
|
32
|
+
- CMA-ES option `repair_z` (default `False`) for samples that the bound
|
|
33
|
+
repair moved onto the bounds. The mean follows their repaired (evaluated)
|
|
34
|
+
points either way. With `False`, the update of 2.1.0, the evolution paths
|
|
35
|
+
and the rank-mu / active covariance update use the random vector `z` of
|
|
36
|
+
the unrepaired sample; `True` recomputes `z` from the repaired point.
|
|
37
|
+
Available on `cmaescpp.minimize` (single-threaded and with `workers > 1,
|
|
38
|
+
delayed_update=False`), `cmaescpp.ACMA_C` and `cmaes.Cmaes` (ask and
|
|
39
|
+
`tell(ys)`), `optimizer.Cma_cpp`, `optimizer.Cma_python` and the sequences
|
|
40
|
+
`optimizer.de_cma`, `jso_cma`, `da_cma`, `bite_cma` and `cma_bite`, e.g.
|
|
41
|
+
`advretry.minimize(..., optimizer=de_cma(1500, repair_z=True))`.
|
|
42
|
+
`cmaes.minimize` (used by `Cma_python`), `tell(ys, xs)`, `tell_one` and the
|
|
43
|
+
delayed-update paths have always derived `z` from the evaluated points and
|
|
44
|
+
are not affected.
|
|
45
|
+
- **Default:** in 2,400 matched pairs on 12 application objectives (in
|
|
46
|
+
fcmaes-rust, at about 63,000 evaluations per run), `False` won more
|
|
47
|
+
often for standalone bounded CMA-ES (222 wins against 149, 13 ties), as
|
|
48
|
+
the second stage of DE→CMA (217 against 62) and jSO→CMA (205 against
|
|
49
|
+
75), at exactly equal work (166 against 49) and in coordinated DE→CMA
|
|
50
|
+
retry (74 against 43). At a quarter of that budget coordinated retry
|
|
51
|
+
had leaned toward `True` (72 against 58). On a 171-variable truss
|
|
52
|
+
jSO→CMA reached a median of 394.5 with `False` against 420.4 with
|
|
53
|
+
`True`. `True` was clearly better where samples keep being clipped and
|
|
54
|
+
the step size inflates (a 118-variable neural controller: median loss
|
|
55
|
+
0.137 against 1.13).
|
|
56
|
+
- **When to try `True`:** runs that stop early far from the optimum with
|
|
57
|
+
the step-size stop (status 3 or 5), optima on or outside the bounds, and
|
|
58
|
+
samples clipped throughout the run. On `sum(x)` and on a sphere with half
|
|
59
|
+
its optimum outside `[-1,1]^20` (popsize 16, 20,000 evaluations),
|
|
60
|
+
`cmaescpp.minimize` reaches -19.8..-20.0 (optimum -20) and 10.3..10.7
|
|
61
|
+
(optimum 10) with `True`, -14.2..-16.0 and 14.5..16.9 with `False`.
|
|
62
|
+
|
|
63
|
+
### Changed
|
|
64
|
+
|
|
65
|
+
- The jSO tutorial and `ai-context.md` state the result of the coordinated-retry
|
|
66
|
+
test in fcmaes-rust: with `advretry`, `jso_cma` was better than `de_cma` on
|
|
67
|
+
none of eight GTOP problems and significantly worse on Sagas and Messenger
|
|
68
|
+
full ([table](https://github.com/dietmarwo/fcmaes-rust/blob/main/docs/algorithm-portfolio.md#why-jso-is-in)).
|
|
69
|
+
- The READMEs and `ai-context.md` link the
|
|
70
|
+
[algorithm portfolio of fcmaes-rust](https://github.com/dietmarwo/fcmaes-rust/blob/main/docs/algorithm-portfolio.md), which records how the scalar
|
|
71
|
+
algorithms were selected and the measurements behind each decision.
|
|
72
|
+
- README: links the [overview of the 18 related repositories](https://github.com/dietmarwo/fcmaes-rust/blob/main/docs/repositories.md).
|
|
73
|
+
- The READMEs point to [experiment-craft](https://github.com/dietmarwo/experiment-craft),
|
|
74
|
+
which runs reproducible campaigns of the Rust job workers.
|
|
75
|
+
- The READMEs open with the fast-cma-es banner (`tutorials/img/fast-cma-es.png`)
|
|
76
|
+
instead of the animated logo; `README.md`, the PyPI description, links it by
|
|
77
|
+
absolute URL. The tutorials keep `logo.gif`.
|
|
78
|
+
|
|
79
|
+
### Fixed
|
|
80
|
+
|
|
81
|
+
- CMA-ES active covariance update: it rescales the worst samples by ratios
|
|
82
|
+
of their `z` norms and divided by zero when a sample was told at exactly
|
|
83
|
+
the mean (`z = 0`), e.g. a sample clipped onto a mean that lies on a
|
|
84
|
+
bound, whose `z` is derived from its point. In the C++ backend this put
|
|
85
|
+
NaN into the covariance matrix and the run stopped (status 2): on one
|
|
86
|
+
variable in `[0,1]` started at 0 (sigma 0.15, popsize 31), `ACMA_C` with
|
|
87
|
+
`repair_z=True` or with `tell(ys, xs)` (which now updates from the points,
|
|
88
|
+
see below) stopped after 31 evaluations, and
|
|
89
|
+
`cmaescpp.minimize` with `repair_z=True` on an optimum at the start bound
|
|
90
|
+
after 62 to 93. Now the negative part is skipped in such a generation
|
|
91
|
+
(zero or non-finite norm); otherwise results are unchanged. The Python
|
|
92
|
+
backend replaced a zero norm by 1e-30, which kept the matrix finite but
|
|
93
|
+
divided by zero (RuntimeWarning) when all these norms were zero; it now
|
|
94
|
+
skips the same way, which changes results only in that case.
|
|
95
|
+
- `cmaescpp.ACMA_C.tell(ys, xs)` right after an `ask()` updated from the
|
|
96
|
+
`z` of the asked samples instead of the supplied points `xs`.
|
|
97
|
+
- `optimizer.Cma_cpp` with `sdevs=None` passed NaN step sizes to CMA-ES,
|
|
98
|
+
which stopped after two generations (62 evaluations at popsize 31) with
|
|
99
|
+
the value of a failed evaluation (1.8e308). `Sequence.minimize` passes
|
|
100
|
+
`sdevs=None` unless the caller supplies step sizes, so a direct call such
|
|
101
|
+
as `de_cma(...).minimize(fun, bounds)` skipped the CMA-ES stage of
|
|
102
|
+
`de_cma`, `da_cma`, `bite_cma` and `cma_bite`. `Cma_cpp` uses 0.1, its
|
|
103
|
+
default for `sdevs`, in that case. `retry.minimize` and
|
|
104
|
+
`advretry.minimize` always pass step sizes; their results are unchanged.
|
|
105
|
+
`Sequence.minimize` raised `UnboundLocalError` when its first stage
|
|
106
|
+
returned an infinite or NaN value; it keeps the first stage's point and
|
|
107
|
+
does not let a NaN value replace a result.
|
|
108
|
+
- C++ optimizers: a run with a fixed seed could give a different result
|
|
109
|
+
depending on what ran before it in the same process. The normal samplers
|
|
110
|
+
shared one `std::normal_distribution` object per source file (a
|
|
111
|
+
namespace-scope `static` in `evaluator.h` and one in `daoptimizer.cpp`,
|
|
112
|
+
present since at least 2.0.0). That object caches the second value of each
|
|
113
|
+
generated pair, so after a run with an odd number of normal draws the next
|
|
114
|
+
run started with the cached value of the earlier run instead of a value
|
|
115
|
+
from its own seed. Ask/tell objects stepped alternately or in different
|
|
116
|
+
Python threads affected each other the same way (in threads also a data
|
|
117
|
+
race). Each optimizer instance now owns its normal distribution. Affected:
|
|
118
|
+
CMA-ES (`cmaescpp.minimize`, `ACMA_C`), DE with `x0` and `input_sigma`
|
|
119
|
+
(`decpp.minimize`, `DE_C`), CR-FM-NES (`crfmnescpp.minimize`,
|
|
120
|
+
`CRFMNES_C`), PGPE (`pgpecpp.minimize`, `PGPE_C`) and the optimizer
|
|
121
|
+
sequences built on them. Dual Annealing draws normal values in pairs, so
|
|
122
|
+
its single-threaded results were not affected; it gets its own
|
|
123
|
+
distribution too. BiteOpt and MODE do not use the shared object. The
|
|
124
|
+
first run in a fresh process gives the same results as before; a later
|
|
125
|
+
run with the same seed reproduces the first instead of depending on the
|
|
126
|
+
runs before it.
|
|
127
|
+
- PGPE result: `pgpecpp.minimize` (and `optimizer.Pgpe_cpp`) returned an `x`
|
|
128
|
+
that was never evaluated, usually uninitialized memory (e.g. values like
|
|
129
|
+
`4.7e-315` or `6.9e-310`), and with the default `use_ranking=True` a `fun`
|
|
130
|
+
that was a rank value (e.g. `-0.4375` for popsize 16), not an objective
|
|
131
|
+
value. `PGPE_C.result()` with `use_ranking=True` returned the same rank
|
|
132
|
+
value as `fun` and the best point of the first generation as `x`. Both now
|
|
133
|
+
return the best evaluated point (decoded, inside the bounds) and its
|
|
134
|
+
objective value, with and without ranking. The evaluated points and the
|
|
135
|
+
number of evaluations are unchanged; for the stop criterion see the
|
|
136
|
+
`stop_fitness` entry below. Present in 2.0.0 and 2.1.0.
|
|
137
|
+
- PGPE start point: ADAM, which updates the center of the search
|
|
138
|
+
distribution, started from the raw `x0` while the center is kept in
|
|
139
|
+
normalized coordinates (the bounds mapped to `[-1, 1]`). After the first
|
|
140
|
+
generation the center jumped from the normalized `x0` to the raw `x0`
|
|
141
|
+
read as a normalized point: with `x0 = 1` on `[-5, 5]` the center of the second
|
|
142
|
+
generation lay between 4.25 and 5.75 (samples clipped to 5) instead of
|
|
143
|
+
within 0.75 of 1, so the search lost its start point and could
|
|
144
|
+
stay on a bound. Affected: every run of `pgpecpp.minimize`, `PGPE_C`,
|
|
145
|
+
`optimizer.Pgpe_cpp` and the Diversifier's `'PGPE'` solver with
|
|
146
|
+
`normalize=True` (the default) and bounds other than `[-1, 1]`, including
|
|
147
|
+
the random start points of `retry` and the guesses of `advretry`. ADAM
|
|
148
|
+
starts from the normalized `x0`; results of such runs differ from 2.1.0.
|
|
149
|
+
Runs with `normalize=False`, without bounds or with bounds `[-1, 1]`
|
|
150
|
+
evaluate the same points as before. Present in 2.0.0 and 2.1.0.
|
|
151
|
+
- PGPE `stop_fitness`: with `use_ranking=True` (the default of
|
|
152
|
+
`pgpecpp.minimize` and `optimizer.Pgpe_cpp`) it was compared with the best
|
|
153
|
+
rank value instead of the best objective value. The best rank value is
|
|
154
|
+
`-(0.5 - 1/popsize)` in every generation (`-0.4375` for popsize 16,
|
|
155
|
+
`-0.46875` for 32), so a `stop_fitness` above it stopped the run after
|
|
156
|
+
the first generation and a lower one never stopped it. It is compared with
|
|
157
|
+
the best objective value found, as with `use_ranking=False`. This fix
|
|
158
|
+
does not change runs with the default `stop_fitness=-inf` or with
|
|
159
|
+
`use_ranking=False`.
|
|
160
|
+
`PGPE_C` has no stop test. Present in 2.0.0 and 2.1.0.
|
|
161
|
+
- `cmaescpp.minimize` or `decpp.minimize` called from two Python threads at
|
|
162
|
+
the same time hung forever, and so did a CMA-ES objective that itself
|
|
163
|
+
calls `cmaescpp.minimize` (and a DE objective calling `decpp.minimize`).
|
|
164
|
+
Each of the two bindings stored the Python objective in one global
|
|
165
|
+
pointer guarded by a mutex that a call took while holding the GIL; the
|
|
166
|
+
running call needed the GIL for its next objective evaluation. Each call
|
|
167
|
+
now keeps its objective in its own per-call context, which also reaches
|
|
168
|
+
the worker threads of `workers > 1`, so such calls complete and each uses
|
|
169
|
+
its own objective. Results of a single call are unchanged. Present in
|
|
170
|
+
2.0.0 and 2.1.0.
|
|
171
|
+
- `cmaescpp.minimize` and `decpp.minimize` with `workers > 1` read freed
|
|
172
|
+
memory: the queue between the optimizer and its evaluator threads
|
|
173
|
+
returned a reference to an element it had just removed (a
|
|
174
|
+
heap-use-after-free that AddressSanitizer reports in every such run). On
|
|
175
|
+
Linux this went unnoticed; on Windows two such calls running at the same
|
|
176
|
+
time crashed with an access violation or heap corruption. The queue now
|
|
177
|
+
returns a copy. The evaluation counter, the terminate flag and the stop
|
|
178
|
+
flag of the evaluator, written by several evaluator threads, are atomic
|
|
179
|
+
(ThreadSanitizer reported data races on them). Results of
|
|
180
|
+
single-threaded calls are unchanged. The queue code is the same in
|
|
181
|
+
2.0.0 and 2.1.0.
|
|
182
|
+
- Tutorial text and figures that disagreed:
|
|
183
|
+
- Scheduling: the SBM BiteOpt section showed the single-thread `Bite1.png`; it now shows `sbmBite32.png`.
|
|
184
|
+
- UAV: `uav_reward.png` was a screenshot of six image-viewer windows whose legends covered the leading bars. It is redrawn from the Multi-UAV benchmark CSVs with the same means.
|
|
185
|
+
- Claims corrected to match the plots and tables they describe: OneForAll MMKP timing, TopTrumps random search at 20 s, EvoJax (cartpole hard, brax, waterworld, waterworld MA and the larger-budget runs), MINLP best run and Employee solve times.
|
|
186
|
+
- PAGMO notes a mislabelled axis and empty legend counters.
|
|
187
|
+
- CryptoTrading no longer shows the first run's plot as the second run's.
|
|
188
|
+
- Section levels in `README.adoc` and seven tutorials skipped levels. Asciidoctor reported 86 "section title out of sequence" warnings, and the HTML went from `h1` straight to `h3`/`h4`. The levels now close the gaps and keep the original nesting. `scripts/build_docs.py` prints Asciidoctor warnings and fails on them (`--failure-level WARN`), so new ones stop the documentation build.
|
|
189
|
+
- Broken GitHub links in the tutorials and the examples API page:
|
|
190
|
+
- Files that were removed from this repository (`ascent.cpp`, `gcldecpp.py`, the old `Results.adoc`) now link to their last version.
|
|
191
|
+
- The missing `Filter.adoc` link points to the filtering exercise in `Hospital.adoc`.
|
|
192
|
+
- VRPTW and fcmaes-java links use their current branch and path.
|
|
193
|
+
- pykep links point to the 2.6.4 release that the tutorials use.
|
|
194
|
+
- Moved upstream files (GillesPy2, MOBOpt, floris) and the pymoo URL are corrected.
|
|
195
|
+
- Two attributions to repositories that no longer exist keep their names without a dead link.
|
|
196
|
+
|
|
197
|
+
## [2.1.0] - 2026-10-22
|
|
198
|
+
|
|
199
|
+
Behaviour changes: MODE (`modecpp` and `mode`) gives different results than
|
|
200
|
+
2.0.3, and `moretry` gives different results for problems with constraints
|
|
201
|
+
(`ncon > 0`). With the MODE fixes below (popsize 64, default settings,
|
|
202
|
+
10 seeds, 300k evaluations), the NSGA update solves ZDT2 in 10 of 10 runs
|
|
203
|
+
instead of 3 and reaches hypervolume 1.000 on ZDT4 instead of 0.125; the DE
|
|
204
|
+
update reaches 0.895 on ZDT4 instead of 0.000. On 23 constrained problems
|
|
205
|
+
(including MW1-13, C2-DTLZ2 and CEC2006 g-problems), the final population
|
|
206
|
+
of the native MODE is significantly better than with 2.0.3 in 29 of 46
|
|
207
|
+
problem/mode cells and worse in 1, and no run loses its feasible points.
|
|
208
|
+
Rerun MODE baselines made with 2.0.3 or earlier instead of comparing to
|
|
209
|
+
them.
|
|
210
|
+
|
|
211
|
+
### Added
|
|
212
|
+
|
|
213
|
+
- `examples/external_simulator.py`: an objective that runs an external
|
|
214
|
+
program in a fresh working directory.
|
|
215
|
+
- **Process tree:** each run gets a process group of its own. On exit,
|
|
216
|
+
timeout or interruption the whole group is stopped (SIGTERM, then
|
|
217
|
+
SIGKILL), so solver processes the program started do not keep running.
|
|
218
|
+
- **Failures:** a timeout, a nonzero exit, a missing output or a non-finite
|
|
219
|
+
value gives a finite failure value. They are counted in a ledger shared
|
|
220
|
+
by the worker processes (fork and spawn): `summary()` counts by kind, and
|
|
221
|
+
`check_result` refuses a campaign without a successful evaluation or with
|
|
222
|
+
a best point that fails its recheck.
|
|
223
|
+
- **Seeds:** the default point-derived seed replays a point. `seeds=` runs
|
|
224
|
+
every candidate on the same replication seeds (common random numbers),
|
|
225
|
+
and `replication_seeds` and `with_seeds` give disjoint holdout
|
|
226
|
+
validation. `with_seeds` copies the objective, so a subclass's file
|
|
227
|
+
formats, transformations and state carry over to the holdout. The
|
|
228
|
+
ledger counts attempted simulator runs; an aggregate that is not finite
|
|
229
|
+
fails as `invalid_aggregate`, apart from simulator failures.
|
|
230
|
+
- **Threads:** the program's thread pools are set to one thread, which
|
|
231
|
+
overwrites inherited values, unless set explicitly; `topology()` records
|
|
232
|
+
the layout.
|
|
233
|
+
- **Usable CPUs:** `usable_cpus()` counts the CPUs the process may use: the
|
|
234
|
+
affinity mask and the cgroup v1 or v2 quota.
|
|
235
|
+
|
|
236
|
+
The object is picklable for parallel `retry`. Tested in
|
|
237
|
+
`tests/test_external_simulator.py`, which the wheel and sdist jobs run.
|
|
238
|
+
- `AGENTS.md`, a short entry point for coding agents. Both READMEs link it
|
|
239
|
+
and `ai-context.md`. `ai-context.md` covers external programs, usable
|
|
240
|
+
CPUs and memory, and running a long Python job detached.
|
|
241
|
+
- `fcmaes.pareto.ParetoArchive2D`: exact archive of all nondominated points
|
|
242
|
+
of a two-objective minimization problem inside a reference box, each with
|
|
243
|
+
an optional payload (usually the decision vector). Every insertion updates
|
|
244
|
+
the dominated hypervolume exactly, with Kahan-compensated sums. Methods:
|
|
245
|
+
`add`, `add_batch` (returns the mask of archived rows), `front`,
|
|
246
|
+
`hypervolume`, `clear` and `len()`. Points with an objective above the
|
|
247
|
+
reference are not archived (`add` returns `False`); non-finite objectives
|
|
248
|
+
raise `ValueError`. The archive only observes `ask`/`tell`, so it can
|
|
249
|
+
record every generation of a MODE run without changing the run. See
|
|
250
|
+
`docs/pareto_archive.md` and `examples/pareto_mode.py`.
|
|
251
|
+
- Native kernel `_fcmaescpp/include/paretofront2d.h`
|
|
252
|
+
(`fcmaes::ParetoFront2D`), bound as `fcmaes._fcmaes_ext.ParetoArchive2D`.
|
|
253
|
+
It is derived from `bitehv2.h` in Aleksey Vaneev's BiteOpt repository
|
|
254
|
+
(commit 5f86f50, MIT license): the ordered front, the delta hypervolume
|
|
255
|
+
updates, the cached rejection point and the append/gap fast paths come
|
|
256
|
+
from there; fcmaes adds compensated sums, error handling with rollback,
|
|
257
|
+
skipping of outside points and payloads.
|
|
258
|
+
- Tests `tests/test_mode_regression.py`, `tests/test_pareto.py` (with the
|
|
259
|
+
fixture `tests/data/pareto_archive_2d.csv`) and `tests/test_moretry.py`,
|
|
260
|
+
and a smoke test that imports every module in `fcmaes.__all__` and runs
|
|
261
|
+
`from fcmaes import *`.
|
|
262
|
+
- Standalone C++ tests and a benchmark for the archive in `tests/native`,
|
|
263
|
+
with their own CMake project and optional sanitizers.
|
|
264
|
+
|
|
265
|
+
### Changed
|
|
266
|
+
|
|
267
|
+
- Discovery: the READMEs start with links to the shared solver-selection
|
|
268
|
+
guide and the ecosystem overview, and credit OptunaHub's FastCmaesSampler
|
|
269
|
+
as a third-party integration. The package description is more specific,
|
|
270
|
+
with more keywords and project URLs (ecosystem, agent guide, issues,
|
|
271
|
+
changelog). `RELEASING.md` covers discovery after a release.
|
|
272
|
+
- MODE (`modecpp` and `mode`): feasibility first. A point counts as
|
|
273
|
+
feasible only if it violates no constraint (tolerance `eps = 0`). The
|
|
274
|
+
adaptive tolerance, half the smoothed mean violation of the previous
|
|
275
|
+
generation, is gone: once the population converged onto active
|
|
276
|
+
constraints it let slightly infeasible points with better objectives
|
|
277
|
+
displace every strictly feasible point, so `minimize()` could return a
|
|
278
|
+
population without a feasible solution. Equality constraints now need an
|
|
279
|
+
explicit tolerance, e.g. `abs(h(x)) - tol <= 0`. The multiple constraint
|
|
280
|
+
ranking of infeasible points is unchanged; `mode.pareto_domination()`
|
|
281
|
+
keeps its signature and ignores `last_ycon` and `last_eps`.
|
|
282
|
+
- `moretry`: satisfied constraints no longer enter the weighted p-norm of
|
|
283
|
+
`mo_wrapper.eval`; only violations `max(c, 0)` count, plus the weight of
|
|
284
|
+
each violated constraint as a penalty, as before. A satisfied constraint
|
|
285
|
+
`c <= 0` added `(w*c)^p`, which penalized points deep inside the feasible
|
|
286
|
+
region and made results depend strongly on the constraint weights. Median
|
|
287
|
+
hypervolume of the feasible front over ten runs (64 retries of
|
|
288
|
+
`Bite_cpp(1500)`) for constraint weights 10 / 1 / 0.1: Binh-Korn
|
|
289
|
+
1000 / 3358 / 5074 -> 5150 / 5176 / 5159, CONSTR 0.83 / 3.45 / 4.17 ->
|
|
290
|
+
3.93 / 4.08 / 4.02.
|
|
291
|
+
- `moretry.minimize` docstring: `weight_bounds` holds one weight per value
|
|
292
|
+
`fun` returns (objectives first, then the `ncon` constraints), and
|
|
293
|
+
`value_limits` limits the leading values.
|
|
294
|
+
- Tutorials and examples use the loguru `logger` (`logger.info(...)`) of
|
|
295
|
+
1.6.x and the 2.x signatures. 18 tutorials and 6 examples still called
|
|
296
|
+
`logger()` and passed `logger=` or `log=` arguments that 2.x functions do
|
|
297
|
+
not accept. `multiretry.minimize` is called with keyword arguments,
|
|
298
|
+
`tutorials/JobShop.adoc` passes `num_retries` and `popsize` by keyword
|
|
299
|
+
(the fifth parameter of `modecpp.retry` is `guess`), and
|
|
300
|
+
`tutorials/Quant.adoc` explains the DEBUG-level progress log.
|
|
301
|
+
- `examples/maxcut.py`: the unused `logger` parameter of `fcmaes_Optimizer`
|
|
302
|
+
is removed.
|
|
303
|
+
- API reference pages (`docs/*.html`): the Python page describes the
|
|
304
|
+
nanobind extension `fcmaes._fcmaes_ext` instead of ctypes and has a card
|
|
305
|
+
for `pareto.py`. The C++ page documents the bindings in
|
|
306
|
+
`_fcmaescpp/bindings` (the `optimize_*` functions and the `ACMA`, `Bite`,
|
|
307
|
+
`CRFMNES`, `DE`, `MODE` and `PGPE` classes) instead of the `extern "C"`
|
|
308
|
+
exports of 1.x, notes that `Bite` has ask/tell since 2.0.2 and has a card
|
|
309
|
+
for `paretofront2d.h`. The examples page has a card for `pareto_mode.py`
|
|
310
|
+
and no longer lists `reproblem.py` and `repython.py`.
|
|
311
|
+
- `ai-context.md` covers the MODE fixes, `ParetoArchive2D`, the new
|
|
312
|
+
`moretry` constraint semantics, source builds of `master` (including
|
|
313
|
+
`FCMAES_FETCH_EIGEN`) and related projects (fcmaes-rust,
|
|
314
|
+
optimization-jobs).
|
|
315
|
+
- `README.md`, the PyPI project description, links fcmaes-rust and
|
|
316
|
+
optimization-jobs and introduces `ParetoArchive2D`.
|
|
317
|
+
- Wheel CI runs the whole `tests` directory instead of only
|
|
318
|
+
`tests/test_wheel_smoke.py`. A new workflow (`native-tests.yml`) runs the
|
|
319
|
+
C++ archive tests with GCC plus ASan/UBSan and with Clang.
|
|
320
|
+
- Release workflow (`wheels.yml`): a tag must equal `v` plus the version in
|
|
321
|
+
`pyproject.toml` (publishing uses `skip-existing`, so a tag without the
|
|
322
|
+
version bump would have published nothing); the source distribution is
|
|
323
|
+
installed and tested outside the checkout; PyPI releases get GitHub
|
|
324
|
+
artifact attestations. `RELEASING.md` describes the release, and both
|
|
325
|
+
READMEs describe installation from source (C++17 compiler, Eigen 3.4 from
|
|
326
|
+
the system or fetched with `FCMAES_FETCH_EIGEN=ON`; no other repository of
|
|
327
|
+
ours is needed). This changelog replaces the "Changes from version"
|
|
328
|
+
lists in `README.adoc` as the complete record. `ai-context.md` points to
|
|
329
|
+
the AI entry point of optimization-jobs, which chooses between the four
|
|
330
|
+
solver repositories.
|
|
331
|
+
|
|
332
|
+
### Fixed
|
|
333
|
+
|
|
334
|
+
- MODE SBX crossover (C++ and Python): the expanding branch uses
|
|
335
|
+
`(2 - 2r)^(-1/(eta+1))` (beta >= 1) instead of `(2r)^(-1/(eta+1))`
|
|
336
|
+
(beta < 1), so children can leave the parents' interval.
|
|
337
|
+
- MODE polynomial mutation (C++): the upward branch uses `norm^(eta+1)`
|
|
338
|
+
instead of `(1 - norm)^(eta+1)`. At the lower bound both branches gave a
|
|
339
|
+
zero step, so a variable that touched its lower bound could never move
|
|
340
|
+
again.
|
|
341
|
+
- MODE Pareto ranking (C++ and Python): `pareto_levels` is standard
|
|
342
|
+
non-dominated sorting (higher level = better front). It counted
|
|
343
|
+
sequential-elimination rounds, which ranked dominated points by the
|
|
344
|
+
position of their first dominator instead of by front.
|
|
345
|
+
- MODE crowding distance (C++ and Python): the range-normalized NSGA-II
|
|
346
|
+
distance over all objectives, and only the objectives, instead of the
|
|
347
|
+
first objective only.
|
|
348
|
+
- `mode` (Python): in `ranks()` a satisfied constraint adds no rank, also
|
|
349
|
+
for infeasible points, as in the native MODE. The arbitrary tie-order
|
|
350
|
+
ranks left the Python MODE unable to reach small feasible regions
|
|
351
|
+
(problem g6: feasible points in 10 of 10 runs instead of 1).
|
|
352
|
+
- `mode` (Python): `variation()` clips the offspring to the bounds before
|
|
353
|
+
the polynomial mutation; expanding SBX can leave the box, and the
|
|
354
|
+
unclamped normalization produced NaN.
|
|
355
|
+
- `moretry.minimize`: `value_limits` may list only the objectives of a
|
|
356
|
+
constrained problem. The comparison over all `nobj + ncon` values raised
|
|
357
|
+
an `IndexError` inside the retry loop, which silently dropped every
|
|
358
|
+
result.
|
|
359
|
+
- `fcmaes.__all__`: `from fcmaes import *` raised `AttributeError`. It lists
|
|
360
|
+
`crfmnes` instead of the misspelled `crmfnes`, no longer lists the removed
|
|
361
|
+
`csmacpp`, and adds `pareto` and `pgpecpp`.
|
|
362
|
+
- `examples/__init__.py`: `__all__` had no commas between its entries (one
|
|
363
|
+
concatenated string) and listed removed modules; it lists the example
|
|
364
|
+
modules now.
|
|
365
|
+
- `tutorials/MINLP.adoc`: two errors in code snippets.
|
|
366
|
+
|
|
367
|
+
## [2.0.3] - 2026-07-26
|
|
368
|
+
|
|
369
|
+
The package code is unchanged from 2.0.2; this release updates metadata and
|
|
370
|
+
documentation.
|
|
371
|
+
|
|
372
|
+
### Added
|
|
373
|
+
|
|
374
|
+
- Documentation book on GitHub Pages
|
|
375
|
+
(<https://dietmarwo.github.io/fast-cma-es/>): the README, the AsciiDoc
|
|
376
|
+
tutorials and the Python, C++ and examples API references as one site,
|
|
377
|
+
built by `scripts/build_docs.py` and the `docs.yml` workflow.
|
|
378
|
+
- Project URLs `Documentation` and `Tutorials` in the package metadata.
|
|
379
|
+
- `ai-context.md`: operational context for an AI that designs and
|
|
380
|
+
implements an optimization solution with fcmaes.
|
|
381
|
+
|
|
382
|
+
### Changed
|
|
383
|
+
|
|
384
|
+
- `README.md`, the PyPI project description, links the documentation book,
|
|
385
|
+
the tutorials and the Python, C++ and examples API references.
|
|
386
|
+
- `README.adoc` links fcmaes-rust, the native Rust implementation with a
|
|
387
|
+
PyO3 API for Python users.
|
|
388
|
+
|
|
389
|
+
## [2.0.2] - 2026-04-12
|
|
390
|
+
|
|
391
|
+
### Added
|
|
392
|
+
|
|
393
|
+
- BiteOpt ask/tell interface `bitecpp.Bite_C` with `ask()`, `tell(ys)` and
|
|
394
|
+
`result()`, backed by the native class `fcmaes._fcmaes_ext.Bite`
|
|
395
|
+
(`_fcmaescpp/include/biteopt_asktell.h`). `ask()` returns up to
|
|
396
|
+
`batch_size` candidates (default 8) generated from a frozen optimizer
|
|
397
|
+
state; population updates and selector feedback happen in `tell()`. This
|
|
398
|
+
parallelizes a single BiteOpt run for expensive objective functions; the
|
|
399
|
+
delayed feedback can cost convergence per evaluation compared to the
|
|
400
|
+
sequential run.
|
|
401
|
+
- Test `fcmaes.test_cma.test_rosen_ask_tell_bite`.
|
|
402
|
+
|
|
403
|
+
### Changed
|
|
404
|
+
|
|
405
|
+
- `bitecpp.minimize` runs on the same native ask/tell implementation, one
|
|
406
|
+
candidate per step.
|
|
407
|
+
|
|
408
|
+
### Removed
|
|
409
|
+
|
|
410
|
+
- `fcmaes.__version__`. The version is defined in `pyproject.toml`; read it
|
|
411
|
+
with `importlib.metadata.version("fcmaes")`.
|
|
412
|
+
|
|
413
|
+
## [2.0.1] - 2026-03-28
|
|
414
|
+
|
|
415
|
+
### Fixed
|
|
416
|
+
|
|
417
|
+
- The PyPI release includes the source distribution again; 2.0.0 was
|
|
418
|
+
published with wheels only. The sdist excludes documentation, examples,
|
|
419
|
+
tests, tutorials and images.
|
|
420
|
+
- `mapelites.Archive.get_qd_score`: `np.reciprocal(..., where=...)` gets an
|
|
421
|
+
explicit zero-initialized `out` array.
|
|
422
|
+
- Examples that call native helper code (`damp.py`, `f8.py`, `hbv`, `lrgv`,
|
|
423
|
+
`top_trumps.py`) load Linux shared libraries from `examples/lib`, as
|
|
424
|
+
2.0.0 no longer ships `fcmaes/lib`.
|
|
425
|
+
- `examples/crypto.py` handles the MultiIndex columns of current `yfinance`
|
|
426
|
+
downloads.
|
|
427
|
+
|
|
428
|
+
### Removed
|
|
429
|
+
|
|
430
|
+
- `examples/reproblem.py` and `examples/repython.py`.
|
|
431
|
+
|
|
432
|
+
## [2.0.0] - 2026-03-16
|
|
433
|
+
|
|
434
|
+
Includes the changes of the tag `v1.6.13` (2026-03-14), which was not
|
|
435
|
+
published to PyPI.
|
|
436
|
+
|
|
437
|
+
### Added
|
|
438
|
+
|
|
439
|
+
- Binary wheels for CPython 3.10 to 3.13 on Linux x86_64 (manylinux_2_28),
|
|
440
|
+
Windows AMD64 and macOS x86_64 and arm64, built in CI with cibuildwheel.
|
|
441
|
+
Without a matching wheel, `pip` builds from source.
|
|
442
|
+
- Release workflow: wheels are built on pull requests and branch pushes, a
|
|
443
|
+
manual run with `publish_target=testpypi` publishes to TestPyPI, and tags
|
|
444
|
+
`v*` publish to PyPI, using Trusted Publishing.
|
|
445
|
+
- Type stub `fcmaes/_fcmaes_ext.pyi` for the native extension.
|
|
446
|
+
- Wheel smoke test `tests/test_wheel_smoke.py`, run against every built
|
|
447
|
+
wheel, and `scripts/smoke_nanobind.sh`.
|
|
448
|
+
- Optional dependency group `jit` for `numba`.
|
|
449
|
+
- `journal`: `journal_wrapper` marks infinite or NaN results as pruned
|
|
450
|
+
trials in the Optuna journal (`state` parameter of `trial_value`,
|
|
451
|
+
`Journal.value` and `journal_wrapper.store_y`).
|
|
452
|
+
|
|
453
|
+
### Changed
|
|
454
|
+
|
|
455
|
+
- The C++ optimizers are a nanobind extension module, `fcmaes._fcmaes_ext`,
|
|
456
|
+
built with scikit-build-core and CMake, instead of shared libraries
|
|
457
|
+
loaded with ctypes. Public Python functions and classes keep their
|
|
458
|
+
signatures, except in `journal`. The GTOP space mission benchmarks of
|
|
459
|
+
`fcmaes.astro` are part of the extension.
|
|
460
|
+
- macOS is fully supported, including ARM.
|
|
461
|
+
- `pyproject.toml` replaces `setup.py` and `requirements.txt`.
|
|
462
|
+
- Python 3.10 or newer is required (1.6.x: 3.7).
|
|
463
|
+
- `numba` is optional; `mapelites` works without it, without the JIT
|
|
464
|
+
speedup.
|
|
465
|
+
- Improved type annotations, documentation and tutorials; the tutorials
|
|
466
|
+
were reworked in `v1.6.13`.
|
|
467
|
+
- Most modules call `np.set_printoptions(legacy='1.25')` on import, which
|
|
468
|
+
changes NumPy's print format for the whole process.
|
|
469
|
+
|
|
470
|
+
### Removed
|
|
471
|
+
|
|
472
|
+
- The prebuilt shared libraries in `fcmaes/lib` (`libacmalib` for Linux,
|
|
473
|
+
Windows and macOS, and the libraries used by examples).
|
|
474
|
+
- `journal.Journal.write_x`, `write_xs`, `write_ys`, `write_starts` and
|
|
475
|
+
`close`.
|
|
476
|
+
|
|
477
|
+
## [1.6.x] - 2026-01-22
|
|
478
|
+
|
|
479
|
+
Releases 1.6.0 (2023-09-13) to 1.6.12 (2026-01-22). The tag `v1.6.13` was
|
|
480
|
+
not published to PyPI; its changes are listed under 2.0.0.
|
|
481
|
+
|
|
482
|
+
- Logging is based on `loguru`. The `logger` parameters of the retry,
|
|
483
|
+
optimizer and quality-diversity functions and `fcmaes.optimizer.logger()`
|
|
484
|
+
are removed.
|
|
485
|
+
- New dependencies `loguru` and `numba` (`numba` is optional since 2.0.0).
|
|
486
|
+
- An initial population can be passed as `guess` for multi-objective
|
|
487
|
+
optimization (`mode.minimize`, `modecpp.minimize`, `modecpp.retry`).
|
|
488
|
+
- MODE ask/tell works on whole populations: `ask()` returns all
|
|
489
|
+
candidates and `tell(ys, xs=None)` takes all values. This replaces the
|
|
490
|
+
per-candidate `ask()`/`tell(p, y, x)` and `ask_all()`/`tell_all()` of the
|
|
491
|
+
Python `MODE`.
|
|
492
|
+
- New tutorial on the GECCO 2023 Space Optimization Competition,
|
|
493
|
+
`tutorials/ESAChallenge.adoc`.
|
|
494
|
+
- 1.6.9 removes the C++ optimizers CSMA (`csmacpp`, `Csma_cpp`), GCL-DE
|
|
495
|
+
(`gcldecpp`, `GCLDE_cpp`), LCL-DE (`lcldecpp`, `LCLDE_cpp`) and LDE
|
|
496
|
+
(`ldecpp`, `LDe_cpp`).
|
|
497
|
+
- 1.6.11 adds `fcmaes.journal`, which writes an Optuna journal file for
|
|
498
|
+
live monitoring of long runs with optuna-dashboard.
|
|
499
|
+
- 1.6.12 adds tutorials on weighted spherical t-designs, a Moran process
|
|
500
|
+
simulation and an open-source AI optimization assistant, and updates the
|
|
501
|
+
bundled LBFGSpp.
|
|
502
|
+
|
|
503
|
+
## [1.5.x] - 2023-09-07
|
|
504
|
+
|
|
505
|
+
Releases 1.5.0 (2022-11-18) to 1.5.11 (2023-09-07).
|
|
506
|
+
|
|
507
|
+
- Python 3.7 or newer is required; 3.6 is no longer supported (1.5.0).
|
|
508
|
+
- PEP 484 type hints, useful for IDEs (1.5.0).
|
|
509
|
+
- Pure Python versions of the algorithms (CMA-ES, CR-FM-NES, DE, MODE,
|
|
510
|
+
MAP-Elites with Diversifier) work with the parallel retry and the
|
|
511
|
+
advanced retry (smart boundary management) (1.5.8).
|
|
512
|
+
- Quality diversity: the descriptor bounds parameter of `mapelites` and
|
|
513
|
+
`diversifier` is `qd_bounds` (was `desc_bounds`); per-niche statistics
|
|
514
|
+
are optional (`use_stats`).
|
|
515
|
+
- The dependency `sklearn` is replaced by `scikit-learn` (1.5.5);
|
|
516
|
+
`threadpoolctl` is a new dependency.
|
|
517
|
+
|
|
518
|
+
## [1.4.x] - 2022-11-10
|
|
519
|
+
|
|
520
|
+
Releases 1.4.0 (2022-07-14) to 1.4.9 (2022-11-10).
|
|
521
|
+
|
|
522
|
+
- Unified ask/tell interface, useful for monitoring and parallel fitness
|
|
523
|
+
evaluation: added to `crfmnes`, `crfmnescpp`, `cmaescpp`, `modecpp`,
|
|
524
|
+
`pgpecpp` and `decpp`, in addition to `cmaes`, `de` and `mode`.
|
|
525
|
+
- PGPE (Parameter Exploring Policy Gradients) in C++, `pgpecpp` (1.4.7).
|
|
526
|
+
- Quality diversity: CVT MAP-Elites with a CMA-ES emitter, `mapelites`
|
|
527
|
+
(1.4.8), and the Diversifier meta-algorithm, `diversifier` (1.4.9), a
|
|
528
|
+
generalized variant of CMA-ME for other wrapped optimizers. Also "drill
|
|
529
|
+
down" for specified niches, transfer in both directions between the QD
|
|
530
|
+
archive and the `advretry` store, parallel optimization on all CPU cores
|
|
531
|
+
and per-niche statistics (mean, standard deviation, maximum, minimum,
|
|
532
|
+
count).
|
|
533
|
+
|
|
534
|
+
## Earlier versions
|
|
535
|
+
|
|
536
|
+
Releases 0.9.5 (2020-02-18) to 1.3.37 (2022-07-11) are not described here.
|
|
537
|
+
Among them, 1.3.1 added the multi-objective optimizer MODE (`mode`; the C++
|
|
538
|
+
`modecpp` followed in 1.3.4) and 1.3.25 added CR-FM-NES (`crfmnes`,
|
|
539
|
+
`crfmnescpp`). See the git history and the tags `v1.0.7` to `v1.3.37`; not
|
|
540
|
+
every PyPI release has a tag.
|
|
541
|
+
|
|
542
|
+
[Unreleased]: https://github.com/dietmarwo/fast-cma-es/compare/v2.1.0...HEAD
|
|
543
|
+
[2.1.0]: https://github.com/dietmarwo/fast-cma-es/compare/v2.0.3...v2.1.0
|
|
544
|
+
[2.0.3]: https://github.com/dietmarwo/fast-cma-es/compare/v2.0.2...v2.0.3
|
|
545
|
+
[2.0.2]: https://github.com/dietmarwo/fast-cma-es/compare/v2.0.1...v2.0.2
|
|
546
|
+
[2.0.1]: https://github.com/dietmarwo/fast-cma-es/compare/v2.0.0...v2.0.1
|
|
547
|
+
[2.0.0]: https://github.com/dietmarwo/fast-cma-es/compare/v1.6.12...v2.0.0
|
|
548
|
+
[1.6.x]: https://github.com/dietmarwo/fast-cma-es/compare/v1.5.11...v1.6.12
|
|
549
|
+
[1.5.x]: https://github.com/dietmarwo/fast-cma-es/compare/v1.4.9...v1.5.11
|
|
550
|
+
[1.4.x]: https://github.com/dietmarwo/fast-cma-es/compare/v1.3.37...v1.4.9
|
|
@@ -87,6 +87,7 @@ add_library(fcmaes_backend STATIC
|
|
|
87
87
|
_fcmaescpp/daoptimizer.cpp
|
|
88
88
|
_fcmaescpp/deoptimizer.cpp
|
|
89
89
|
_fcmaescpp/gtop.cpp
|
|
90
|
+
_fcmaescpp/jsooptimizer.cpp
|
|
90
91
|
_fcmaescpp/modeoptimizer.cpp
|
|
91
92
|
_fcmaescpp/pgpe.cpp
|
|
92
93
|
)
|
|
@@ -105,8 +106,10 @@ nanobind_add_module(_fcmaes_ext NOMINSIZE
|
|
|
105
106
|
_fcmaescpp/bindings/da_bindings.cpp
|
|
106
107
|
_fcmaescpp/bindings/de_bindings.cpp
|
|
107
108
|
_fcmaescpp/bindings/gtop_bindings.cpp
|
|
109
|
+
_fcmaescpp/bindings/jso_bindings.cpp
|
|
108
110
|
_fcmaescpp/bindings/mode_bindings.cpp
|
|
109
111
|
_fcmaescpp/bindings/pgpe_bindings.cpp
|
|
112
|
+
_fcmaescpp/bindings/pareto_bindings.cpp
|
|
110
113
|
)
|
|
111
114
|
|
|
112
115
|
target_link_libraries(_fcmaes_ext PRIVATE Eigen3::Eigen fcmaes_backend)
|