Understanding simulated annealing
SA is the heuristic search method that is inspired by the process of metal annealing in metallurgy. This method is similar to the random search hyperparameter tuning method (see Chapter 3, Exploring Exhaustive Search), except for the existence of a criterion that guides how the hyperparameter tuning process works. In other words, SA is like a smoothed version of random search. Just like random search, it is suggested to use SA when each trial doesn’t take too much time and you have enough computational resources.
In the metal annealing process, the metal is heated to a very high temperature for a certain time and slowly cooled to increase its strength, reducing its hardness and making it easier to work with. The goal of giving a very high heat is to excite the metal’s atoms so that they can move around freely and randomly. During this random movement, atoms usually tend to form a better configuration. Then, the slow cooling process...