Official implementation of Exploring Flow-Lenia Universes with a Curiosity-driven AI Scientist: Discovering Diverse Ecosystem Dynamics (ALIFE 2025).
Flow-Lenia is a continuous cellular automaton with mass conservation and flow-based dynamics, enabling complex self-organizing patterns and artificial life simulations. This codebase implements Flow-Lenia in JAX for high-performance computation and includes all experiments from the paper, featuring Intrinsically Motivated Goal Exploration Processes (IMGEP) for automated discovery of diverse ecosystem dynamics.
Requires Python 3.10.
pip install -r requirements.txt
pip install -e .For GPU support, follow the JAX installation instructions.
# Basic Flow Lenia simulation
python examples/example_fl.py
# Flow Lenia with spatial parameters
python examples/example_flp.py
# Flow Lenia with walls/environments
python examples/example_walls.py
# Generate video from simulation
python examples/example_generate_video.pyKey experiments from the paper are located in experiments/:
- IMGEP (Curiosity-Driven Discovery):
experiments/imgep_original/,experiments/imgep_corner/
Additional experiments exploring various aspects of Flow-Lenia dynamics:
experiments/ea_walls/- Evolutionary activity with wallsexperiments/mixing/- Parameter mixing experimentsexperiments/distribution/- Distribution analysisexperiments/complexity_analysis/- Complexity metricsexperiments/metamorph/- Metamorphosis experimentsexperiments/large_map/- Large-scale simulationsexperiments/switch_params/- Parameter switching experiments
flowlenia/
├── flowlenia_vanilla.py # Basic Flow Lenia
├── flowlenia_params.py # Flow Lenia with spatial parameters
├── flowlenia_food.py # Flow Lenia with food dynamics
├── environments.py # Environment initialization utilities
├── reintegration_tracking.py # Particle reintegration mechanisms
├── utils.py # Core utilities (kernels, growth functions)
├── vizutils.py # Visualization utilities
├── simutils.py # Simulation runner and logging
├── analysis/ # Analysis tools (complexity, distribution, etc.)
├── autodisc/ # Quality-diversity algorithms (IMGEP)
└── optimization/ # Evolutionary optimization
examples/ # Example scripts
experiments/ # Paper experiments and explorations
If you use this code in your research, please cite:
@article{michel2025exploring,
title={Exploring Flow-Lenia Universes with a Curiosity-driven AI Scientist: Discovering Diverse Ecosystem Dynamics},
author={Michel, Thomas and Cvjetko, Marko and Hamon, Gautier and Oudeyer, Pierre-Yves and Moulin-Frier, Cl{\'e}ment},
journal={arXiv preprint arXiv:2505.15998},
year={2025}
}Thomas Michel - https://thomick.github.io/
For questions or issues, please open an issue on GitHub or contact via the website above.
This project is licensed under the MIT License - see the LICENSE file for details.
This work builds upon Lenia by Bert Chan and related work on continuous cellular automata and artificial life systems.