mutare
mutare (Latin for "to change") is a simple tool to simulate and analyze a stochastic agent-based model of adaptation in uncertain environments.
Overview
mutare simulates a stochastic agent-based model of adaptation in uncertain environments with the following characteristics:
- The environment is a discrete random variable with
n_envpossible states and follows a Markov chain with configurable transition probabilities (prob_env). - Each agent carries a phenotype, a discrete variable with
n_phepossible states, and a probability distribution over phenotypes. - At every simulation step, agents may replicate or decease according to environment and phenotype specific probabilities (
prob_repandprob_dec). - The offspring's phenotype is sampled from the parent's distribution, and its distribution is the parent's one with a slight mutation (modulated by
std_dev_mut). - The simulation state is saved every
steps_per_savesteps, andsaves_per_filestates are stored in each trajectory file.
From these trajectories mutare can compute metrics such as:
- The probability of finding the system in each environment.
- The average probability distribution over phenotypes across agents.
- The net change in the number of agents per step.
Getting Started
Installation
Or clone the repository:
Basic Usage
Run mutare --help to see available commands. They can be used as follows:
Configuration
Each simulation requires a configuration file named config.msgpack, located inside the simulation directory.
This file is not generated by mutare, but instead is expected to be created externally. You can use a Python script to do so like this:
=
Documentation
Full documentation is available via:
License
This project is licensed under the MIT License.
Contact
For questions or collaboration, reach out to marcomc@ucm.es or open an issue on GitHub.