Prompt Claude Code Claude Opus 4.8 I want to create a doodle of a simulated ant colony to observe emergent behavior and optimization. The ant colonies should use pheromone-based foraging to discovery shortest paths, and demonstrate other emergent behaviors of the colony. There will need to be diverse behaviors and some randomness to avoid the colony getting "stuck". The user should be able to see the colony physically changing, evolving, and growing over time. There should be some ability for the user to interact with the simulated world to influence the environment and thus the colony.
I want to create a doodle of a simulated ant colony to observe emergent behavior and optimization. The ant colonies should use pheromone-based foraging to discovery shortest paths, and demonstrate other emergent behaviors of the colony. There will need to be diverse behaviors and some randomness to avoid the colony getting "stuck". The user should be able to see the colony physically changing, evolving, and growing over time. There should be some ability for the user to interact with the simulated world to influence the environment and thus the colony.
No ant in here knows where the food is. The shortest path is not programmed; it's an illusion that falls out of thousands of tiny, local decisions. This is stigmergy: ants coordinate by leaving marks in the world rather than by talking to each other.
How the foraging actually works
Every ant runs the same little loop, reading only the patch of ground right in front of it:
Emergence to watch for
Play with the world
Spacepauses,Rresets, keys1–4pick a tool.