A simple evolution simulator
Project description
blossom
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 basic simulation
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file blossom-2.0.0.tar.gz
.
File metadata
- Download URL: blossom-2.0.0.tar.gz
- Upload date:
- Size: 24.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cc447de539e158427b4b93d4b9fc458ab2a0825418786aab0419e64eca54c2a |
|
MD5 | f8eea6bb9400c36e9669e29b2d7473d6 |
|
BLAKE2b-256 | e3554e70a64bb8565a3ab13c4c6c682582e6238b023d24825ca9bf32487a2531 |
File details
Details for the file blossom-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: blossom-2.0.0-py3-none-any.whl
- Upload date:
- Size: 48.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bda76560bee99bbfde6ea4c7b29d445d23055b63690aec0189e68e1e2e8c7c4 |
|
MD5 | 203111e1969fda55be7e3eca28c34096 |
|
BLAKE2b-256 | 192d0702f73759be256b1d8dd78c86936e5a1de8147d378ced9070e993f1eef4 |