O'Reilly logo

Genetic Algorithms and Machine Learning for Programmers by Frances Buontempo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Your Mission: Lay Pheromones

Real-life ants do communicate, admittedly indirectly, via pheromones in their environments. Evaporation doesn’t always take place in nature. The ant colony algorithm is inspired by this natural behavior. Many machine learning approaches are nature inspired.

The overall shape of the algorithm itself will be familiar: you start with something random—this time a path walked by fictitious ants—and iteratively improve. Your ants will leave a trail of pheromones as they explore. Over time, the previous pheromones evaporate, and the ants lay down new pheromones as they find new paths. The ants build a path one point at a time. The point can be a physical place or a state. In this chapter, the ants choose between nearby ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required