Introduction
In chapter 6, “Understanding Genetic Algorithms,” you were introduced to genetic algorithms and how they can be used to train a neural network. In this chapter you will learn about another popular algorithm you can use, simulated annealing. As you will see, it can also be applied to other situations.
The sample program that will be presented in this chapter solves the traveling salesman problem, as did the genetic algorithm in chapter 6. However, in this program, simulated annealing will be used in place of the genetic algorithm. This will allow you to see some of the advantages that simulated annealing offers over a genetic algorithm.
We will begin with a general background of the simulated annealing process. We will then construct a class that is capable of using simulated annealing to solve the traveling salesman problem. Finally, we will explore how simulated annealing can be used to train a neural network.
