Introduction
Was described by Scott Kirkpatrick, C. Daniel Gelatt and Mario P. Vecchi in 1983
An engineer from General Motors applied this algorithm to their production.
The cost of production for each automobile felt around $20.
It saved millions of dollars annually.
A hill climber algorithm will simply accept neighbour solutions that are better than the current solution.
When the hill climber can't find any better neighbours, it stops.
Simulated annealing works slightly differently than this and will occasionally accept worse solutions.
function SA(problem, schema) ret (solution_status)
current_status:= INITIAL_STATUS(problem);
T:= initial_temp(schema); top:=num_iterations(schema); t:=0;
repeat
inner_status:= current_status; it:=0;
repeat
next := random_event (inner_status);
AE := value(next) – value(inner_status);
if <0 then inner_status:=next;
else q:=min{1, e-/T};
if random(0,1)<q then inner_status:=next;
it:= it+1;
until it=top;
current_status:= inner_status; T:=COOL(T, schema); t:=t+1;
until T0
ret current_status;