This site requires JavaScript, please enable it in your browser!
Greenfoot back
blankaex
blankaex wrote ...

2014/5/6

The Travelling Salesman Problem

blankaex blankaex

2014/5/6

#
I'm trying to make a program that can solve the travelling salesman problem. I have the basic skeleton of the program with a class for cities, and a bunch of generated instances. How do I go about implementing the logic and the solution? I have a general idea on the concept, such as a boolean to declare whether or not a city has been visited, and things to do with the nearest neighbour algorithm and brute-force method, but I don't really know how to write that into greenfoot. Where should I go from here?
You need to login to post a reply.