I think my head is full of ants

As many of my students can attest, I’ve always loved emergent behavior where you have a whole bunch of “stupid” agents working with simple rules, but the end result is amazingly complex and wondrous. There are termites, for example, that by following simple rules (and with no “leader” in charge) manage to build large mounds with extraordinarily precise climate control in certain chambers where they farm special fungi. If you held a gun to my head and told me to use dirt, sticks, and other bits lying around to build a chamber that would be nearly constant temperature day and night, winter and summer, I’d have to tell you to pull the trigger. Yet these insects, with no blueprint or foreman, pull it off over and over again across thousands of years. (Doesn’t evolution just rock!)

No surprise, then, that I was smitten with this recent TED video (of a talk from four years ago) where Deborah Gordon talks about her research into how ants figure out how to allocate tasks (i.e., who does what when).

If you want to play with this sort of thing, I recommend both NetLogo and Breve, as well as this cool Breve-based screensaver, which evolves walking creatures while you’re momentarily distracted from your random web surfing. Both NetLogo and Breve can happily suck up way too much of your life (there are literally days to be spent playing with all the canned models in NetLogo), but it’s great fun, and working with tools like this can really help build your intuition for how complex systems of agents can work.

Below the fold I list some of my favorite NetLogo simulations that I often use in demos.

  • The termite simulation. This is probably my favorite because it’s easy to explain and has a cool and non-obvious outcome. I would often set up a scenario (lots of little autonomous robots collecting ice or mineral deposits on Mars), and ask people to suggest a set of rules that they might use to get the set of robots to bring everything to a single location. Then I explain the two simple rules this system uses, and show them the behavior. They are usually interested and impressed. (The Painted Desert demo is a nice extension of the earlier Termites model.)
  • Wolf-Sheep predation. This is probably my other favorite for demos. I’d start it up (with the grass turned “on”) when there was some dead time and no one was around, and let it run for a long time in its stable state. Then when someone would show up I’d explain the simulation while it’s still running and we’d talk about the fact that things were fairly stable. Then I’d ask them what they thought would happen if I turned the grass “off” (i.e., made it so there was an infinite amount of grass all the time). Then we’d turn it off and watch the system crash, which tended to get people’s attention. It’s also a nice example of how a small change can really throw off a dynamic system.
  • Ants – People always like food foraging, and playing with the settings on the pheromones is a nice way of showing how small changes can really affect the behavior of the system.
  • Bug Hunt Speed – A neat, simple demonstration of evolution at work. And you can let the kids do the bug catching for you, which helps them get involved.
  • AIDS and Virus – Both suggest how these ideas could be used in “real world” settings (such as public health policy). You have to be careful how you interpret results from a model like that, but they can be great intuition builders.
  • Fireflies – Simple rules leading to coordinated behavior without anyone “in charge”.
  • Flocking is always fun, and one of the applications that people are the most familiar with (even if they don’t realize it). Flocking algorithms like this are widely used in the film industry to provide lifelike behavior to large groups of computer generated individuals (birds, soldiers, insects). Breve will also do some very cool flocking behavior in 3D.
This entry was posted in Science, Video and tagged , , , , , , , . Bookmark the permalink.

2 Responses to I think my head is full of ants

  1. chris says:

    i was just thinking about ants and this sort of thing because of a book i was reading. its called cradle to cradle written by an architect and a chemist about sustainable design. they said ants have colonized the world just as we have, but while we take from ecosystems they always add to them (i assume by aerating the soil and breaking down matter). and like the termites that farm fungi there are ants who use aphids as cattle. i guess we didn’t invent agriculture!

    “you have a whole bunch of “stupid” agents working with simple rules, but the end result is amazingly complex and wondrous.”

    so what kinds of things do computer scientists do w/this idea? is sort of what evolutionary computing is about? i picked up the evolution of cooperation recently (tit for tat wins prisoner’s dilemma) you must be familiar w/this, yes?

  2. Phi says:

    Cradle to cradle is a really cool book. I’ve heard McDonough speak at a (biology) conference, and it was very impressive.

    The other questions are very cool and deserve more than just a comment here, so I’ll turn that into a post shortly.

Comments are closed.