SkillAgentSearch skills...

Lenia

Time, space & state continuous cellular automaton in Uiua

Install / Use

/learn @donstenzel/Lenia
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Lenia

Lenia is a space, state and time continuous cellular automaton.

This is an implementation of it in Uiua!

Check out this website for further reading on Lenia. This page also served as my main source of information.

You can find a jupyter notebook called "From Conway to Lenia" on there, which was great to follow along.

The example uses Iris to render the simulation as it happens, thus allowing much longer and bigger ones. The performance gets worse as the world gets bigger and at some point won't be able keep up, but from testing sizes up to 500x500 work pretty well.

Pad

You can import the repo in the pad to use creatures and functions.

NOTE: I moved the literals for arrays into binary files, which are not available in the pad. You can manually upload them into the pad to get them anyway. For the following example, you would have to upload orbium.uar into a virtual directory creatures.

# Experimental!
~ "git: https://github.com/donstenzel/lenia"
  ~ Creatures Lenia

# New orbium, pad for space
Creatures!(Pad 22_22 Orbium)

# Simulate 100 frames, color with Viridis
Lenia!(C Viridis Single~Sim 100)

# Upscale
≡(▽⟜≡▽)4

This shows 100 frames of Orbium casually gliding. [Pad link]

Showcase 📷

Lenia

This is classic Lenia, showcasing continuous states, time and space.

Lenia

Orbium

The Orbium was one of the first creatures to be found inside Lenia.

Orbium

Wanderer

The Wanderer is produced using asymptotic growth. This makes the creature smoother and more defined.

Wanderer

Smooth glider spawner

This creature lives in the multi-channel extension to Lenia, where kernels have different input and output channels, producing an even more elaborate result.

Emitter

Tesselatium gyrans

This species also lives in multi-channel Lenia, and manifests in multiple different forms.

Tesselatium gyrans

These renders of Tesselatium gyrans clearly demonstrate that creatures in Lenia can possess cohesion and rigidity in their structure. Even when meeting one another, they simply bounce. They also show swarm behaviour when moving side by side.

Cohesion

Final words

I find it truly fascinating to see how complex structures like these can arise from relatively simple rules.

Writing the code for this was actually really simple. Once I had wrapped my head around what we're trying to do, implementing it in Uiua was a breeze. It really excels at working with lots of inputs in parallel. In particular, implementing further 'upgrades' like multiple rings in the kernel, multiple kernels and multiple channels were all easily done.

Related Skills

View on GitHub
GitHub Stars5
CategoryDevelopment
Updated6mo ago
Forks0

Security Score

62/100

Audited on Sep 24, 2025

No findings