Multi-Agent Systems
by Albert Major
Components of Agent-Based Models
This lecture shifts focus from the conceptual design of models to the software implementation. It covers how to define agent properties, the granularity of the model, different levels of agent cognition (from simple rules to learning), and environmental factors like boundaries and scheduling.
1. Agent Properties and Definitions
When implementing agents in software (like NetLogo or Python), you must define their specific attributes and how they are grouped.
- Variables/Properties: Agents have specific variables such as ID, coordinates (location), heading (direction), and color. These are necessary to monitor agent behavior and debug the model.
- Breeds and Types: You can define different categories of agents (e.g., Wolves vs. Sheep in a predation model). This allows for distinct behaviors for different groups.
- Sets of Agents: You can group agents dynamically based on state or location (e.g., "all agents currently in the bar").
- Computational Efficiency Warning: Be careful when calculating properties for sets. Calculating the distance from one agent to the center is fast. Calculating the distance between every agent and every other agent creates high computational complexity. If you have many agents, this will make the model run very slowly.
2. Granularity of the Agent
You must decide what an "agent" represents based on your research question. There is no single right answer, only what fits the phenomena.
- Scale: In an ant model, is the agent the whole ant, or a specific molecule?
- Abstraction: In a traffic model, is the agent a specific person, a vehicle, or an abstract unit of transportation?
- Example: For city traffic analysis, modeling individual humans might be too detailed; modeling cars or buses is likely the appropriate level of granularity.
3. Agent Cognition
The lecture defines a hierarchy of cognitive complexity, ranging from simple reactions to complex adaptation.
A. Reflexive Agents (Simple Rules)
- Definition: These agents follow deterministic "If -> Then" rules. They do not "think" or plan; they simply react to the immediate environment.
- Example (Basic Traffic Model): Cars drive in a line.
- Rule: If there is a car close ahead -> Decelerate. If the road is clear -> Accelerate.
- Result: This creates stop-and-go traffic waves (phantom traffic jams). Even with simple rules, inefficient patterns emerge because agents only react locally without coordination.
B. Utility-Based Agents (Optimization)