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 ...
Get Genetic Algorithms and Machine Learning for Programmers now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.