complexity + leafcutters: code/improvisation

The shimmering, industrious leafcutter ants that build highways on the forest floor make up a complex adaptive system – the sophisticated structures and patterns that they build are well beyond the sum of their individual parts. The ants’ collective intelligence emerges through the repetition of simple tasks, and somehow through self-organization they build cities without architects, roads without engineers. There’s something magnetic about their energetic movement as they carve through the jungle – wherever I found them at Gamboa, I found that I could not look away.

from pipeline trail and laguna trail, Gamboa
ant, Atlas
going around the stick barrier

I altered the code from a classic NetLogo simulation to model the behavior of the leafcutters. NetLogo allows you to code agent-based models and watch them play out over time – each of the ants acts as an autonomous “agent” with a simple task to perform, and the iteration of multiple ants performing these tasks begins to simulate how the ants behave in the jungle. What starts out as random walking drifts into road-like patterns as the ants pick up pixel leaves and deliver them to their digital fungus…

Ant Tasks:
1. choose a random angle between -45 and 45 degrees
2. walk 1 unit in that direction
3. repeat.
4. IF there’s food (green leaves or pink flowers), pick it up by turning green, and deliver it back to the fungus at the center.
5. IF you sense digital pheromone (ants carrying food tag the pixels they walk over with digital “scent” as they head to the center), follow that pheromone.

The Twist: music
A symphony of digital fungus stockpiling
An audio representation of the complex patterns and surprising order that arises from randomness…

Each ant in the simulation has an ID number, and that ID number corresponds to a note on the piano. When an ant picks up a leaf and successfully brings it back to the fungus in the middle, that ant will sound its unique note. I calibrated this so that extremely low notes and extremely high notes on the scale won’t play – instead of those extremes some ants are assigned the same middle C, which you can hear throughout the simulation over and over like a drum beat…

the simulation: turn up the sound!

The ants play their own bebop, they compose their own Xenakis-like songs. No two ant improvisations will be exactly alike; whenever you run the simulation, each ant makes different random choices and the behavior of the model will be different. But they sound like they spring from the same mind:

ant improv #1
ant improv #2
the ants start searching for food
making highways
one food source left…
starting the last highway

Our minds love patterns too – I find myself cheering the ants on when I watch the simulation, rooting for them to find the next leaf, hoping for them to route into the highway pattern, waiting to hear their eerie plunking, playful jazz…

coding in the jungle – on the balcony, adopta

extensions for this project:

-there is a web extension for NetLogo, but without sound; could translate these ants into Javascript/p5.js so users can press “play” themselves online and control different variables (how many ants? speed of ants?)

-connect the MIDI sound that the ants are making to a score, print out sheet music written by the ants, play it on the piano

-make the model more complex, closer to the structure of actual leafcutter colonies: different sizes of ants, different tasks…

-interactive projection version

you got this, ant.

Thanks to everyone at Dinacon!

-Madeline Blount
http://mab.space

NetLogo citation:
Wilensky, U. (1999). NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.