Emergent Microcosms 🌎💻

Time to think about snippets of computer code that can generate complex + delightful virtual worlds.

This playful approach to emergence—algorithms that can unfurl entire virtual universes—are essentially “Emergent Microcosms”


“Emergent Microcosms” is a fuzzy category and I’m still thinking about it, but with its roots in artificial life, this space spans ALife, complexity science, simulation, and creative coding. And it’s amazing.

(LLMs + AI art are all the rage, but we’ve forgotten this space!)


Here are a few major areas where emergent microcosms are found:

🦠 Cellular automata
⏳ Falling-sand games
🔷 Physics-based simulations, eg rigid body and particle simulators

You also see emergent microcosms using such techniques as:

🎮 Shaders
🕸️ Agent-based models
🦤 Evolutionary computation
🌱 L-systems

(Note: this is more than just complex visuals, such as fractals; there needs to be a dynamic and emergent quality)

The granddaddy of these kinds of creative coding programs is John Horton Conway’s Game of Life, a class of cellular automaton (CA) that involves a grid with rules for how squares change from one timestep to the next.

But there has been so much innovation in the CA world at the intersection of ALife, most wonderfully with Lenia, by @BertChakovsky:

Lenia has an entire bestiary of “creatures” discovered within its virtual world, from orbium to Quadridae gyrans


There is also some amazing work being done by @slackermanz focused on Multiple Neighborhood Cellular Automata:

(PS cellular automata can work well when implemented as shaders)


Here’s an open-ended CA where you can specify the rules by writing your own code:

Falling-sand games are close cousins of CA, but allow the user to paint and play with different types of particles:

For example, check out @MaxBittker’s Sandspiel:


Here’s a programmable version of Sandspiel!

This allows the user to easily code bespoke emergent microcosms.

Sandpond is another example of falling-sand games, but in 3D (made by @todepond):


Another project by @maxbittker is Orb.Farm, which is a tiny self-contained aquatic ecosystem, which combines ecology and complex systems with falling-sand games:

In an entirely different realm, there is the demoscene (+ code golf world I suppose), devoted to creating mind-blowing demos in tiny computer programs:

There are L-systems, which use a recursively executed ruleset to generate plant-like structures:

Here’s an exploration into building a procedurally generated world, using voxels:

Physics simulations, including particle systems and rigid body simulations, can also be used to develop emergent microcosms.

An early system that allowed for the creation of a whole host of “creatures” was Soda Constructor:


Soda Constructor is now defunct, but you can play with a web-based open source version here:

LiquidFun is a physics simulation library from Google:


Systems of particles can do lots of things, including demonstrating flocking, swarming, and other collective behaviors:


Examples from the agent-based model world, some of which are more emergent microcosms than others, can be found here:

(And many of these are also much smaller and simpler microcosms)

Here’s a “primordial particle system” that uses a small set of rules in an agent-based system to yield some delightful complexity:


Related to biology, here’s a great example of an emergent microcosm that relies on digital evolution by @JJVentrella:


There are also mechanisms for combing biological inspiration with CA, such as "Neural Cellular Automata"


More broadly, I recommend checking out the work of evolving “organisms” in silico to do a whole variety of things:

- @DoctorJosh:
- @ncheney_and_lab:
- @drmichaellevin:

Games are also great environments for creating emergent microcosms (eg via procedural generation).

Note: boundary is fuzzy, as many games use some of this (such as roguelikes), but might not fully count as an emergent microcosm.

Nevertheless, here are some examples from the gaming world that could reasonably count as emergent microcosms:

- SimLife
- Spore
- No Man's Sky
- Noita

(note: the Falling Everything engine for Noita combines falling sand and rigid bodies: )

Want to know how to make some of these?

Processing is a great language for programming these kinds of emergent microcosms. @ProcessingOrg


If you want to see lots of fantastic examples for Processing, @thecodingtrain by @shiffman is amazing:

. @GalaxyKate has done also some great work here:

For, example, see this tutorial:

"The Computational Beauty of Nature: Computer Explorations of Fractals, Chaos, Complex Systems, and Adaptation" by @flakenstein is a useful classic:

I also highly recommend thinking about open-endedness.

For example, check out this by @kenneth0stanley, @joelbot3000, and @err_more:

There is so much more, particularly since this has such a fuzzy and fractal boundary, but here are a couple more philosophical essays I wrote related to unspooling computational worlds:

Anyway, there is a lot I've left out, but please send me more examples of emergent microcosms!

I’m always looking for the holy grail here, a sort of computational Standard Model for a digital cosmos.

And if you enjoyed this, please feel free to sign up for my newsletter:

The thread on emergent microcosms is now an essay:


Recommended by
Recommendations from around the web and our community.

AWESOME thread on COMPUTATION x BIOLOGY from Lux's @arbesman

Wonderful thread and instafollow. Plus I’m old enough to have Stephen Wolfram’s book on my desk (and even read a lot of it).