Skip to content

Commit df3b9e0

Browse files
wang-boyurht
authored andcommitted
categorize example models into groups
1 parent f3dcdd7 commit df3b9e0

File tree

1 file changed

+73
-29
lines changed

1 file changed

+73
-29
lines changed

examples/README.md

Lines changed: 73 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,101 @@
11
# Example Code
22
This directory contains example models meant to test and demonstrate Mesa's features, and provide demonstrations for how to build and analyze agent-based models. For more information on each model, see its own Readme and documentation.
33

4-
## Models
4+
## Grid Space Examples
55

6-
Classic models, some of which can be found in NetLogo's/MASON's example models.
6+
### [Bank Reserves Model](https://github.com/projectmesa/mesa-examples/blob/main/examples/bank_reserves)
77

8-
### bank_reserves
98
A highly abstracted, simplified model of an economy, with only one type of agent and a single bank representing all banks in an economy.
109

11-
### color_patches
10+
### [Boltzmann Wealth Model](https://github.com/projectmesa/mesa-examples/tree/main/examples/boltzmann_wealth_model)
11+
12+
Completed code to go along with the [tutorial](https://mesa.readthedocs.io/en/latest/tutorials/intro_tutorial.html) on making a simple model of how a highly-skewed wealth distribution can emerge from simple rules.
13+
14+
### [Color Patches Model](https://github.com/projectmesa/mesa-examples/tree/main/examples/color_patches)
15+
1216
A cellular automaton model where agents opinions are influenced by that of their neighbors. As the model evolves, color patches representing the prevailing opinion in a given area expand, contract, and sometimes disappear.
1317

14-
### conways_game_of_life
18+
### [Conway's Game Of "Life" Model](https://github.com/projectmesa/mesa-examples/tree/main/examples/conways_game_of_life)
19+
1520
Implementation of [Conway's Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life), a cellular automata where simple rules can give rise to complex patterns.
1621

17-
### epstein_civil_violence
22+
### [Conway's Game Of "Life" Model on a Hexagonal Grid](https://github.com/projectmesa/mesa-examples/tree/main/examples/hex_snowflake)
23+
24+
Conway's game of life on a hexagonal grid.
25+
26+
### [Demographic Prisoner's Dilemma on a Grid](https://github.com/projectmesa/mesa-examples/tree/main/examples/pd_grid)
27+
28+
Grid-based demographic prisoner's dilemma model, demonstrating how simple rules can lead to the emergence of widespread cooperation -- and how a model activation regime can change its outcome.
29+
30+
### [Epstein Civil Violence Model](https://github.com/projectmesa/mesa-examples/tree/main/examples/epstein_civil_violence)
31+
1832
Joshua Epstein's [model](http://www.uvm.edu/~pdodds/files/papers/others/2002/epstein2002a.pdf) of how a decentralized uprising can be suppressed or reach a critical mass of support.
1933

20-
### boid_flockers
34+
### [Forest Fire Model](https://github.com/projectmesa/mesa-examples/tree/main/examples/forest_fire)
35+
36+
Simple cellular automata of a fire spreading through a forest of cells on a grid, based on the NetLogo [Fire](http://ccl.northwestern.edu/netlogo/models/Fire) model.
37+
38+
### [Hotelling's Law Model](https://github.com/projectmesa/mesa-examples/tree/main/examples/hotelling_law)
39+
40+
This project is an agent-based model implemented using the Mesa framework in Python. It simulates market dynamics based on Hotelling's Law, exploring the behavior of stores in a competitive market environment. Stores adjust their prices and locations if it's increases market share to maximize revenue, providing insights into the effects of competition and customer behavior on market outcomes.
41+
42+
### [Schelling Segregation Model](https://github.com/projectmesa/mesa-examples/tree/main/examples/schelling)
43+
44+
Mesa implementation of the classic [Schelling segregation](http://nifty.stanford.edu/2014/mccown-schelling-model-segregation/) model.
45+
46+
### [Sugarscape Constant Growback Model](https://github.com/projectmesa/mesa-examples/tree/main/examples/sugarscape_cg)
47+
48+
This is Epstein & Axtell's Sugarscape Constant Growback model, with a detailed description in the Chapter Two of *Growing Artificial Societies: Social Science from the Bottom Up*. It is based on the Netlogo
49+
[Sugarscape 2 Constant Growback](http://ccl.northwestern.edu/netlogo/models/Sugarscape2ConstantGrowback) model.
50+
51+
### [Sugarscape Constant Growback Model with Traders](https://github.com/projectmesa/mesa-examples/tree/main/examples/sugarscape_g1mt)
52+
53+
This is Epstein & Axtell's Sugarscape model with Traders, a detailed description is in Chapter four of *Growing Artificial Societies: Social Science from the Bottom Up (1996)*. The model shows an emergent price equilibrium can happen via a decentralized dynamics.
54+
55+
### [Wolf-Sheep Predation Model](https://github.com/projectmesa/mesa-examples/tree/main/examples/wolf_sheep)
56+
57+
Implementation of an ecological model of predation and reproduction, based on the NetLogo [Wolf Sheep Predation](http://ccl.northwestern.edu/netlogo/models/WolfSheepPredation) model.
58+
59+
## Continuous Space Examples
60+
61+
### [Boids Flockers Model](https://github.com/projectmesa/mesa-examples/tree/main/examples/boid_flockers)
62+
2163
[Boids](https://en.wikipedia.org/wiki/Boids)-style flocking model, demonstrating the use of agents moving through a continuous space following direction vectors.
2264

23-
### forest_fire
24-
Simple cellular automata of a fire spreading through a forest of cells on a grid, based on the NetLogo [Fire model](http://ccl.northwestern.edu/netlogo/models/Fire).
65+
## Network Examples
2566

26-
### hex_snowflake
27-
Conway's game of life on a hexagonal grid.
67+
### [Boltzmann Wealth Model with Network](https://github.com/projectmesa/mesa-examples/tree/main/examples/boltzmann_wealth_model_network)
2868

29-
### pd_grid
30-
Grid-based demographic prisoner's dilemma model, demonstrating how simple rules can lead to the emergence of widespread cooperation -- and how a model activation regime can change its outcome.
69+
This is the same [Boltzmann Wealth](https://github.com/projectmesa/mesa-examples/tree/main/examples/boltzmann_wealth_model) Model, but with a network grid implementation.
3170

32-
### schelling (GUI and Text)
33-
Mesa implementation of the classic [Schelling segregation model](http://nifty.stanford.edu/2014/mccown-schelling-model-segregation/).
71+
### [Virus on a Network Model](https://github.com/projectmesa/mesa-examples/tree/main/examples/virus_on_network)
3472

35-
### boltzmann_wealth_model
36-
Completed code to go along with the [tutorial]() on making a simple model of how a highly-skewed wealth distribution can emerge from simple rules.
73+
This model is based on the NetLogo [Virus on a Network](https://ccl.northwestern.edu/netlogo/models/VirusonaNetwork) model.
3774

38-
### wolf_sheep
39-
Implementation of an ecological model of predation and reproduction, based on the NetLogo [Wolf Sheep Predation model](http://ccl.northwestern.edu/netlogo/models/WolfSheepPredation).
75+
## Visualization Examples
4076

41-
### sugarscape_cg
42-
Implementation of Sugarscape 2 Constant Growback model, based on the Netlogo
43-
[Sugarscape 2 Constant Growback](http://ccl.northwestern.edu/netlogo/models/Sugarscape2ConstantGrowback)
77+
### [Boltzmann Wealth Model (Experimental)](https://github.com/projectmesa/mesa-examples/tree/main/examples/boltzmann_wealth_model_experimental)
4478

45-
### virus_on_network
46-
This model is based on the NetLogo model "Virus on Network".
79+
Boltzmann Wealth model with the experimental Juptyer notebook visualization feature.
4780

48-
## Feature examples
81+
### [Charts Example](https://github.com/projectmesa/mesa-examples/tree/main/examples/charts)
4982

50-
Example models specifically for demonstrating Mesa's features.
83+
A modified version of the [Bank Reserves](https://github.com/projectmesa/mesa-examples/tree/main/examples/bank_reserves) example made to provide examples of Mesa's charting tools.
5184

52-
### charts
85+
### [Schelling Segregation Model (Experimental)](https://github.com/projectmesa/mesa-examples/tree/main/examples/schelling_experimental)
5386

54-
A modified version of the "bank_reserves" example made to provide examples of mesa's charting tools.
87+
Schelling segregation model with the experimental Juptyer notebook visualization feature.
88+
89+
### [Shape Example](https://github.com/projectmesa/mesa-examples/tree/main/examples/shape_example)
5590

56-
### Shape Example
5791
Example of grid display and direction showing agents in the form of arrow-head shape.
92+
93+
## Other Examples
94+
95+
### [El Farol Model](https://github.com/projectmesa/mesa-examples/tree/main/examples/el_farol)
96+
97+
This folder contains an implementation of El Farol restaurant model. Agents (restaurant customers) decide whether to go to the restaurant or not based on their memory and reward from previous trials. Implications from the model have been used to explain how individual decision-making affects overall performance and fluctuation.
98+
99+
### [Schelling Model with Caching and Replay](https://github.com/projectmesa/mesa-examples/tree/main/examples/caching_and_replay)
100+
101+
This example applies caching on the Mesa [Schelling](https://github.com/projectmesa/mesa-examples/tree/main/examples/schelling) example. It enables a simulation run to be "cached" or in other words recorded. The recorded simulation run is persisted on the local file system and can be replayed at any later point.

0 commit comments

Comments
 (0)