Agent-based modeling

Model individual people or objects when their differences, interactions, or locations change the result.

On this page
  1. What is an agent?
  2. Emergent behavior
  3. When to use agent-based modeling
  4. Initialize the population, network, and space deliberately
  5. Check both individual rules and system-level patterns
  6. Do not add individual detail without a reason

What is an agent?

An agent is an individual actor with its own state and behavior. It may represent a person, vehicle, organization, animal, device, or facility. Agents can differ from one another and change over time.

Emergent behavior

Each agent follows local rules, yet their interactions can produce a larger pattern: congestion, adoption, cooperation, an epidemic, or a market shift. No agent needs to direct the overall result.

Agent-based modelingIndividual rules can create a group pattern

Model individuals only when their differences or interactions affect the result.

One agentAgent 17
state
active
location
(12, 7)
rule
observe → decide → act
Repeated interactionsPopulation pattern

For example: clustering, traffic flow, adoption, or crowd movement.

When to use agent-based modeling

Use an agent-based model when individual differences, relationships, movement, or adaptation can change the outcome.

  • Individuals have different attributes or strategies.
  • Who interacts with whom matters.
  • Spatial location or a network structure matters.
  • Behavior changes in response to experience or other agents.

Initialize the population, network, and space deliberately

An agent model can be sensitive to who exists at time zero, where agents are placed, and which relationships already exist. Match those starting distributions to the study population when data are available, rather than scattering agents uniformly because it is convenient.

If the initial network or spatial pattern is uncertain, vary it across replications or scenarios and check whether the conclusion changes.

Check both individual rules and system-level patterns

Verify that one agent behaves correctly in controlled cases, then compare aggregate patterns such as adoption curves, contact rates, congestion, or spatial clustering with observations the model is expected to reproduce.

A convincing population-level curve does not prove the individual rules are right; different micro-rules can sometimes produce similar aggregate output.

Do not add individual detail without a reason

Detailed agents require more data, assumptions, and computing time. If identity, interaction, or location does not affect the decision, a process or aggregate model is easier to build, explain, and test.