For a sample problem to apply the ant algorithm, we'll look at the Traveling Salesman Problem (or TSP). The goal of the TSP is to find the shortest tour through a graph using a Hamiltonian path (a path that visits each node only once). Mathematicians first studied the general TSP in the 1930s (such as Karl Menger in Vienna), though problems related to it were treated in the 1800s, particular by Irish mathematician Sir William Rowan Hamilton.
In the next section, we'll review the code to solve the TSP and then look at some sample solutions of varying sizes.
On the CD | The source code for the Ant Simulator for TSP can be found on the CD-ROM at ./software/ch4. |