https://github.com/blossom-evolution/blossom
A Python package for simulating the evolution of organisms.
https://github.com/blossom-evolution/blossom
population-simulation simulation species
Last synced: 10 days ago
JSON representation
A Python package for simulating the evolution of organisms.
- Host: GitHub
- URL: https://github.com/blossom-evolution/blossom
- Owner: blossom-evolution
- License: mit
- Created: 2018-02-03T00:55:04.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2024-04-22T21:01:28.000Z (almost 2 years ago)
- Last Synced: 2026-01-03T20:43:31.704Z (21 days ago)
- Topics: population-simulation, simulation, species
- Language: Python
- Homepage: https://blossom.readthedocs.io
- Size: 32.5 MB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# blossom [](https://badge.fury.io/py/blossom) [](https://blossom.readthedocs.io/en/latest/?badge=latest)
Blossom is a Python package for simulating the dynamics of organism populations. Blossom supports both one and two dimensional worlds.
## Installation
You can use pip to install the latest version of the package automatically:
```
pip install blossom
```
Alternately, execute:
```
git clone git@github.com:blossom-evolution/blossom.git
python setup.py install
```
## Basic Usage
To start a simulation project, create a new directory to house all custom
scripts, including a configuration file `config.yml`. In this config file, you
specify species parameters, including starting population, max age, and action
methods. Some action methods are built-in (for movement, eating, drinking, and
reproduction), but you may use custom methods defined in external Python
scripts, which are imported at runtime by Blossom via `linked_modules`.
World parameters are also specified in the config file, including dimensions
and the distribution of water and food. You may also set limits on the number
of timesteps and organisms, in order to control the simulation in case of
runaway populations.
With your project directory set up, you may run the simulation using the
included command-line interface (CLI):
```
blossom run
```
Note that for reproducibility, you can set the random seed either in the config
file or at the CLI. For additional options, run `blossom run -h`.
## Dashboard
Blossom provides a dashboard that runs in your local browser, tracking the
progress of your population runs.
Initiate the dashboard, run
```
blossom dashboard TRACK_DIR [-p PORT]
```
where `TRACK_DIR` is the simulation project directory. You can then view the
dashboard at `localhost:PORT`.

## GIF of Simple 100 x 100 Simulation
