gitmyhub

Lenia

Python ★ 3.8k updated 1y ago

Lenia - Mathematical Life Forms

Lenia is a research simulation of artificial life forms using continuous cellular automata, fluid, organic shapes that move and evolve, backed by academic papers and available in Python with GPU support, JavaScript, MATLAB, Jupyter, and R.

PythonJavaScriptMATLABJupyterRsetup: moderatecomplexity 4/5

Lenia is a research project exploring artificial life forms generated by a type of simulation called a cellular automaton. A cellular automaton is a grid where each cell has a value and updates itself each step based on the values of its neighbors. Classic examples like Conway's Game of Life use simple on/off cells with rigid rules. Lenia extends that idea into continuous space and time, meaning cell values are smooth numbers rather than binary, and patterns can move, grow, and evolve in fluid, organic-looking ways. The result is a large variety of moving shapes that the author calls life forms.

The repository contains several versions of the simulation. The Python version is the fastest and supports GPU acceleration for running larger or more complex patterns in real time. It also includes multi-kernel and multi-channel extensions that allow more intricate life forms. A Matlab version offers statistical analysis tools but requires a paid Matlab license. A JavaScript version runs directly in the browser without any installation, though it is slower. Jupyter and R versions are also included but are non-interactive and intended only for demonstration.

The project has academic backing. Research papers published in the Complex Systems journal and presented at the ALIFE 2020 conference describe the theory behind Lenia and its expanded universe of patterns, including life forms discovered in three and four dimensions. Links to those papers and companion videos on YouTube and Vimeo are in the README.

To see the most advanced patterns in the Python version, the README suggests running the script with specific command-line flags for three channels and three kernels, then pressing a key to load a preset pattern. No detailed installation steps are given beyond the note that Python 3 and various libraries are required.

Where it fits