liveBook · Manning

Simulated annealing

Simulated annealing is a stochastic optimization method that gradually reduces the probability of accepting worse solutions to escape local optima.

How 3 Manning books explain it

Advanced Algorithms and Data Structures

Simulated annealing is a randomized optimization algorithm that probabilistically accepts some worsening transitions while gradually reducing that probability to escape local optima and approach a global optimum.

How it is used
Optimizes routes and graph embeddings when local minima or nondifferentiable costs make downhill-only search unsuitable.
How deep it goes
Develops a generic pseudocode loop, acceptance behavior, cooling schedule, transition design, and tuning trade-offs without proving convergence.
Examples
Works through traveling-salesperson tour costs and swaps, then applies vertex moves to minimum-crossing and force-directed graph drawings.
What you can do after
Build it from scratch by supplying a cost function, candidate transition, acceptance rule, cooling schedule, and iteration limit.

Read how Advanced Algorithms and Data Structures explains simulated annealing →

Optimization Algorithms: AI techniques for design, planning, and control problems

The original form of simulated annealing that uses a temperature-controlled probability of accepting worsening moves.

How it is used
Uses a trajectory-based, derivative-free search for continuous and discrete optimization problems.
How deep it goes
Derives the acceptance rule and gives pseudocode, cooling guidance, hand iterations, and practical implementations.
Examples
Works through a bounded quadratic and a five-city traveling salesman problem, then applies SA to Berlin52 and delivery routing.
What you can do after
Apply it via optalgotools’ SimulatedAnnealing to bounded function optimization and traveling salesman problems.

Read how Optimization Algorithms: AI techniques for design, planning, and control problems explains simulated annealing →

Machine Learning Algorithms in Depth

Simulated annealing is a heuristic optimization method that probabilistically accepts higher-energy states according to a temperature-controlled schedule to escape local optima.

How it is used
Uses temperature-controlled search to minimize energy while allowing moves that can escape local optima.
How deep it goes
Develops the acceptance and cooling loop into pseudocode and a from-scratch implementation; does not establish a global-optimum guarantee.
Examples
Uses a two-dimensional energy landscape, sampled energies, and a traveling salesman problem application.
What you can do after
Build it from scratch to search a two-dimensional energy function, and consider restarts when seeking better optima.

Read how Machine Learning Algorithms in Depth explains simulated annealing →

What to know first

Related concepts

Questions about simulated annealing

What is simulated annealing?

Simulated annealing is a stochastic optimization method that gradually reduces the probability of accepting worse solutions to escape local optima.

Which Manning books explain simulated annealing?

Advanced Algorithms and Data Structures, Optimization Algorithms: AI techniques for design, planning, and control problems and Machine Learning Algorithms in Depth.

What should I know before learning simulated annealing?

Manning books that teach simulated annealing usually introduce graph, local optimum, Traveling Salesman problem and annealing first.

What kinds of simulated annealing are there?

Kinds of simulated annealing include adaptive simulated annealing.

What is simulated annealing a kind of?

Simulated annealing is a kind of trajectory-based search. A search approach that generates a sequence of candidate states by repeatedly moving from one state to another.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.