Main Page | Recent changes | View source | Page history

| All content dual-licensed under the GNU FDL and the Creative Commons Share-alike Attribution license. | Privacy policy

Not logged in
Log in | Help
 

Software templates

From SwarmWiki

Wiki main page
ABM_Resources
Community resources
Email lists
SwarmFest
Software resources
Available tools
Tool reviews & comparisons
Template software
IDEs for ABM platforms
How and why to use ABMs
General modeling literature
Specific domains
Help for ABM resources area

Template software is code designed:

  • To be copied and modified to build a new model; this is often the easiest way to get started with a new model.
  • As a tutorial for learning how to use a software platform.
  • To provide examples of how to program specific things.
  • (In the case of StupidModel, below) to provide a basis for comparing alternative software platforms.

This page provides several templates for various agent-based modeling platforms.

Swarm users should also see: Swarm:_applications.

Contents

"StupidModel" is a set of 16 template models developed by Steve Lytinen, Steve Railsback, Steve Jackson, and Volker Grimm. (Its name comes from Volker Grimm's recommendation to start with a 'stupidly simple' model!) StupidModel was then implemented in five of the most popular agent-based modeling platforms: MASON, Repast, Swarm (both Objective-C and Java), and NetLogo. (Links to these platforms are here.)

StupidModel was designed (a) to provide template code for commonly used ABM features which can be used for learning and teaching how to program ABM's; and (b) to compare ease of implementation of models in a variety of ABM platforms. The review of platforms conducted via StupidModel is discussed at Software_Reviews.

There are 16 versions of StupidModel, from a bare bones template (version 1) to one which involves 2 agent types, a full agent life cycle (birth, reproduction, predation, and death), and a habitat with data read from an input file (version 16). From StupidModel you can learn how to:

  • Create, use, and display two-dimension grid spaces, both toroidal and non-toroidal;
  • Draw agents that move on the grid space;
  • Add spatial cell objects that agents interact with;
  • Add probes to cells and agents;
  • Display parameters so they can be edited at run-time;
  • Create histograms and graphs;
  • Make a model stop when a specified condition is met;
  • Write statistics on the agents to an output file;
  • Randomize and sort the order in which agents execute;
  • Make agents die;
  • Create new agents during a run;
  • Draw random numbers from a specified distribution;
  • Read spatial data from an input file; and
  • Add new classes of agent that have different behaviors.

Note that there are many ways to program anything in these platforms. StupidModel code illustrates simple, intuitive ways to implement these kinds of common model functions; but it is not intended to illustrate the 'best' or fastest or safest way to do anything!!

Experienced users of these platforms are encouraged to post alternative ways to implement any part of these templates.

New Repast and MASON templates were posted 28 June 06,
to correct some mistakes in previous versions.

From Steve Lytinen's page for this project, you can download:

StupidModel specification, which fully documents all 16 versions (pdf).
Some notes on implementing StupidModel in MASON (pdf).
Some notes on implementing StupidModel in Repast (pdf).
Some notes on implementing StupidModel in Java Swarm (pdf).
Some notes on differences between Java and Objective-C Swarm versions (pdf).
(Notes on NetLogo implementations are within the NetLogo files, below.)
The data file used in versions 15 and 16 (zipped plain text).


MASON implementations (zip archive of .java files).
NetLogo implementations (zip archive of .nlogo files, including implementation notes).
Repast implementations (zip archive of .java files).
Java Swarm implementations (zip archive of .java files).
Objective-C implementations (tar gzip archive).

StupidModel in EcoLab, Behaviour Composer, and Xholon

Swarm template software

See Swarm:_applications for a variety of models that can serve as templates for Objective-C and Java Swarm. The official applications archive for Objective-C includes a tutorial model. A very simple Objective-C template model called "template" has been useful to many Swarm users; it is available in older versions of offical applications archive (e.g., the Swarm version 2.0.1 archive here).

Repast template software

Michael Schippling created a simple version of SugarScape as a template Repast model. It is at: http://www.etantdonnes.com/repast/demos/Template2D.html


[Main Page]
Main page
About SwarmWiki
News
Recent changes
Random page
Help

View source
Discuss this page
Page history
What links here
Related changes

Special pages