Posts

Showing posts with the label ants

Global Optimization, and … Ants?

Image
“ Find the best solution ” — it’s one of those statements that can rapidly spiral into chaos depending on what exactly one means when they say “ best ”. For example, “ what is the largest number in this list? ” is easy, but “ what is the best movie of the year? ”, well, not so much, right? In math,  Global optimization  is what we call the the task of finding the best set of conditions to achieve the objective. It also happens to be one of the parts of an area called  nonlinear programming  (but that’s a different topic). It turns out that Swarm Intelligence — emergent behavior that arises from a few simple rules — is actually a pretty good way to come up with the solution. (•). It comes from the way ants search for food, and as algorithms go, it’s really quite straightforward 1. Each ant (agent) picks a random direction and heads out. 2. If it finds something, it tells its buddies, and starts bringing pieces back home. 3. If it doesn’t find anything, it ...

Building Bridges, and “Swarm Intelligence” (ant-style)

Image
I f you’ve lived in a place with ants (which is, oh, most of the world), then you’ve seen how ants build “bridges” with their own bodies. (And yeah, if you haven’t, just take a look at the video below)   It's a pretty amazing thing, and even more so given that ants are, well, not exactly the smartest creatures around. Mind you, thats “individually smart” — when you put them together you get  swarm intelligence , emergent behavior that arises from adherence to a few simple rules. In this case, it turns out that ants build bridges by following two basic rules 1. If an ant is walking on top of you, you freeze in place 2. If the number of ants walking over you dips below a certain rate, you start moving again. Yeah, there are some details like timeouts, etc, but the rules themselves are pretty simple. The fascinating part is that this also takes into account all sorts of tradeoffs, e.g.  — number of ants foraging vs “building bridges”  —  where  to build br...