🌿 Evolution on the Screen
This is a typical story (or use case) illustrating how the evolutionary algorithms may work in the real-world situations. For more technical discussion of this fascinating area of research you can visit the section
👉 Click here for interactive demos, algorithms and code
For those who are unfamiliar with the local mechanisms of emergent global behavior, we recommend to start with this essay below.
Introduction
This simulation explores how complex patterns and behaviors emerge from simple interactions among digital creatures on a grid. Each creature is represented by a single pixel, with colors indicating species — green for grass, red for cows, blue for wolves, and white for tigers. The color choices aren’t symbolic — they’re just meant to make everything easier to see.
At each step, a pixel is randomly selected and behaves according to species-specific rules. Cows graze on grass and reproduce. Wolves and tigers hunt cows. Predators cannot eat each other but can eliminate their rivals. If a creature can't find food or is killed, it disappears — and grass eventually regrows in its place.
Through these micro-level rules, macro-level dynamics begin to unfold: population booms and crashes, predator-prey cycles, spontaneous migrations, and even regional "cultures" of animal behavior. What begins as chaos stabilizes into surprising structures — some of which are detailed below.
This essay introduces one such scenario. The animals and their interactions are just one example — they could be replaced by economic actors, educators and students, viral particles, or digital agents. The key insight is that local rules and local interactions can drive rich, global outcomes. This framework becomes especially powerful once we introduce the ability to learn, adapt, and evolve new behaviors.
I first created this simulation nearly 30 years ago, while looking for a not-too-boring way to teach myself the C programming language. I wrote it in DOS — the command-line ancestor of Windows — without realizing that what I was building was, in essence, a form of cellular automaton. Only later did I learn that deterministic versions of such systems had been discovered at least a decade earlier. Since then, the field of cellular automata has evolved into a rich branch of evolutionary dynamics, filled with surprising scientific discoveries and a vast range of practical applications.
What follows is one of the many "dramas on the screen" that emerged from this playful experiment with simple rules and digital life.
Drama on the Screen
Everything begins with a random distribution of grass, cows, wolves, and tigers on the scene in the proportions of 60%, 30%, 5%, and 5%. As you can see, the scene appears mostly green — because there's more grass than anything else.

Now we click a start button and the evolution begins. A "golden age" for cows arrives — they consume the plentiful grass and start reproducing rapidly. Soon, the entire scene turns red because cows now dominate.

But the cows' happiness is not eternal. Wolves and tigers, whose numbers were initially very small and who, as we know, feed on cows, suddenly find themselves with an abundance of food. They start devouring cows quickly, and the cow population begins to decline. Accordingly, the populations of wolves and tigers grow, and the scene becomes covered with blue-white patches against the backdrop of green grass. Almost all the cows are eaten, and red spots are nearly gone.

And this absence of cows is what essentially marks the end of the era of wolves and tigers, because now they have nothing to eat. They can kill each other (which they do if they end up adjacent), but they cannot eat each other. As a result, famine strikes them, and they die of hunger. In their place, grass grows again, and the scene becomes green. Occasionally, one can spot individual specks of cows, wolves, and tigers, but they are very few and hard to see.

And now the most interesting part begins! Although there are very few cows, wolves, and tigers, the probability that a cow and a wolf or a cow and a tiger will end up neighboring each other is nonzero. While such cases are rare, they do occur — and this leads to the formation of structures that didn’t exist before. Initially they appear as tiny dirty spots in the clean and green savanna.

But then a miracle happens! These tiny dirty spots start growing in something really amazing! Imagine a cow whose neighbor is a wolf, and the other surrounding cells are occupied by grass. What happens when the cow is activated? It starts eating grass and reproducing. And that’s exactly what the wolf needs! It starts eating the cows and reproducing too. But now this happens locally. The cow has tasty grass in front of it and hungry wolves behind it. The wolves, in turn, have tasty cows in front of them and inedible grass behind. The cows eat grass, and the wolves eat the cows from behind. The number of cows doesn't increase because they’re eaten by the wolves, and the number of wolves also doesn’t grow, because the wolves in the rear — those with no access to cows — die of hunger and turn into grass. As a result, this entire red-blue front moves forward, growing in size, but almost without changing its circular shape. This takes form of concentric waves expanding outwards. Packs of wolves drive herds of cows across the prairie. The exact same thing happens with cows and tigers. Packs of tigers drive herds of cows across the prairie.

These separate moving structures (cow herds driven by wolves and cow herds driven by tigers) turn out to be sufficient — they move across the scene in different directions and sometimes collide. The most interesting thing happens when herds driven by different predators — wolves and tigers — collide. Recall that wolves and tigers are bitter enemies, as they compete for the same resource: cows. Therefore, when they meet, they kill each other. And this is what we clearly observe in some parts of the image below

As a result of these constant skirmishes, the territory gets divided into zones of influence. Some areas are controlled by wolves, and others by tigers. Each predator herds its own cows. Skirmishes still happen at the borders of these zones, but they are localized, while inside each zone — everything is calm. Animal husbandry flourishes. These zones of influence are clearly distinguishable by color in the image — some with a bluish tint, others with an orange one.

Conclusion
This scenario — with cows, grass, wolves, and tigers — is just one example. In reality, these colored creatures can be replaced by any kind of interacting entities: business owners and consumers, students and advisors, governments and populations, even countries in conflict or communities during an epidemic.
Their behaviors can be collaborative, competitive, supportive, or aggressive. Interactions can be local (adjacent pixels) or remote (influences from afar), synchronous or asynchronous. What you see here is a visual and conceptual playground for exploring the rules of evolutionary dynamics.
I’ll be posting more examples soon — including the spread of diseases, formation of social communities, or territorial conflict between nation-states. Eventually, I’ll also share an interactive simulation tool where you can set the rules, define the species or roles, and experiment with different dynamics yourself.
The most fascinating direction, though, is what happens when we let these entities learn, adapt, and even evolve intelligence based on their experiences. That’s coming soon. Stay tuned!