it is guaranteed to never be 0 because it always contains all cities so it will always travel something unless there are no cities or when all cities are in the same place (in which case the task to solve is senseless).
I'll create an array containing all finesses and try sorting using that. And bearophile, you're right. it was supposed to be a very quick program just for fun to see how powerful genetics can be. (read about them yesterday.Never looked at a complete implementation and I'm trying to see how far I'd get with some simple rules. My cross over function isn't really that good...) I really dislike contracts, they kind off blow your function up while adding not that much. I'll add some unit tests.