Petals in Pixels is a swarm of 400 autonomous LLM agents communicating locally in a Moore neighbourhood on a 2d grid environment. Each agent controls a 4 × 4-pixel tile on a 20 × 20 grid.
Over 10 evolution steps, neighbours exchange a coordination message, their border-pixel colours, and their coordinates. From random noise, a sunflower emerges—an inspectable, stochastic cellular automaton in motion.
Hover any tile at any evolution step to see what that agent was thinking at that step.
Below is a snapshot from step 3. The centre cell (10, 10) is outlined in blue. Yellow highlights mark the pixels it receives from its neighbours; arrows show message flow.
At each step agents are prompted with the following context:
These prompts are processed by OpenAI's o4-mini reasoning model. Running the 20 × 20 grid for ten steps produced thousands of chat completions and tens of millions of tokens and costing around $200.
This code for this piece was written in collaboration with muliple different AI models (Anthropics Claude 3.7 Sonnet through Cline and several different OpenAI models through ChatGPT)