Both Wikipedia and this site describe a similar step in the Simulated Annealing algorithm, which I've picked out here:
Wikipedia:
if P(e, enew, temp(k/kmax)) > random() then // Should we move to it?
s ← snew; e ← enew // Yes, change state.
Yuval Baror, regarding the Eight Queens puzzle:
If moving the queen to the new column will reduce the number of attacked
queens on the board, the move is taken. Otherwise, the move is taken only
with a certain probability, which decreases over time.
Hence early on the algorithm will tend to take moves even if they
don't improve the situation. Later on, the algorithm will only make moves
which improve the situation on the board.
My question is: what does this random move achieve?