What is Simulated Annealing？
Simulated Annealing (SA) is an optimization algorithm that simulates the cooling process of a solid and is derived from the principle of solid annealing. The basic principle is to heat the solid to a sufficiently high temperature and then let it cool down slowly. When the solid is heated, the internal particles become disordered with the temperature rise, and the internal energy increases; while the particles become orderly when cooling, and reach equilibrium at each temperature, and finally reach the ground state at room temperature, and the internal energy is minimized.
The principle of the simulated annealing algorithm can be divided into two parts: the Metropolis algorithm and the annealing process. In the annealing process, the algorithm starts from a certain higher initial temperature, accompanied by the decreasing temperature parameter, and combines the probabilistic jump property to randomly search for the global optimal solution of the objective function in the solution space. In this way, the local optimal solution can probabilistically jump out and eventually converge to the global optimum, thus effectively avoiding falling into the local minima and eventually converge to the global optimum.
The specific steps of the simulated annealing algorithm are as follows:
1、Initialization: set the initial temperature, initial solution and cooling parameters.
2、Evaluation：Calculate the objective function value of the current solution.
3、Perturbation: generate a new solution according to certain probability and rules.
4、Accept/Reject：According to the Metropolis criterion, determine whether the new solution is accepted or rejected.
5、Cooling down: reduce the temperature to the next temperature level. Repeat steps 2-5 until the termination condition is met.
Simulated annealing algorithm has applications in many fields such as machine learning, optimization problems, image processing, etc. It is a global search algorithm that can be used to solve some nonlinear, discrete or continuous optimization problems. Compared with other optimization algorithms, the simulated annealing algorithm has better robustness and generality, and can avoid falling into local optimal solutions.