Unified Software Design Patterns for Simulated Annealing
Abstract
Any optimization algorithm programming interface can be seen as a black-box function with additional free parameters. In this spirit, simulated annealing (SA) can be implemented in pseudo-code within the dimensions of a single slide with free parameters relating to the annealing schedule. Such an implementation, however, necessarily neglects much of the structure necessary to take advantage of advances in computing resources and algorithmic breakthroughs. Simulated annealing is often introduced in myriad disciplines, from discrete examples like the Traveling Salesman Problem (TSP) to molecular cluster potential energy exploration or even explorations of a protein's configurational space. Theoretical guarantees also demand a stricter structure in terms of statistical quantities, which cannot simply be left to the user. We will introduce several standard paradigms and demonstrate how these can be "lifted" into a unified framework using object-oriented programming in Python. We demonstrate how clean, interoperable, reproducible programming libraries can be used to access and rapidly iterate on variants of Simulated Annealing in a manner which can be extended to serve as a best practices blueprint or design pattern for a data-driven optimization library.
Community
Simulated annealing (SA) fits on one slide, but serious implementations require real infrastructure: parallelism, restart strategies, adaptive schedules, interoperability with different objective functions.
This paper extracts common software design patterns from mature SA codebases (including the EON saddle point search code). The patterns separate concerns: annealing schedule from move generation from acceptance criterion from state management.
The result is a design vocabulary that makes SA implementations more modular and easier to extend. Demonstrated across optimization problems from molecular simulation to combinatorial optimization.
The patterns apply beyond SA to other metaheuristic optimization methods that share the same control flow structure.
Get this paper in your agent:
hf papers read 2302.02811 Don't have the latest CLI?
curl -LsSf https://hf.co/cli/install.sh | bash Models citing this paper 0
No model linking this paper
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper
Collections including this paper 0
No Collection including this paper