There exist many computational intelligence algorithms based on the observation that ants deposit pheromones in such a way that they find the shortest path to food sources. This logic is used to optimize computer networks.

I cant really relate to that. I have seen ants take an extremely long path to food. This is not always for safety reasons either. What do biologists have to say about this?

  • $\begingroup$ Look on Wikipedia for "ant mill", or YouTube for "ant death spiral" and you will find they make paths that are not only sub-optimal, but are in fact invalid paths altogether. $\endgroup$ Commented Aug 4, 2017 at 19:18

1 Answer 1


Short answer

Do ants really find the shortest path to a food source?

No! But they can find a decent path

Longer answer

Optimization algorithms are used to search through a possibility space that is too large to explore every single possibility. Such algorithms attempt to find a good enough solution, often without necessarily knowing how 'good' the found solution is to the best possible solution. So optimization algorithms don't always find the best solution. Actually, most of the time, they do not find the best path but a good enough one in a reasonable amount of time.

Same holds true for ants. In the analogy, an ant colony is an agent based algorithm where agents leave pheromone trails. The concentration of the pheromone depends upon the length of the trail. By following the trails that smells the strongest and by regularly making small errors (so that they can keep exploring other paths), they end up with a decent solution. For more info, just google How do ants find their path?.

  • 2
    $\begingroup$ @Ooker How do you judge what path to take to places? I think you'll find that you don't relate it to the "best" path (which you might not know) but to the situation instead, such as "is it okay to spend this amount of time". $\endgroup$
    – Pimgd
    Commented Aug 4, 2017 at 11:45
  • 2
    $\begingroup$ Similarly, when you take your car to go to some place, the path you take is generally "good enough" and not the best. It is good enough because it takes a reasonable time to go to destination... $\endgroup$ Commented Aug 4, 2017 at 11:47
  • 2
    $\begingroup$ @Remi.b "Such algorithms attempt to find a good enough solution usually without ever knowing how 'good' the found solution is to the best possible solution." - Optimization problems do in fact (generally) know what the true solution is, however, can't always acheive this through calculation. When implementing an optimization function, there is generally some epsilon that is defined, to where if the error of the computed solution is less than epsilon, then the optimization algorithm's solution will be accepted as "close enough". $\endgroup$
    – user22020
    Commented Aug 4, 2017 at 12:57
  • 2
    $\begingroup$ @Remi.b If an optimization algorithm isn't aware of the true solution that it's trying to acheive, then it has no way of validating a potential solution. I will admit, there definitely are many cases where no true solution is known, however, this is much more prevalent in theoretical work, as apposed to the much more practiced, applied computational approaches. $\endgroup$
    – user22020
    Commented Aug 4, 2017 at 13:04
  • 9
    $\begingroup$ @Charles I don't agree. You can test the strength of a solution against other possible solutions. You don't need to know the distance of the best route possible to a location, if you work out 1,000 potential routes and then take the shortest of those $\endgroup$
    – Tom Bowen
    Commented Aug 4, 2017 at 14:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .