feat(algorithms): add SimulatedAnnealing single-objective local search

Classic Kirkpatrick et al. 1983 SA: hill climber that also accepts
worse moves with probability `exp(-Δ/T)` where T anneals geometrically
from `initial_temperature` to `final_temperature` over the iteration
count.

Single-objective only. Generic over decision type — works on real
vectors, bool vectors, permutations, anything. Tracks the best-seen
incumbent across the run (not just the last accepted move) so the
result reflects the actual best ever visited, not where the random
walk happened to end.

Tests cover: convergence on Sphere1D under reasonable hyperparameters,
deterministic reruns, panic on multi-objective, panic on
non-positive temperatures.
This commit is contained in:
2026-05-05 09:51:10 -06:00
parent a93d0df858
commit 35fbf622f2
3 changed files with 250 additions and 1 deletions
+2
View File
@@ -8,6 +8,7 @@ pub mod nsga3;
pub mod paes;
pub(crate) mod parallel_eval;
pub mod random_search;
pub mod simulated_annealing;
pub mod spea2;
pub use differential_evolution::*;
@@ -17,4 +18,5 @@ pub use nsga2::*;
pub use nsga3::*;
pub use paes::*;
pub use random_search::*;
pub use simulated_annealing::*;
pub use spea2::*;