In the<unk>  <unk>  method, each point s of the search space is analogous to a state of some physical system, and the function E(s) to be minimized is analogous to the internal energy of the system in that state. The goal is to bring the system, from an arbitrary initial state, to a state with the minimum possible energy.
At each step, the<unk>  heuristic considers some neighbour s' of the current state s, and probabilistically decides between moving the system to state s' or staying put in state s.  The probabilities are chosen so that the system ultimately tends to move to states of lower energy.  Typically this step is repeated until the system reaches a state that is good enough for the application, or until a given computation budget has been exhausted.
The neighbours of each state (the candidate moves) are specified by the user, usually in an application-specific way.    For example, in the traveling<unk> lesman problem, each state is typically defined as a particular tour (a permutation of the cities to be visited); and one could define the neighbours of a tour as those tours that can be obtained from it by exchanging any pair of consecutive cities.
The probability of making the transition from the current state 
s
{\displaystyle s}
 to a candidate new state 
s
′
{\displaystyle s'}
 is specified by an acceptance probability function 
P
(
e
,
e
′
,
T
)
{\displaystyle P(e,e',T)}
, that depends on the energies 
e
=
E
(
s
)
{\displaystyle e=E(s)}
 and 
e
′
=
E
(
s
′
)
{\displaystyle e'=E(s')}
 of the two states, and on a global time-varying parameter 
T
{\displaystyle T}
 called the temperature.
One essential requirement for the probability function 
P
{\displaystyle P}
 is that it must be nonzero when 
e
′
>
e
{\displaystyle e'>e}
, meaning that the system may move to the new state even when it is worse (has a higher energy) than the current one.  It is this feature that prevents the method from becoming stuck in a local minimum—a state that is worse than the global minimum, yet better than any of its neighbours.
On the other hand, when 
T
{\displaystyle T}
 goes to zero, the probability 
P
(
e
,
e
′
,
T
)
{\displaystyle P(e,e',T)}
 must tend to zero if 
e
′
>
e
{\displaystyle e'>e}
, and to a positive value if 
e
′
<
e
{\displaystyle e'<e}
. That way, for sufficiently small values of 
T
{\displaystyle T}
, the system will increasingly favor moves that go "downhill" (to lower energy values), and avoid those that go "uphill". In particular,  when 
T
{\displaystyle T}
 becomes 0, the procedure will reduce to the greedy algorithm—which makes the move only if it goes downhill.
In the original description of<unk> , the probability 
P
(
e
,
e
′
,
T
)
{\displaystyle P(e,e',T)}
 was defined as 1 when 
e
′
<
e
{\displaystyle e'<e}
 — i.e., the procedure always moved downhill when it found a way to do so, irrespective of the temperature.  Many descriptions and implementations of<unk>  still take this condition as part of the method's definition.  However, this condition is not essential for the method to work, and one may argue that it is both counterproductive and contrary to its spirit.
The 
P
{\displaystyle P}
 function is usually chosen so that the probability of accepting a move decreases when the difference
e
′
−
e
{\displaystyle e'-e}
 increases—that is, small uphill moves are more likely than large ones.  However, this requirement is not strictly necessary, provided that the above requirements are met.
Given these properties, the evolution of the state 
s
{\displaystyle s}
 depends crucially on the temperature 
T
{\displaystyle T}
.  Roughly speaking, the evolution of 
s
{\displaystyle s}
 is sensitive to coarser energy variations when 
T
{\displaystyle T}
 is large, and to finer variations when 
T
{\displaystyle T}
 is small.
Another essential feature of the<unk>  method is that the temperature is gradually reduced as the simulation proceeds. Initially, 
T
{\displaystyle T}
 is set to a high value (or infinity), and it is decreased at each step according to some<unk>  schedule—which may be specified by the user, but must end with 
T
=
0
{\displaystyle T=0}
 towards the end of the allotted time budget.  In this way, the system is expected to wander initially towards a broad region of the search space containing good solutions, ignoring small features of the energy function; then drift towards low-energy regions that become narrower and narrower; and finally move downhill according to the steepest descent heuristic.
Example illustrating the effect of cooling schedule on the performance of<unk> .  The problem is to rearrange the pixels of an image so as to minimize a certain potential energy function, which causes similar colours to attract at short range and repel at slightly larger distance.  The elementary moves swap two adjacent pixels.  The images were obtained with fast cooling schedule (left) and slow cooling schedule (right), producing results similar to amorphous and crystalline solids, respectively.
It can be shown that for any given finite problem, the probability that the<unk>  algorithm terminates with the global optimal solution approaches 1 as the<unk>  schedule is extended. This theoretical result, however, is not particularly helpful, since the time required to ensure a significant probability of success will usually exceed the time required for a complete search of the solution space.
Simulated annealing
Kick chart
Parts-per notation
Site-directed mutagenesis
Screening template
Bottom-up proteomics
Molecular cloning
Sequencing