Anneal
Start here. Bound-constrained global optimization with a single budget knob, or classical simulated-annealing presets you can swap without rewriting a driver.
Simulated-annealing components on the eindir typed primitives. One surface, many drivers: classical presets, Bayesian pilot+mixer, generalized Langevin equation (GLE) colored noise, rank-1 additive independence, quasi-Monte Carlo (QMC) polish, device/ensemble scale. All obey the same five-component algebra (Obj / Cool / Neigh / Move / Accept) and four composition laws checked at construction.
| Docs | https://anneal.rgoswami.me |
| License | MIT |
| Software DOI | https://zenodo.org/doi/10.5281/zenodo.10672746 |
| Paper reproducibility | https://github.com/HaoZeke/anneal_repro — Zenodo 10.5281/zenodo.20672621 |
| History | Continuous development since 2023-02 (see git log); multi-author CITATION.cff |
Cluster search: the measured configuration
Config::recommended(n) is the measured configuration for cluster global
minimisation: composed surface relocations paying one acceptance test for a
whole excursion, Normal-Gamma Thompson allocation over move arms rewarded
by the depth reached, and tabu on stall. The algorithm is the contribution;
its generality is measured, not assumed: one configuration across four
Lennard-Jones morphologies and, with the rigid-group move library, across
molecular clusters under tight-binding and machine-learned potentials,
where an engine swap reproduces the known functional ordering of the water
hexamer with nothing about water in the search. Accuracy means reaching the
literature global minima, which it does on every solved run to 1e-6.
Efficiency is reported under evaluation-matched comparisons as the honest
protocol: against reference GMIN under its own documented settings, this
stack solves the 75- and 98-point double-funnel systems that the reference
does not reach at the same number of potential calls, with Beta-Binomial
posterior comparisons and Bayes factors throughout.
Config::for_cluster(n) keeps the plain Wales-Doye protocol as the
comparison baseline, and every mechanism that measured null or harmful is
recorded with its failure mechanism rather than shipped.
use anneal_core::methods::cluster_hopping::{optimize, Config, Ledger};
let cfg = Config::recommended(38);
let mut ledger = Ledger::new(400_000);
// supply `relax` closing over your objective; see examples/lj_cluster_search.rs
Install
pip install anneal
Full stack (pinned Rust + Python + docs):
pixi install
Start here (budget-only portfolio)
The intended stand-alone tool for most users: pass an objective, box bounds, and a work-unit budget (objective and gradient evaluations share the counter).
import numpy as np
from anneal import global_optimize
def rastrigin(x):
return 10.0 * len(x) + np.sum(x * x - 10.0 * np.cos(2.0 * np.pi * x))
low, high = np.full(5, -5.0), np.full(5, 5.0)
out = global_optimize(rastrigin, low, high, budget=4000, seed=0)
print(out["best_val"], out["best_pos"])
Runnable copies:
- Script:
examples/quickstart_portfolio.py - Notebook:
examples/notebooks/01_quickstart.ipynb - Website quickstart + four tutorials: https://anneal.rgoswami.me
Classical presets (same driver, different slots)
from anneal import Boltzmann, Fast, Gsa, run
h = run(rastrigin, low, high, Boltzmann(t_init=5.0, sigma=0.5),
n_epochs=40, steps_per_epoch=50, seed=1)
print(h.best_val)
Optional arms (additive independence + QMC polish)
import numpy as np
from anneal import additive_independence, qmc_polish
def rastrigin(x):
return 10.0 * len(x) + np.sum(x*x - 10.0 * np.cos(2.0 * np.pi * x))
def grad_rastrigin(x):
return 2.0 * x + 20.0 * np.pi * np.sin(2.0 * np.pi * x)
low = np.full(5, -5.0)
high = np.full(5, 5.0)
# Values-only rank-1 independence (no gradient)
res = additive_independence(rastrigin, low, high, max_fevals=3000, seed=7)
# Polish with gradient
refined = qmc_polish(rastrigin, grad_rastrigin, low, high,
n_starts=32, max_fevals_per_start=50, seed=0, top_k=1)
print(refined["best_val"])
Full docs, tutorials (classical, Bayesian pilot+mixer, GLE, polish+device), algebra, how-tos, and reference at https://anneal.rgoswami.me .
Development
pixi install
pixi run -e python python-test
pixi run -e docs docs-export
pixi run -e docs docs-build
See pixi.toml and docs/export.el (modeled on rgpycrumbs/rsx-rs patterns).
License and citation
MIT (see LICENSE.txt). Citation: CITATION.cff or the software Zenodo DOI. Multi-author software citation lists six authors. Project history since February 2023. Reproducibility package for paper tables and figures: HaoZeke/anneal_repro (Zenodo 10.5281/zenodo.20672621).
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file anneal-0.8.0.tar.gz.
File metadata
- Download URL: anneal-0.8.0.tar.gz
- Upload date:
- Size: 3.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3913591555dc4e35561f7879fc096c8d3cd0c4fc23506fe29b5c62a9a38f8e6d
|
|
| MD5 |
0cca31df3e0994e89c9f494c8ad67301
|
|
| BLAKE2b-256 |
70381a3934835aa4506c01aed42842a075c0c081fd3d5185f080b7714f92cbd6
|
Provenance
The following attestation bundles were made for anneal-0.8.0.tar.gz:
Publisher:
release.yml on HaoZeke/anneal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anneal-0.8.0.tar.gz -
Subject digest:
3913591555dc4e35561f7879fc096c8d3cd0c4fc23506fe29b5c62a9a38f8e6d - Sigstore transparency entry: 2495072510
- Sigstore integration time:
-
Permalink:
HaoZeke/anneal@535bf65fbcf9f191acf01ad1a2caeede3bd4c9e5 -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/HaoZeke
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@535bf65fbcf9f191acf01ad1a2caeede3bd4c9e5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file anneal-0.8.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: anneal-0.8.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1c9a4fc706a36f5d91f8c4f8aed9604c7b2edf57c3633d160f83ccfe9ecd432
|
|
| MD5 |
248b39f6469089cc4fab23f1de3751aa
|
|
| BLAKE2b-256 |
fb78d8f45cac81b93ef8005d746c085bb9745049d14bcf22588ccb7fa02563ab
|
Provenance
The following attestation bundles were made for anneal-0.8.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on HaoZeke/anneal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anneal-0.8.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
d1c9a4fc706a36f5d91f8c4f8aed9604c7b2edf57c3633d160f83ccfe9ecd432 - Sigstore transparency entry: 2495072519
- Sigstore integration time:
-
Permalink:
HaoZeke/anneal@535bf65fbcf9f191acf01ad1a2caeede3bd4c9e5 -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/HaoZeke
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@535bf65fbcf9f191acf01ad1a2caeede3bd4c9e5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file anneal-0.8.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: anneal-0.8.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b360e5707260cda6f1c983034d4108e44ecc1fd80868dcc1f3322276396fdaa9
|
|
| MD5 |
e55db44a4f7f9f146902792a3117f1f7
|
|
| BLAKE2b-256 |
a6088fe88a4e6d0f5b2ce5e643b36e04ed301a1c9e48c3109d4cba0b626ee417
|
Provenance
The following attestation bundles were made for anneal-0.8.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on HaoZeke/anneal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anneal-0.8.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
b360e5707260cda6f1c983034d4108e44ecc1fd80868dcc1f3322276396fdaa9 - Sigstore transparency entry: 2495072525
- Sigstore integration time:
-
Permalink:
HaoZeke/anneal@535bf65fbcf9f191acf01ad1a2caeede3bd4c9e5 -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/HaoZeke
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@535bf65fbcf9f191acf01ad1a2caeede3bd4c9e5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file anneal-0.8.0-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: anneal-0.8.0-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6baf93520ca0f95b23de8e46e8bbb827386d616e2c668da1efd426568232b0f2
|
|
| MD5 |
897806d245782e918714e5373d310614
|
|
| BLAKE2b-256 |
8f818c7e6e060257680b3dc31d554e508738b10a2d414e5d82e002d6549aec16
|
Provenance
The following attestation bundles were made for anneal-0.8.0-cp310-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on HaoZeke/anneal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anneal-0.8.0-cp310-abi3-macosx_11_0_arm64.whl -
Subject digest:
6baf93520ca0f95b23de8e46e8bbb827386d616e2c668da1efd426568232b0f2 - Sigstore transparency entry: 2495072549
- Sigstore integration time:
-
Permalink:
HaoZeke/anneal@535bf65fbcf9f191acf01ad1a2caeede3bd4c9e5 -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/HaoZeke
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@535bf65fbcf9f191acf01ad1a2caeede3bd4c9e5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file anneal-0.8.0-cp310-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: anneal-0.8.0-cp310-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.10+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9db10c172d73c4dc46ccd0cb81f717e6cc40a791d64cfa8bb32b38d72efc1efd
|
|
| MD5 |
2826204e42de0927ce7e96c87d9ccf63
|
|
| BLAKE2b-256 |
c8b52c6c239b842bec8952687c7623e6a2ace8d82e76225153636561ee59ca17
|
Provenance
The following attestation bundles were made for anneal-0.8.0-cp310-abi3-macosx_10_12_x86_64.whl:
Publisher:
release.yml on HaoZeke/anneal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anneal-0.8.0-cp310-abi3-macosx_10_12_x86_64.whl -
Subject digest:
9db10c172d73c4dc46ccd0cb81f717e6cc40a791d64cfa8bb32b38d72efc1efd - Sigstore transparency entry: 2495072533
- Sigstore integration time:
-
Permalink:
HaoZeke/anneal@535bf65fbcf9f191acf01ad1a2caeede3bd4c9e5 -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/HaoZeke
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@535bf65fbcf9f191acf01ad1a2caeede3bd4c9e5 -
Trigger Event:
push
-
Statement type: