1. Create population 2. While not convergence 1. Evaluate the individuals 2. Train a Bayesian/Gaussian network with the best individuals 3. Generate a new population simulating the network
which visits each of n cities exactly one, and which minimizes the total distance travelled l Inputs: l Set of cities: l Distances: l Euclidean: l Manhattan: l Solution: which cyclic permutation Π of integers from 1 to N minimizes the distance? ( ) ( ) ( ) 2 2 distance , x x y y i j i j i j c c c c c c = − + − { } 1 2 3 , , , , n C c c c c = L ( ) distance , x x y y i j i j i j c c c c c c = − + −
for each country/town/city… l The value of each position could be: l Order to visit the town l Id of the town to be visited in the turn Town (Index) 0 1 … N Order (Value) 2 1 … 5
for each country/town/city… l The value of each position could be: l Order to visit the town l Id of the town to be visited in the turn Order (Index) 0 1 … N City (Value) 2 1 … 5
Euclidean l Manhattan l Convert our data format into a distance matrix l Add the distances of the cities in the order of the individual City X Y 0 1 1 1 1 7 City 0 1 0 0 6 1 6 0