Skip to content

Thomick/FlowLenia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FlowLenia

Paper Website License: MIT

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.

Companion Website | Paper

Installation

Requires Python 3.10.

pip install -r requirements.txt
pip install -e .

For GPU support, follow the JAX installation instructions.

Quick Start

Basic Examples

# 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.py

Running Paper Experiments

Key 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 walls
  • experiments/mixing/ - Parameter mixing experiments
  • experiments/distribution/ - Distribution analysis
  • experiments/complexity_analysis/ - Complexity metrics
  • experiments/metamorph/ - Metamorphosis experiments
  • experiments/large_map/ - Large-scale simulations
  • experiments/switch_params/ - Parameter switching experiments

Project Structure

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

Citation

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}
}

Contact

Thomas Michel - https://thomick.github.io/

For questions or issues, please open an issue on GitHub or contact via the website above.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

This work builds upon Lenia by Bert Chan and related work on continuous cellular automata and artificial life systems.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published