
Ant Colony Optimization Visualization for the Travelling Salesman Problem - jonbaer
https://jtp.io/aco-tsp/
======
account73466
If you will even need to solve TSP, this guy solved it almost optimally for
millions of cities

[http://webhotel4.ruc.dk/~keld/](http://webhotel4.ruc.dk/~keld/)

This is from my experience of dealing with it more than a decade ago.

------
toolslive
"The ACO algorithm is used to solve the problem more efficiently than a brute-
force approach". That's rather misleading as it's not a problem at all to find
a solution (fe try the nearest neighbour heuristic). The problem with TSP is
that you want to prove that your solution IS the optimum. If you're interested
in the optimum, you need something like `branch-and-bound`. Anyway, I did the
exact same visualization as part of my master's in 1996 (but using distributed
memetic algorithms iso ACO)

~~~
jeremysalwen
Obviously finding good tours with a limited computational budget is an
interesting problem[1]. So, no, it's not misleading, as this method is more
efficient at finding good tours than brute-force (as claimed), and is even
better than the NN heuristic.

[1]
[https://en.wikipedia.org/wiki/Travelling_salesman_problem#He...](https://en.wikipedia.org/wiki/Travelling_salesman_problem#Heuristic_and_approximation_algorithms)

~~~
toolslive
at least you should specify which brute force approach you're comparing it
with.

~~~
thaumasiotes
What do you imagine the different brute force approaches are? I would assume
the brute force approach is to calculate the cost of every possible route and
choose the one that had the lowest cost.

------
secretdark
Neat! A while ago I did something similar using genetic algorithms.
[https://vimeo.com/666317](https://vimeo.com/666317)

~~~
caiobegotti
"A while ago" being like 12 years was actually funny, great work, thanks for
sharing it :-)

------
MayeulC
Nice visualization! I wish there was a way to share the graphs.

An interesting thing to notice is how the previous (hard to find) optimal
solution is lost when adding a node at the opposite side of the graph (which
is far enough to be irrelevant in most cases). I would therefore just insert
the new point between the two closest nodes, and keep the same path as the
starting point for the optimization. Of course, the risk with that methodology
is to fall into a hard-to-escape local maxima.

There is probably a way to infer how much a new point will affect every given
node, so maybe a better way to proceed would be to identify those that are
likely to be affected, and only re-run the optimization from scratch for
those.

Of course, where you position the limit itself is an optimization problem...

(edit: or just persist pheromones, regardless of the new points?)

~~~
MayeulC
One idea crosses my mind: are there examples where this algorithm can pass by
a drastically better solution without finding it? Is there a way to
deterministically find these families of solutions (even if not directly the
optimal among that family?)

------
cheeko1234
Any way to run these offline?

