MachineLearning/simulated_annealing library

Simulated Annealing (generic)

A production-minded, generic simulated annealing optimizer. The implementation is small, auditable and includes features expected by engineering teams: generic candidate type T, pluggable energy and neighbor functions, a temperature schedule and reproducible RNG.

Contract:

  • Input: initial candidate T, energy(T)->double to minimize, neighbor(T, Random)->T that proposes a local move, and temperature(step).
  • Output: optimize returns a map with best and energy.
  • Errors: throws ArgumentError for invalid inputs.

Classes

SimulatedAnnealing<T>