Skip to content

Commit

Permalink
Merge pull request #707 from rht/ex-update
Browse files Browse the repository at this point in the history
examples/Readme.md: Update description to be consistent with the folder names
  • Loading branch information
Corvince committed Jul 15, 2019
2 parents 00e88d2 + f07cbe0 commit dbe40d0
Show file tree
Hide file tree
Showing 19 changed files with 38 additions and 19 deletions.
2 changes: 1 addition & 1 deletion docs/best-practices.rst
Expand Up @@ -27,7 +27,7 @@ organize them. For example, if the visualization uses image files, put those in
an ``images`` directory.

The `Schelling
<https://github.com/projectmesa/mesa/tree/master/examples/Schelling>`_ model is
<https://github.com/projectmesa/mesa/tree/master/examples/schelling>`_ model is
a good example of a small well-packaged model.

It's easy to create a cookiecutter mesa model by running ``mesa startproject``
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/intro_tutorial.ipynb
Expand Up @@ -19,7 +19,7 @@
"\n",
"The base for this tutorial is a very simple model of agents exchanging money. Next, we add *space* to allow agents move. Then, we'll cover two of Mesa's analytic tools: the *data collector* and *batch runner*. After that, we'll add an *interactive visualization* which lets us watch the model as it runs. Finally, we go over how to write your own visualization module, for users who are comfortable with JavaScript.\n",
"\n",
"You can also find all the code this tutorial describes in the **examples/Tutorial-Boltzmann_Wealth_Model** directory of the Mesa repository."
"You can also find all the code this tutorial describes in the **examples/boltzmann_wealth_model** directory of the Mesa repository."
]
},
{
Expand Down Expand Up @@ -53,7 +53,7 @@
" $ pip install mesa\n",
"```\n",
"\n",
"When you do that, it will install Mesa itself, as well as any dependencies that aren't in your setup yet. Additional dependencies required by this tutorial can be found in the **examples/Tutorial-Boltzmann_Wealth_Model/requirements.txt** file, which can be installed by running:\n",
"When you do that, it will install Mesa itself, as well as any dependencies that aren't in your setup yet. Additional dependencies required by this tutorial can be found in the **examples/boltzmann_wealth_model/requirements.txt** file, which can be installed by running:\n",
"\n",
"```bash\n",
" $ pip install -r requirements.txt\n",
Expand Down
51 changes: 35 additions & 16 deletions examples/Readme.md
@@ -1,38 +1,57 @@
# Example Code

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.

### Color Patches
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.
## Models

Classic models, some of which can be found in NetLogo's/MASON's example models.

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

### ConwaysGameOfLife
### color_patches
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.

### conways_game_of_life
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.

### EpsteinCivilViolence
### epstein_civil_violence
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.

### Flockers
### boid_flockers
[Boids](https://en.wikipedia.org/wiki/Boids)-style flocking model, demonstrating the use of agents moving through a continuous space following direction vectors.

### ForestFire
### forest_fire
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).

### PD_Grid
Grid-based demographic prisoner's dilemma model, demonstrating how simple mimicing can lead to the emergence of widespread cooperation -- and how a model activation regime can change its outcome.
### hex_snowflake
Conway's game of life on a hexagonal grid.

### Schelling (GUI and Text)
Mesa implementation of the classic [Schelling segregation model](http://nifty.stanford.edu/2014/mccown-schelling-model-segregation/).
### pd_grid
Grid-based demographic prisoner's dilemma model, demonstrating how simple mimicing can lead to the emergence of widespread cooperation -- and how a model activation regime can change its outcome.

### Shape Example
Example of grid display and direction showing agents in the form of arrow-head shape.
### schelling (GUI and Text)
Mesa implementation of the classic [Schelling segregation model](http://nifty.stanford.edu/2014/mccown-schelling-model-segregation/).

### Tutorial-Boltzmann_Wealth_Model
### boltzmann_wealth_model
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.

### WolfSheep
### wolf_sheep
Implementation of an ecological model of predation and reproduction, based on the NetLogo [Wolf Sheep Predation model](http://ccl.northwestern.edu/netlogo/models/WolfSheepPredation).

### Sugarscape CG
### sugarscape_cg
Implementation of Sugarscape 2 Constant Growback model, based on the Netlogo
[Sugarscape 2 Constant Growback](http://ccl.northwestern.edu/netlogo/models/Sugarscape2ConstantGrowback)

### virus_on_network
This model is based on the NetLogo model "Virus on Network".

## Feature examples

Example models specifically for demonstrating Mesa's features.

### charts

A modified version of the "bank_reserves" example made to provide examples of mesa's charting tools.

### Shape Example
Example of grid display and direction showing agents in the form of arrow-head shape.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit dbe40d0

Please sign in to comment.