{
 "name": "agent-based model",
 "acronym": "ABM",
 "read_from": "AgentJS",
 "slug": "agent-based-model",
 "breaks_up": "an agent-based model (ABM): many agents, each following simple rules of its own, in a shared space, step after step, so that something no single agent was told to make (clusters, a spread, an agreement) can be watched as it appears",
 "left_out": "Models made of equations about whole groups, with no single agent acting (rates of flow between stocks); one agent alone; agents that talk or write in sentences, and any model under an agent that writes text; fitting a model to real data. A model that needs code a block cannot say is outside the builder, though AgentJS itself still runs it.",
 "element_types": [
  {
   "name": "space",
   "need": "essential",
   "holds": "one",
   "description": "Where the agents are.",
   "elements": [
    {
     "name": "a grid of cells",
     "description": "each agent sits in one cell",
     "agentjs": "has"
    },
    {
     "name": "an open plane",
     "description": "agents stand anywhere and move by any amount",
     "agentjs": "has"
    },
    {
     "name": "connections only",
     "description": "no positions; agents are linked to some others and only those matter",
     "agentjs": "has"
    }
   ]
  },
  {
   "name": "edges",
   "need": "optional",
   "holds": "one",
   "helps": "says what happens to an agent that reaches the border",
   "description": "The border of the space.",
   "elements": [
    {
     "name": "wrap round",
     "description": "off one side, on at the other",
     "agentjs": "has"
    },
    {
     "name": "bounce back",
     "description": "an agent at the border turns back",
     "agentjs": "has"
    },
    {
     "name": "fall out",
     "description": "an agent at the border leaves the model",
     "agentjs": "has"
    }
   ]
  },
  {
   "name": "kinds of agent",
   "need": "essential",
   "holds": "one or more",
   "description": "The groups of agents, each with a name, a count and starting numbers set with sliders.",
   "elements": [
    {
     "name": "one kind",
     "description": "every agent the same, told apart only by its own numbers",
     "agentjs": "has"
    },
    {
     "name": "two kinds",
     "description": "two groups, shown in two colours",
     "agentjs": "has"
    },
    {
     "name": "several kinds",
     "description": "up to five groups",
     "agentjs": "has"
    }
   ]
  },
  {
   "name": "noticing",
   "need": "essential",
   "holds": "one",
   "description": "Who counts as a neighbour.",
   "elements": [
    {
     "name": "the eight cells around",
     "description": "on a grid, the cells touching at sides and corners",
     "agentjs": "has"
    },
    {
     "name": "the four cells around",
     "description": "on a grid, the cells touching at sides",
     "agentjs": "has"
    },
    {
     "name": "anyone within a distance",
     "description": "on a plane, every agent nearer than a set distance",
     "agentjs": "has"
    },
    {
     "name": "those it is connected to",
     "description": "the agents it is linked to",
     "agentjs": "has"
    }
   ]
  },
  {
   "name": "moving",
   "need": "optional",
   "holds": "one for each kind",
   "helps": "whether and how an agent changes place",
   "description": "How an agent changes place.",
   "elements": [
    {
     "name": "stays put",
     "description": "never moves",
     "agentjs": "has"
    },
    {
     "name": "wanders",
     "description": "a small push in a random direction each step",
     "agentjs": "has"
    },
    {
     "name": "moves to an empty cell when unhappy",
     "description": "moves when its rule says it is unhappy",
     "agentjs": "needs"
    },
    {
     "name": "goes towards a place",
     "description": "heads for a point it is given",
     "agentjs": "has"
    },
    {
     "name": "keeps away from others",
     "description": "moves away from the agents nearest it",
     "agentjs": "needs"
    }
   ]
  },
  {
   "name": "connections",
   "need": "optional",
   "holds": "one",
   "helps": "who is linked to whom, when the space has connections",
   "description": "How agents are linked.",
   "elements": [
    {
     "name": "a ring",
     "description": "each linked to the next few round a circle",
     "agentjs": "needs"
    },
    {
     "name": "at random",
     "description": "each pair linked with a set chance",
     "agentjs": "needs"
    },
    {
     "name": "to the nearest",
     "description": "each linked to the few nearest it",
     "agentjs": "needs"
    }
   ]
  },
  {
   "name": "rule",
   "need": "essential",
   "holds": "one or more",
   "description": "What an agent does with what it notices.",
   "elements": [
    {
     "name": "too few like me, so I move",
     "description": "the share of neighbours of its own kind is below a threshold, so it moves",
     "agentjs": "needs"
    },
    {
     "name": "copy the majority",
     "description": "takes the state most of its neighbours have",
     "agentjs": "needs"
    },
    {
     "name": "meet halfway",
     "description": "moves its opinion towards neighbours whose opinion is within a tolerance",
     "agentjs": "needs"
    },
    {
     "name": "pass it on",
     "description": "a neighbour in a state passes it on with a set chance",
     "agentjs": "needs"
    },
    {
     "name": "rest when tired",
     "description": "a simple tree of conditions and actions",
     "agentjs": "has"
    },
    {
     "name": "a small model chooses",
     "description": "an NSMnum picks the action from a list written in advance, or none, and code runs it; trained only on the student's own keys",
     "agentjs": "has"
    }
   ]
  },
  {
   "name": "turns",
   "need": "essential",
   "holds": "one",
   "description": "The order in which agents act within a step.",
   "elements": [
    {
     "name": "one by one, in a new random order each step",
     "description": "one by one, in a new random order each step",
     "agentjs": "has"
    },
    {
     "name": "one by one, in the same order each step",
     "description": "one by one, in the same order each step",
     "agentjs": "has"
    },
    {
     "name": "all at once",
     "description": "every agent decides from the same picture of the step before",
     "agentjs": "needs"
    }
   ]
  },
  {
   "name": "watching",
   "need": "essential",
   "holds": "one or more",
   "description": "What the student looks at while it runs.",
   "elements": [
    {
     "name": "the picture",
     "description": "the space drawn each step",
     "agentjs": "has"
    },
    {
     "name": "a count of each kind over time",
     "description": "a line for each kind",
     "agentjs": "needs"
    },
    {
     "name": "how mixed the neighbourhoods are",
     "description": "the share of like neighbours, on average",
     "agentjs": "needs"
    },
    {
     "name": "how far opinions are spread",
     "description": "the gap between the highest and lowest opinion",
     "agentjs": "needs"
    }
   ]
  },
  {
   "name": "ending",
   "need": "optional",
   "holds": "one",
   "helps": "when a run stops by itself",
   "description": "When a run stops.",
   "elements": [
    {
     "name": "runs until stopped",
     "description": "runs until stopped",
     "agentjs": "has"
    },
    {
     "name": "stops after a number of steps",
     "description": "stops after a number of steps",
     "agentjs": "needs"
    },
    {
     "name": "stops when nothing changes",
     "description": "stops when nothing changes",
     "agentjs": "needs"
    }
   ]
  },
  {
   "name": "chance",
   "need": "optional",
   "holds": "one",
   "helps": "whether two runs come out the same",
   "description": "Whether two runs come out the same.",
   "elements": [
    {
     "name": "the same each run",
     "description": "a seed the student can change",
     "agentjs": "needs"
    },
    {
     "name": "different each run",
     "description": "different each run",
     "agentjs": "has"
    }
   ]
  }
 ],
 "instances": [
  {
   "name": "taali",
   "url": "https://taali.syntax.prayasabhinav.net",
   "what": "a builder: make an agent-based model by dragging one block into each slot, set its numbers with sliders and watch it run, with no code typed; save it as JSON or YAML, or as a web page and plain JavaScript to keep. Its name is from taali ek haath se nahi bajti, a clap does not ring from one hand",
   "links": []
  },
  {
   "name": "AgentJS",
   "url": "https://prayasabhinav.github.io/AgentJS/",
   "what": "the JavaScript library a model of this kind runs on, in taali and in the code taali writes",
   "links": [
    [
     "source",
     "https://github.com/prayasabhinav/AgentJS"
    ]
   ]
  }
 ],
 "described_entities": []
}
