Question

I want to use simulated annealing for different situations. Every simulated annealing algorithm in net provides the algorithm with the temperature example. Like in wiki

s ← s0; e ← E(s)                                  // Initial state, energy.
sbest ← s; ebest ← e                              // Initial "best" solution
k ← 0                                             // Energy evaluation count.
while k < kmax and e > emax                       // While time left & not good enough:
 T ← temperature(k/kmax)                         // Temperature calculation.
 snew ← neighbour(s)                             // Pick some neighbour.
 enew ← E(snew)                                  // Compute its energy.
 if P(e, enew, T) > random() then                // Should we move to it?
  s ← snew; e ← enew                            // Yes, change state.
 if enew < ebest then                            // Is this a new best?
   sbest ← snew; ebest ← enew                    // Save 'new neighbour' to 'best found'.
 k ← k + 1                                       // One more evaluation done
return sbest                                      // Return the best solution found.

Now what is this 'T' represent in general? Suppose I will use simulated annealing to chess.I will use this algorithm to find next move for computer. I've current state(S) and it's value(e). I've next states(snew) and their values(enew). Then what will be 'T' for chess? Do I need it! Is there any general form for this algorithm? I mean without this temperature example where I can get the basic idea! I can't find any. Please help. Thanks in advance......

Was it helpful?

Solution

All examples on the net use the temperature example because that is the standard terminology for simulated annealing-- SA is a physics-inspired technique, modeled after a real-world phenomenon called annealing. It is much the same as how all examples for genetic algorithms talk about genes and chromosomes.

If you trace the mathematics back far enough, there are some fascinating connections between various optimization meta-heuristics and some physical processes, usually bridged by the notion of entropy.

But, in very rough terms, the temperature T in simulated annealing corresponds to the willingness or ability of the algorithm to "jump" out of a local minimum in the search for a global (or at least, better local) minimum. High temperatures correspond to higher randomness, jump around more, and may even end up in worse configurations; low temperatures correspond to lower randomness (and eventually purely greedy algorithms) and cannot escape any local minima no matter how shallow.

As to how to use that idea for your applications, well. It takes some insight and some creativity in order to get most metaheuristics to work right. ut you're never going to find a discussion of SA that doesn't talk about temperature.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top