6364656667686970
cities = new City[CITIES]; for (int i = 0; i < cities.length; i++) { int xPos = (int) (Math.random() * MAP_SIZE); int yPos = (int) (Math.random() * MAP_SIZE); cities[i] = new City(xPos, yPos); } }
5253545556575859
414243444546474849505152
double result = 0.0; int[] path = (int[])genome.getOrganism(); for (int i = 0; i < cities.length - 1; i++) { City city1 = cities[path[i]]; City city2 = cities[path[i+1]]; final double dist = city1.proximity(city2); result += dist; }