We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionExhibition › 3D Travelling Salesman with Genetic Algorithm
Page Index Toggle Pages: 1
3D Travelling Salesman with Genetic Algorithm (Read 914 times)
3D Travelling Salesman with Genetic Algorithm
Feb 6th, 2008, 9:15pm
 
The Travelling salesman problem is stated as: "Given a number of cities and the costs of travelling from any city to any other city, what is the least-cost round-trip route that visits each city exactly once?"

I used the open source classes listed at the link below to create a Processing program that would solve the Travelling saleman problem using Genetic algorithms. Re-used paths (corresponding to Chromosomes) increase in visibility as they're re-used, fading otherwise, meaning the paths 'emerge' as certain chromosomes become more dominant.

A video of the program is visible at: http://www.vimeo.com/666317

The problem is considered 'solved' when a hundred generations have passed without a more optimal solution having been found.

I also made the problem 3D, simply because... well, everything looks nicer in 3D and, to be honest, it was incredibly easy to create a Processing version, given the classes I used from the link below so I wanted to add something else. I would've made this a lot prettier but I'm running out of free/unemployed time as I start a new job soon, so I got it working and left it.

Genetic Algorithm classes: http://www.heatonresearch.com
Travelling Salesman: http://en.wikipedia.org/wiki/Traveling_salesman_problem
Page Index Toggle Pages: 1