Local Search with Simulated Annealing from Scratch | by Hennie de Harder | Apr, 2023
Temperature, an important part of simulated annealing. Image by Dall-E 2.Generic Python code with 3 examplesIn some of my previous posts, I explained heuristics and how you can use them to find good quality solutions for a mathematical optimization problem. In this post, I will provide generic Python code for local search together with simulated annealing. Besides generic code, there are implementations for three classic example problems: the traveling salesman problem, the knapsack problem and the Rastrigin function.A…