This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# AgentBase is Free Software, available under GPL v3 or any later version. | |
# Original AgentScript code @ 2013, 2014 Owen Densmore and RedfishGroup LLC. | |
# AgentBase (c) 2014, Wybo Wiersma. | |
# This model shows the basic structure of a model and is a good | |
# place to get started when you want to try building your own. | |
# | |
# To build your own model, extend class ABM.Model supplying the | |
# two built in methods `setup` and `step`. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2014, Wybo Wiersma, available under the GPL v3. Please | |
# cite with url, and author Wybo Wiersma (and if applicable, a paper). | |
# This model builds upon Epsteins model of protest, and illustrates | |
# the possible impact of social media on protest formation. | |
@MM = MM = {} | |
if typeof ABM == 'undefined' | |
code = require "./lib/agentbase.coffee" | |
eval 'var ABM = this.ABM = code.ABM' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# AgentBase is Free Software, available under GPL v3 or any later version. | |
# Original AgentScript code @ 2013, 2014 Owen Densmore and RedfishGroup LLC. | |
# AgentBase (c) 2014, Wybo Wiersma. | |
# This is a slightly more complicated general template for | |
# creating models. | |
# | |
# To build your own model, extend class ABM.Model supplying the | |
# two built in methods `setup` and `step`. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# AgentBase is Free Software, available under GPL v3 or any later version. | |
# Original AgentScript code @ 2013, 2014 Owen Densmore and RedfishGroup LLC. | |
# AgentBase (c) 2014, Wybo Wiersma. | |
# Ants is a model of ant foraging behavior incorporating a nest | |
# location and food pheromone diffusion. | |
u = ABM.util | |
class ABM.AntsModel extends ABM.Model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# AgentBase is Free Software, available under GPL v3 or any later version. | |
# Original AgentScript code @ 2013, 2014 Owen Densmore and RedfishGroup LLC. | |
# AgentBase (c) 2014, Wybo Wiersma. | |
# Buttons provides Stuart Kauffman's example of randomly connecting pairs | |
# of buttons in a pile resulting in a tipping point. | |
u = ABM.util | |
class ABM.ButtonsModel extends ABM.Model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# AgentBase is Free Software, available under GPL v3 or any later version. | |
# Original AgentScript code @ 2013, 2014 Owen Densmore and RedfishGroup LLC. | |
# AgentBase (c) 2014, Wybo Wiersma. | |
# Diffusion has randomly flying agents on a patch grid dropping a color | |
# which is diffused over the grid. | |
u = ABM.util | |
class ABM.DiffusionModel extends ABM.Model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# AgentBase is Free Software, available under GPL v3 or any later version. | |
# Original AgentScript code @ 2013, 2014 Owen Densmore and RedfishGroup LLC. | |
# AgentBase (c) 2014, Wybo Wiersma. | |
# Fire is a cellular automata model of fire spreading. | |
u = ABM.util | |
class ABM.FireModel extends ABM.Model | |
setup: -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# AgentBase is Free Software, available under GPL v3 or any later version. | |
# Original AgentScript code @ 2013, 2014 Owen Densmore and RedfishGroup LLC. | |
# AgentBase (c) 2014, Wybo Wiersma. | |
# Flock is the classic "boids" model where agents each follow | |
# three simple rules resulting in realistic flocking. This example | |
# uses the as.dat.gui.js extra. | |
u = ABM.util |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# AgentBase is Free Software, available under GPL v3 or any later version. | |
# Original AgentScript code @ 2013, 2014 Owen Densmore and RedfishGroup LLC. | |
# AgentBase (c) 2014, Wybo Wiersma. | |
# Grid Path shows one of Knuth's great puzzles on the probability | |
# of all Manhattan traversals diagonally traversing a grid. | |
u = ABM.util | |
class ABM.GridPathModel extends ABM.Model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# AgentBase is Free Software, available under GPL v3 or any later version. | |
# Original AgentScript code @ 2013, 2014 Owen Densmore and RedfishGroup LLC. | |
# AgentBase (c) 2014, Wybo Wiersma. | |
# Life provides an implementation of Conway's Game of Life with a twist. | |
# This example demonstrates running multiple models on the same page. | |
u = ABM.util | |
class ABM.LifeModel extends ABM.Model |
OlderNewer