Skip to content

Expansion on the Bak-Sneppen model onto 2 dimensions and 3 dimensions lattices and analysis of the resulting behaviours

Notifications You must be signed in to change notification settings

hildobby/Complex_System

Repository files navigation

Expanding and exploring the Bak-Sneppen model written in Python 3+

2 dimensions and 3 dimensions Bak-Snappen model, evaluation of the resulting model behaviour and effect of various parameters.

By: Hildebert Moulié, Philippe Nicolau, Louis Weyland & Binjie Zhou.

Project Plan

  1. Bring the 1 dimension Bak-Snappen model to 2 dimensions and 3 dimensions
  2. Evaluate different results from the model:
    • Avalanche time and compare it between several models
    • Mutation distance
    • Cluster sizes
    • Evolutionary time
  3. Test the data with the powerlaw package

Overview of some of the results

Fitness over time

Impact of percentage of empty node

Cluster size distribution for different grid sizes

Working with the repository

In order to locally gather the required packages, the following command can be called:

pip3 install -r requirements.txt

The code for the model is located in src/lattice.py and the graphs can be generated by calling the different functions in src/main.py. The file results_presentation.ipynb that was used to create the presentation of this project shows how the result figures as shown above can be generated.

Running the ./lattice.py function in the bash shell will create a Bak-Sneppen model with a grid size of 20X20 and will plot the average fitness, avalanche time, the cluster size distribution and a visualisation of the grid itself.

In main.py, various statistical analysis are generated. The various function can be called using the following command where itr represent the number of steps in the Bak-Sneppen Model:

./main.py -func function_example -itr=200

For further details please run the following command which shows which function can be called and what other paramters can be tuned from the command line:

./main.py --help

Generating the presentation from the results_presentation.ipynb Jupyter notebook

jupyter nbconvert results_presentation.ipynb --to slides --post serve

References

  • Alstott, J., Bullmore, E., & Plenz, D. (2014). powerlaw: a Python package for analysis of heavy-tailed distributions. PloS one, 9(1), e85777.
  • Bak, P., & Sneppen, K. (1993). Punctuated equilibrium and criticality in a simple model of evolution. Physical review letters, 71(24), 4083.
  • Fraiman, D. (2018). Bak-Sneppen model: Local equilibrium and critical value. Physical Review E, 97(4), 042123.
  • Paczuski, M., Maslov, S., & Bak, P. (1996). Avalanche dynamics in evolution, growth, and depinning models. Physical Review E, 53(1), 414.

About

Expansion on the Bak-Sneppen model onto 2 dimensions and 3 dimensions lattices and analysis of the resulting behaviours

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published