static void Main(string[] args) { var cr = new CityReader(); int numTours = 30; int numTrials = 10000; try { Tour tour = new Tour(cr.readCities(@"C:\Users\Rob\workspace\TravelingSalesman\files\30cities.txt")); GeneticAlgorithm mutate = new GeneticAlgorithm(); GeneticAlgorithm crossover = new GeneticAlgorithm(); mutate.setAllTours(tour.seed(numTours)); for (int i = 0; i < numTrials; i++) { mutate.setAllTours(mutate.GenerateGeneration(true)); } crossover.setAllTours(tour.seed(numTours)); for (int i = 0; i < numTrials; i++) { crossover.setAllTours(crossover.GenerateGeneration(true)); } Console.WriteLine("The results from Mutation Genetic Algorithm"); Console.WriteLine("best distance: " + mutate.getAllTours()[0].getDistance()); Console.WriteLine("Path: " + mutate.getAllTours()[0].ToString()); Console.WriteLine(""); Console.WriteLine("The results from Crossover Genetic Algorithm"); Console.WriteLine("best distance: " + crossover.getAllTours()[0].getDistance()); Console.WriteLine("Path: " + crossover.getAllTours()[0].ToString()); } catch (Exception e) { Console.WriteLine(e.Message); } }