Skip to content

Commit eab5108

Browse files
committed
merge
2 parents 07d4c7b + cc433f3 commit eab5108

File tree

3 files changed

+32
-142
lines changed

3 files changed

+32
-142
lines changed

README.md

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,38 @@
1-
# Complex System Simulation: Expanding and exploring the Bak-Snappen model
1+
Expanding and exploring the Bak-Sneppen model written in Python 3+
2+
=========================================
23

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

56
By: [Hildebert Moulié](https://github.com/hildobby), [Philippe Nicolau](https://github.com/PNicolau96), [Louis Weyland](https://github.com/LouisWW) & [Binjie Zhou](https://github.com/binjiezhou).
67

7-
## Setup required packages
8+
<p float="left" class="center">
9+
<img src="https://github.com/hildobby/Complex_System/blob/master/src/figures/lattice_itr%3D1.png" width="400" />
10+
<img src="https://github.com/hildobby/Complex_System/blob/master/src/figures/lattice-age_itr%3D2000.png" width="400" />
11+
</p>
12+
13+
## Project Plan
14+
15+
1. Bring the 1 dimension Bak-Snappen model to 2 dimensions and 3 dimensions
16+
2. Evaluate different results from the model:
17+
* Avalanche time and compare it between several models
18+
* Mutation distance
19+
* Cluster sizes
20+
* Evolutionary time
21+
3. Test the data with the [powerlaw](https://pypi.org/project/powerlaw/) package
22+
23+
## Overview of some of the results
24+
25+
### Fitness over time
26+
![Fitness over time](https://github.com/hildobby/Complex_System/blob/master/src/figures/average_fitness_s%3D(20%2C%2020)_itr%3D2000_rep%3D10_std%3D0.3.png)
27+
28+
### Impact of percentage of empty node
29+
![Impact of percentage of empty node](https://github.com/hildobby/Complex_System/blob/master/presentation_content/images/emptynode1.png)
30+
31+
32+
### Cluster size distribution for different grid sizes
33+
![Cluster size distribution for different grid sizes](https://github.com/hildobby/Complex_System/blob/master/src/figures/)
34+
35+
## Working with the repository
836

937
Gathering the required packages
1038
```
@@ -21,27 +49,9 @@ Generating the presentation from the `results_presentation.ipynb` Jupyter notebo
2149
jupyter nbconvert results_presentation.ipynb --to slides --post serve
2250
```
2351

24-
An overview of the results can also be found in [the Jupyter notebook file](https://github.com/hildobby/Complex_System/blob/master/results_overview.ipynb) named `results_overview.ipynb`.
25-
26-
## Project Plan
27-
28-
1. Bring the 1 dimension Bak-Snappen model to 2 dimensions and 3 dimensions
29-
2. Evaluate different results from the model:
30-
* Avalanche time and compare it between several models
31-
* Mutation distance (Check if power still applies here)
32-
* Cluster sizes
33-
* Evolutionary time
34-
3. Test the data withe the [powerlaw](https://pypi.org/project/powerlaw/) package
35-
36-
37-
38-
## An overview of some of the results
39-
40-
41-
4252
## References
4353

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

results_overview.ipynb

Lines changed: 0 additions & 107 deletions
This file was deleted.

src/lattice.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -553,16 +553,3 @@ def get_clusters(self):
553553
plt.savefig(path.join(dir_path, 'figures/lattice-age_itr={}.png'.format(iterations)), dpi=300)
554554
#
555555

556-
"""
557-
number_of_frames = 2000
558-
def update_hist(num):
559-
plt.cla()
560-
plt.hist(np.concatenate([lattice.cluster_size[num][x] for x in lattice.cluster_size[num]]),bins=50)
561-
562-
563-
fig = plt.figure()
564-
hist = plt.hist(np.concatenate([lattice.cluster_size[0][x] for x in lattice.cluster_size[0]]),bins=50)
565-
566-
animation = animation.FuncAnimation(fig, update_hist, number_of_frames,interval=20)
567-
plt.show()
568-
"""

0 commit comments

Comments
 (0)