Skip to content

Instantly share code, notes, and snippets.

@ocharles
Created April 24, 2009 02:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ocharles/100889 to your computer and use it in GitHub Desktop.
Save ocharles/100889 to your computer and use it in GitHub Desktop.
[ollie@ollie-desktop tsp (master)]$ perl tsp.pl lol
Attempting to calculate best root between 3 cities.
Stopping after 10 stable runs.
Best distance | Route
.---------------+----------------.
| 7.09 | 1 -> 0 -> 2 |
| 7.09 | 1 -> 0 -> 2 |
| 6.86 | 0 -> 1 -> 2 |
| 6.86 | 0 -> 1 -> 2 |
| 5.97 | 2 -> 0 -> 1 |
| 5.97 | 2 -> 0 -> 1 |
| 5.97 | 2 -> 0 -> 1 |
| 5.97 | 2 -> 0 -> 1 |
| 5.97 | 2 -> 0 -> 1 |
| 5.97 | 2 -> 0 -> 1 |
| 5.97 | 2 -> 0 -> 1 |
| 5.97 | 2 -> 0 -> 1 |
| 5.97 | 2 -> 0 -> 1 |
| 5.97 | 2 -> 0 -> 1 |
| 5.97 | 2 -> 0 -> 1 |
'---------------+----------------'
Best route (remained stable): 2 -> 0 -> 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment