title: Fitness function in genetic algorithm for the travelling salesman
body: <p>I'm trying to write a genetic algorithm for the Travelling Salesman Problem (TSP). For selection I'm implementing Roulette Wheel Selection: <a href="http://www.edc.ncl.ac.uk/highlight/rhjanuary2007g02.php/" rel="nofollow">http://www.edc.ncl.ac.uk/highlight/rhjanuary2007g02.php/</a>  </p>
  
  <p>It basicaly means that the probability to be selected for mating is proportional to the value of the fitness function.<br>
  The most common fitness function for TSP is the length of the route. However, the 'shorter' the route is - the better.</p>
  
  <p>How can I write a fitness function that will describe the shortness of the route?<br>
  Or how can I convert the true length of each route to a probability?</p>