Skip to content

Latest commit

 

History

History

examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

Schelling.py

Simple implementation of the classic Schelling segregation model.

WolfSheep

Implementation of a simple ecological model of predation and reproduction.

ForestFire

Simple cellular automata of a fire spreading through a forest of cells on a grid.

EpsteinCivilViolence

Joshua Epstein's model of how a decentralized uprising can be suppressed or reach a critical mass of support.

Flockers

Boids-style flocking model, demonstrating the use of agents moving through a continuous space following direction vectors.

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.