Multiple Agent Systems Notes PDF
Document Details
Uploaded by AgreeableCouplet4547
Tags
Summary
This document provides a comprehensive set of lecture notes on multiple agent systems. A range of topics are covered, including complexity science concepts and agent characteristics.
Full Transcript
Multiple Agent Systems Notes Lecture 1: Introduction to Multiple Agent Systems Reading Notes Complexity science is a different set of models that graudually shift in the criteria models are judged by, and in the kings of models that are considered acceptable Shift of trends i...
Multiple Agent Systems Notes Lecture 1: Introduction to Multiple Agent Systems Reading Notes Complexity science is a different set of models that graudually shift in the criteria models are judged by, and in the kings of models that are considered acceptable Shift of trends in models over time along two axes: Equation-based => simulation-based / classical models Analysis, based on simple rules => computation / complex systems Complexity science vs. Classical science (general, different puposes, social, and engineering related) 1. Continuous => discrete Classical models are based on continuos mathemathics but ocmplexity models are based on discrete mathemactics (graphs, cellular automatons) 2. Linear => nonlinear Classical models are linear (or use linear approximations to nonlinear systems) and complex models use nonlinear models 3. Deterministic => stochastic Classical models are deterministic, which may reflext underlying philosophical determininsm, complex systems include randomness Determinism is the view that all events are caused, inevitably, by prior events 4. Abstract => detaild In classical models, plantets are point masses, simplications may be necessary for anaylsis, but computationa models can be more realistic 5. One, two => many Classical models are limited to small number of components. Complex systems work with large number of components and interactions 6. Homogeneous => heterogeneous The interactions of components are identical in classical models, whereby in complex models they are different 7. Predictive => explanatory 8. Realism => instrumentalism Classical models are considered realistic interpreations. Instrumentalism is the view that models can be useful even if the entiites they postulate don't exist. => "all models are wrong, but some are useful" 9. Reductionism => holism Reductionism is the view that the behavior of a system can be explained by understanding ist components. Holism is the view that some phenomena that appear at the system level do not exist at the level of components, and cannot be explained in component-level terms. 10. Centralitzed (copetually simple and easy to analyse) => decentralized (robust) 11. One-to-many => many-to-many 12. Top-down => bottom-up 13. Analysis => computation 14. Isolation => interaction In classical engineering, the complexity of large systems is managed by isolating components and minimizing interactions. This is still an important engineering principle; nevertheless, the availability of computation makes it increasingly feasible to design systems with complex interactions between components. 15. Design => search 16. Artisotelian logic => many-valued logic 17. Frequentist probability = bayesianism 18. Objective => subjective 19. Physical law => thoery => model Lecture Notes Agent: An What are multi-agent systems? entity that has - Can form the bases for distributed AI systems perception- - We also model multi-agent systems that exist in nature to try to action understand how they work capabilities. It - Whole (system) is greater than the sum of the parts (agents) can sense it - Often dynamic (especially with learning and interactions) Charactestics of Multi-agent systems? environment Agent design and act in it. Environment Mul-agent Perception systems: A Control Knowledge systems or Communication group of Perception (potentially) Information is distributed in environment (spatially, temporally, interacting semantically) agents in Partial observability (makes aciton planning challenging some Control environment Decentralized (emergent, self-organized) that they can => robust, hard to divide decision-making sense and act Game theory and coordination in, and it can Different control architecture and rules are possible communicate Knowledge and solve Levels of knowldge may differ between agents problems Common or shared knowledge structures are important Knowing what other agents know together Shared mental models, situation awareness, transactional memory systems Communication Two-way sender receivers Needed for coordination and negotiation Protocols for heterogeneous agents Applications e-commerce, trading, auctions Robotics, computer games. Social and cognitive science, internet, and human-machine teaming Challenges How can we understand and solve problems with multi-agent systems? How can agents maintain a shared understanding of their environment How can we design agents that coordinate and resolve conflicts What kind of learning mechanisms are there for agents How can agents of different types interact effectively Lecture 2: Introduction to Agent-Bsed Modeling (ABM) Reading notes Agent: an autonomous computational individual or object wiith particular properties and actions Agent based modeling (ABM): form of computational modeling whereby a phenomenon is modeled in terms of agents and their interactions ABM is a transformative representational technologsy that enables us to better understand familiar topics, and at younger ages; make sence of and analyze hitherto unexplored topics; and enable a democratization of accesss to computational tools for making sense of complexity and change. Agent-based representations are easier to undrestand than mathematical representations of the same phenomenon => agent-based models are constructed out of individual objects and simple rules for their movement of behavior, as opposed to equational models that are constructed from mathematical symbols Structuration: the encoding of the knowledge in a domain as a function of the represenrational infrastructure used to express the knowledge. Reconstructuration: a change from one structuration of a domain to another resulting from such a change in representational infrastructure Structurational inertia; keeps structurations from changing, impeding the spread of restructuration Emergence; the arising of novel and coherent structures, patterns, and properties through the interactions of multiple distributed elements 2 challenges of understanding emergence 1. Trying to figure out the aggregate pattern when one knwoes how individual elements behave 2. The aggregate pattern is known and one is trying to find the behavior of the elements that could generate the pattern ABM enables restructurations of complex systems to that the (a) understanding of complex systems can be democratized and (b) the science of complex systems can be advanced Computational model: a model that takes certain input values, manipulates those inputs in an algorithmic way, and generates outputs. Model implementation: process of transforming a textual model into a working computational simulation Conceptual models can also be diagrammatic or pictorial other than textual Agent: an autonomous individual element of a computer simulation. They have proerties, states, and behaviors Agent-based modeling is a computational modeling paradigm that enables us to describe how any agent will behave. You encode the behavior of individual agents in simple rules so that we can observe the results of these agents interactions. Complex system: a system composed of many distributed interacting parts.. Provides a set of tools and frameworks for viewing phenomena. Any phenomenon can be viewed as a complex system, and choosing when to do so depends on assessing when it is most useful to use the lens and /or methodologies of complex system NetLogo: both a modeling language and an integrated environment designed to make agent- based models easy to build 8 main uses for agent-based models: 1. desciption 2. explanation, 3. experimentation, 4. providing sources of analogy, 5. communication/education, 6. providing focal obects or centerpieces for scientific dialogue, 7. as thought expriments, and 8. prediction A model is descriptive of a real-world system Emergence: a property classically exhibited by many afend-based models, and it occurs when an attribute that can be descriped at a system level is not specifically encoded at the individual level Complex systems are characterized by emergent phenomena (patterns that appear to be quite complex can often be generated by simple rules) A key to building agent.based models is to harness emergence by finding the simple rules that can generate the phenomenon The function of a model is to help us to understand and examine phenomena that exist in the real world in more tractable and efficient ways than by simply observing reality Models are explanatory in that they point out the essential mechanisms underlying a phenomenon. They can function as a proof that hypothesized mechanisms are sufficient to account for an observation. Models provide us with a proof of concept that something is possible. A key function of ABMs is to explicate the power of the emergence key advantages of agent-based models (ABMs) over equation-based models (EBMs) in bullet points: Heterogeneity: ABMs can model a heterogeneous population, while EBMs typically assume homogeneity. Discrete Interactions: ABMs handle discrete interactions and results, making them more realistic for real-world scenarios compared to the continuous nature of EBMs. No Need for Aggregate Knowledge: ABMs don't require prior knowledge of aggregate phenomena; they work by simulating simple rules for individual entities. Closer Real-World Relationship: ABMs more closely mirror real-world processes by describing individuals rather than aggregates. Accessibility: ABMs are easier to understand and explain, even to those without specialized training, enhancing stakeholder engagement. Detailed Output: ABMs provide detailed insights at both individual and aggregate levels, unlike the top-down approach of EBMs that focuses on aggregate behavior. Emergent Behavior: ABMs allow for indirect causation and the study of emergent phenomena, which is often missed by EBMs. One important feature of agent-based modeling, and of computational modeling in general, is that it is easy to incorporate randomness into your models. Agent-based models are more useful when the agents are not homogenous and when the interaction between the agents or between agent and environment is complex. ABM can be computationally intensive if an ABM is built well, it is possible to reduce the amount of computational power required by “ black-boxing ” parts of the model. A powerful aspect of ABM is that it enables us to find universal patterns that characterize apparently quite different phenomena, to generate these patterns with simple rules, and to explore the effects of simple modifications to those rules. Models from first principles: a simple, abstract model by investigating basic dynamics of a system Lecture Notes Model: an Fire model: abstracted Fire can only burn green patches description of a Sliders: Setup, Density, Settings, go process, object, or event (not a ABM vs. Equation-based modeling perfect Equation-based models have cloased form solutions Continuous representation, No local details often wrong in Top-down vs. Buttom-up (ABM) many ways but Can be converted to ABM to complement EBMs still useful) Simulation: ABM vs. Lab experiments Lab experiments can generate theory evolution of a Lab experiments are rarely scaled up model over ABM can be created for lab experiments time (often Generate new hypotheses computer Determine sensitivity of results based) Can compare generative principles from ABM with lab experiments Limitations and resistance for ABMs Agent: High computational cost autonomous Many free parameters individual Requires detailed individual level behavioral knwoledge elements with Resistance: 1. centralized control 2. lack of education about complex properties and systems 3. expectations of "casual" explanations actions in computer Description, explanation, experimentation, and analogy simulation ABM can provide a description of a real-worl (or artificial system) => simplified version => but make the model as simple as possible but not ABM: world simpler can be Can explain the potential underlying phenomenon that control a system modelled using => prrof of concept of emergence (rules governing certain behavior) agents, Help us understand other systems with similar patterns of behvaior environment, Can run repreated experiments varying conditions and parameters and and description observe changes of agent-agent Model properties: and agent- Agents and ptaches can all have properties that we can inspect We can change those properties over iterations (ticks) environment We can set up conditional model behvaior based on these interactions Lecture 3: On using ABMs in Cognitive and Computational Social Science - ABM is a computational approach that simulates interactions between multiple agents, or entities, each following specific behaviors within a synthetic environment. - ABMs differ from traditional analytic models by allowing for dynamic, adaptive behavior over time and in varied social settings. - ABMs simulate systems with multiple agents, providing insights into complex systems like belief diffusion, social behaviors, and voter dynamics. Advantages of ABM in Cognitive Sciences 1. Scalability of Cognitive Models: - ABMs enable researchers to study how individual cognitive models scale in social systems and across interactions. - They allow scientists to test how cognitive behaviors aggregate and influence population- level patterns. 2. Calibration and Validation: - ABMs can calibrate and validate models within complex systems, ensuring models reflect real-world behavior. - Calibration involves parameter adjustment to fit observed data; validation checks if the model outcomes align with real-world phenomena. 3. Model Development and Experimentation: - ABMs foster model development by enabling controlled, repeatable experiments. - They facilitate experiments that would be impractical or unethical on human subjects, such as those exploring risky behaviors or large-scale social changes over time. Core Components of ABMs - Agents: Individual entities with unique or varied parameters, representing cognitive or social actors. They can display heterogeneity in behavior, influenced by internal rules or feedback from interactions. - Environment: The synthetic world in which agents interact, with dynamic conditions that can evolve, influencing agent behavior. - Interactions: Connections between agents, either direct (e.g., communication) or indirect (e.g., spatial proximity), which shape collective behavior over time. Uses and Applications of ABMs 1. Modeling Social Phenomena: - ABMs simulate complex social dynamics, including belief diffusion, echo chambers, voting behavior, and cooperation. - Example: By simulating voter interactions in an election, ABMs can predict how turnout and choices might vary across a population. 2. Testing Longitudinal Models: - ABMs can simulate long-term cognitive or social changes, capturing developmental processes over extended periods. - They provide insights into phenomena like societal shifts, resource management, and behavioral evolution. 3. Ethical Simulation of Sensitive Scenarios: - ABMs allow researchers to model scenarios with ethical implications, such as risky behavior, without using real participants. - This ability supports studies in areas like health behavior, financial decision-making, and environmental impact. 4. Controlled Experimentation: - ABMs offer a platform to conduct controlled simulations, isolating variables to observe their effects on group behavior and system-level dynamics. Key Concepts and Terms Heterogeneity: Agents can have diverse initial parameters (exogenous heterogeneity) or evolve different states over time due to feedback mechanisms (endogenous heterogeneity). Multi-Realizability: Macro-level phenomena can emerge through different micro-level implementations, allowing for diverse yet equivalent model structures. Multi-Level Systems: ABMs distinguish between individual and macro levels, making it possible to observe emergent properties that arise from interactions across different system layers. Advantages of Multi-Agent, Multi-Level ABMs 1. Operational Platform: ABMs create experimental platforms for converting theories into testable hypotheses and for observing emergent properties from agent interactions. 2. Experimental Laboratory: They allow gradual, controlled testing of theories within complex environments. 3. Multi-Level Observation: ABMs enable researchers to examine the effects of individual-level decisions on system-level outcomes, highlighting the interaction between micro- and macro-level dynamics. Challenges and Limitations of ABM 1. Model Consistency and Equivalence: o ABMs may produce equivalent outcomes from different rule sets, leading to inconsistencies and challenges in validating models. 2. Minimalist Modeling Approach: o ABM often follows the "KISS" principle (Keep It Simple, Stupid), prioritizing simplicity at the risk of oversimplifying agent behaviors and reducing cognitive realism. 3. Trade-Offs in Complexity: o There is often a trade-off between model complexity (e.g., detailed cognitive agents) and scalability (e.g., larger systems), challenging ABM’s adaptability for large, real-time simulations. When to Use ABMs vs. Analytic Models ABMs: Ideal for systems with many interacting agents, heterogeneous behaviors, time dependency, and spatial distribution. They are suitable when analytical models cannot fully capture system complexity. Analytic Models: Preferable for simpler, isolated cognitive functions, providing closed- form solutions that reveal the full model response scope without the computational demands of ABMs. ABMs in Computational Social Science (CSS) Deductive CSS: Uses mathematical equations to predict social outcomes based on set assumptions but is limited in complex, adaptive systems. Generative CSS: ABMs offer micro-foundational explanations by simulating internal rules and observing emergent social behaviors. Complex CSS: Incorporates data-driven techniques, such as machine learning and data mining, to model social dynamics on a large scale. Toward Interdisciplinary CSS Conte and Paolucci advocate for an interdisciplinary CSS approach, combining deductive, generative, and complex methods to tackle social science challenges. They propose using ABMs alongside data-driven models to understand and predict behaviors, integrating quantitative rigor with cognitive realism. Overview of Agent-Based Modeling (ABM) 1. What is ABM? ABM is a computational approach for modeling social phenomena by simulating interactions among autonomous agents capable of decision-making and adaptation. It emphasizes local rules and interactions among individual agents, distinguishing it from equation-based modeling. 2. Types of Agents in ABM Strong Agents: Have complex cognitive abilities, manipulating mental representations. Weak Agents: Act based on simple rules without deep reasoning. 3. Historical Context ABM gained prominence in the 1990s and early 2000s, supported by the launch of journals, conferences, and institutional backing, particularly in Europe and the US. Strengths and Weaknesses of ABM Strengths: 1. Multi-Realizability: Flexible modeling of macro-level phenomena using diverse micro-level mechanisms. 2. Experimental Platform: Controlled environments to test theories, observe emergent properties, and explore multilevel interactions. 3. Generative Approach: Explains social phenomena by focusing on mechanisms that produce them, highlighting how behaviors emerge. Weaknesses: 1. Minimality and Ad-Hoc Modeling: Simplicity in ABMs may overlook real-world social behavior complexities. 2. Equivalence of Models: Different models may replicate similar phenomena but lack cross-validation, leading to inconsistent interpretations. 3. Challenges in Model Validation: Theory-based models require extensive empirical data, which can be difficult to obtain. Cognitive and Generative Models in ABM 1. Cognitive Models: Designed to incorporate realistic decision-making processes, such as beliefs, desires, and intentions (BDI frameworks). Challenges include calibration, validation, and practical utility. 2. Generative Models: Explain behaviors through internal mechanisms and environmental factors rather than observed cause-and-effect patterns alone. Computational Social Science (CSS) Variants of CSS: 1. Deductive CSS: Relies on mathematical and logical models but struggles with accuracy in complex systems. 2. Generative CSS: Uses ABMs to generate macro-level phenomena from individual rules. 3. Complex CSS: Employs data-driven techniques (e.g., data mining) to handle large datasets and predict trends. Future Directions for ABM and CSS 1. Enhanced Model Complexity and Scalability: o Integration of real-time data for applications like policy modeling and epidemic simulation. 2. Cross-Disciplinary Integration: o Combining mathematical rigor, data science techniques, and cognitive modeling to create robust, predictive models. 3. Applications: o Tackling social challenges, from economic crises to public health, by understanding and influencing behavior patterns at both individual and societal levels. Lecture notes Multi-realizability: Cognitive methods and models Multi-level multi- Often developed based on cognition in isolation (e.g. lab experiments) agent systems can Analytic models be implemented in different ways at lower levels and still generate the same or similar macro-level phenomena Human cognition occurs in interactions Others influence our attention, leanring, desicion making, etc. Social environments are dynamic (interaction can create hard to predict feedback loops) The methodological challenge External actions may directly influence cognitive components and the behavior of cognitive entities is not trivially scaled to a population level 3 advantages of ABMs for CogSci : 1. Explore what happens when multiple cognitive entiites interact over time and space 2. Can calibrate (parameterize) and validate (test predictions) cognitive models in complex systems 3. Encourage model development When is an ABM a useful methodological tool? When cognitive function is dependent on the actions of other agents/environments When time is a factor (change over time) When there is spatial distrbution When there is heterogeneity within and between groups Can be exogeneous (starting with different parameters) vs. Endogeneous (start with simple parameters but diverge over time) What are the uses of ABMs in CogSci? We want to understand how humans acquire knowledge, make decisions, and solve real world problems Longitudinal questions (evolution of cognition, culture, social norms etc) Ethical questions (scenarios that are not ethical to manipulate in real-life for e.g. violence etc.) 1. Calibration: provides parameterization (compared to known data to set parameters that best replicate and reproduce those adta) 2. Validation: test predictions (parameters set theoretically, empirically, or via calibration) Defining agents Autonomous systems that operate transitions between states of the world, based on mechanisms and repersentations incorparated into them They vary in the degree of autonomy, self-interest, sociability, learning, complexity agent) vs. Sub-symbolic (more implicit assotiation/relationships) Defining agents Autonomous systems that operate transitions between states of the world, based on mechanisms and repersentations incorparated into them They vary in the degree of autonomy, self-interest, sociability, learning, complexity How are mental representations incorporated (if at all)? Utilized to reason about the world and other agents, plan, make decisions, communicate Symbolic (explicitly modeled in an agent) vs. Sub-symbolic (more implicit assotiation/relationships) Multi-realizability With varying implementations, equivalence testing is possible for structure and mechanisms of the models Current opportunities for ABMs How to scale and incorporate real-time simulation with massive amounts of data (parallel and computing infrastructure) Model equivalence Have to accept multiple paths Better tp have strong theoretical foundations and real-world plausibility ABM Recipe for model building Minimality procedure- simplest set of rules to generate macroscopic effects => Seems to be consenus in model building but it has shortcomings (reduces validity) as it isn't driven by theory and can create non-plausible models Cognitive models Difficult to control the inner validity and calibration so it reflects the real-world system without also complex real-world data collection Generative models Generate theory of behavior by accounts for behavior in terms of mechanisms that are suppose to operate while producing it Requires: o External (environmental and social) o Internal (behvaioral/cognitive) mechanisms Aims at finding the genral mechanisms yielding the wide spectrum of behaviors of relatively autonomous systems. Computational social science Variants Deductive - Explain social science phenomena with math, computer science, and logic /game theoretic models Generative - ABMs as discussed Complex - Combine with complex syystems methods, learning, data science, machine learning, etc. An interdisciplinary foundation for CSS Describe the dynamics of a given phenomena using simulated and large datasets Use ABM to check the internal consistency and resulting states Apply cross-methodological experimental methods to valdiate hypotheses against real- world data Update data-mining methods and models Use equation-based modeling when possible Lecture 4: Exploring and extending agent-based modelling Reading notes Key Concepts in Agent-Based Models (ABMs) 1. Basic Principles of ABMs: o Simple Rules to Complex Phenomena: Simple, local rules can generate complex global behaviours (e.g., flocking of birds). o Randomness and Consistency: Random behavior in individuals can lead to predictable patterns in the population. o Self-Organization: Patterns emerge without centralized control, as individuals follow simple rules. o Model Emphasis: Different models can highlight specific world aspects, often requiring adjustments to better capture real-world phenomena. Classic Models and Extensions Fire Model Concept: Simulates fire spread in a forest, showing "tipping points" or critical thresholds where small changes (like tree density) lead to large-scale effects (total spread). Structure: o Density determines probability of tree patches catching fire. o Simple rule: burning trees set neighbouring trees on fire. Extensions: o Probabilistic Spread: Adds randomness to fire spread by introducing a probability parameter. o Wind Effect: Introduces directional wind influence to increase/decrease spread probability. o Long-Distance Transmission: Models wind-borne sparks that can ignite distant trees, creating realistic patterns in forest fires. Diffusion-Limited Aggregation (DLA) Model Concept: Models particle aggregation processes, such as snowflake formation or city growth, where particles "stick" upon meeting other particles. Structure: o Randomly moving particles stick to surfaces they contact. o Aggregation produces fractal-like structures. Extensions: o Probabilistic Sticking: Adds a variable to control how likely particles are to stick, altering pattern density. o Neighbour Influence: Increases stickiness based on the number of neighbouring particles, creating denser clusters. (the more neighbours there are, it will increase the probability but it also depends on your starting probability. So its not always going to increase the probability) o Multiple Seeds: Begins aggregation from multiple points, producing diverse patterns. Segregation Model (Schelling Model) Concept: Explores how individual preferences for similar neighbours can lead to large-scale segregation, even without strong prejudice. Structure: o Agents (represented by different colours) move if their neighbours don't match a preferred similarity level. Key Observations: o Segregation arises naturally even with minimal preferences for like neighbours. Extensions: o Multiple Ethnicities: Introduces more than two agent types, simulating complex social dynamics. o Tolerance Variability: Adjusts individual tolerance levels, demonstrating how tolerance impacts integration or segregation. Important Terms and Concepts Critical Threshold / Tipping Point: A point where small parameter changes lead to significant system changes. Percolation: Process where a substance moves through a porous material (e.g., fire spreading through a forest). Emergent Behavior: Global patterns arising from local interactions without central control. Stochastic Processes: Processes with inherent randomness, key in modeling natural systems where exact outcomes are uncertain. Modelling Considerations and Best Practices Parameter Sensitivity: Fine-tuning parameters (like density or probability) reveals how systems react to different conditions, helping in prediction and control. Multiple Runs for Reliability: Due to inherent randomness, repeating simulations is essential to capture typical model behavior. Use of Reporters and Commands: NetLogo’s built-in features help simplify code, making models more readable and easier to extend or debug. Application Areas Environmental Modeling: Fire models illustrate spread patterns applicable to disease, pollutants, and information. Physics and Chemistry: DLA models relate to particle aggregation in clouds, crystal growth, etc. Social Sciences: Segregation models simulate social behavior patterns and can apply to studying urbanization and social dynamics. Summary of the El Farol Model 1. Concept and Origin: o Developed by economist W. Brian Arthur, the El Farol model examines decision- making under bounded rationality and limited information. o It simulates a scenario where agents (people) must decide weekly whether to attend the El Farol bar, based on whether they think it will be crowded. o If too many agents go (above a set threshold, e.g., 60 people), the experience is unenjoyable, so they prefer to stay home. 2. Mechanics: o Each agent has a set of strategies or "rules of thumb" to predict attendance, like basing decisions on the previous week's attendance or an average of past attendance. o Agents choose their most successful strategy based on past predictions, iteratively refining their decisions. 3. Emergent Behavior: o Despite differing strategies and imperfect predictions, attendance at the bar stabilizes around the threshold (e.g., 60), creating a dynamic equilibrium. o This equilibrium emerges without centralized coordination, highlighting how individual behavior leads to predictable patterns. 4. Extensions: o Agent Visualization: Adds color to agents based on their success in predicting attendance, allowing for a visual representation of which agents are most successful. o Reward Monitoring: Introduces monitors for the maximum, minimum, and average rewards, providing insights into how some agents perform better than others over time. o Reward Distribution Histogram: Creates a histogram to show the distribution of rewards, helping visualize inequalities in agent success and strategies. 5. Applications and Further Studies: o Minority Game: An abstraction of the El Farol model, it provides insights into market dynamics, where success often lies in minority behaviors (e.g., buying when others sell). o Machine Learning Integration: The El Farol model is sometimes extended to include machine learning, where agents adapt not only their actions but their decision-making strategies. The El Farol model serves as a foundational example in economics and agent-based modeling, illustrating complex system behavior arising from simple, decentralized decisions Lecture notes 4 chracteristic features of ABM Simple rules can generate compex phenomena Randomness in individual behavior can result in consistent patterns of population behavior Complex patterns can self-organize without any leader orchestrating the behavior Different models emphasize different aspects of the world Fire: Probabilistic Transitions Fire spread isn't totally deterministic, but should be probabilistic Add a randomly generated number between 0-100 and if random number is less that probability of spread, the fire will spread to the next patch Fire: Addining wind Code that modifies the probability of spread depending on wind speed and direction Fire: Long-distance Transmission Allow fire to jump over long distances without traveling from patch to patch Boolean switch for Big Jumps that move a number of patches ahead depending on the wind Diffusion-limitation agression (DLA) model Idealization of the proress of crystals, coral, fungi, lightening, growth of lungs and cities. Particle agents wiggle (turn) and move around and dies if any neighboring patches are green DLA: Probabilistic Sticking Change the probability that a particle agent stops if any neighbors are green (but laso not on top of a green particle) Can generate "thicker structures" (with prob 0.5 and prob = 1 is original model) El faro model: A model of bounded rationality and inductive reasoning (not completely rational agents maximizing utility) Agents don't perfectly optimize but an economic equilibrium is achieved Control agents memory for attendence in the prior weeks 1. Color agents that are better predictors of the bar's occupancy (agents get a reward when they visit and it isn't crowded). Dark agents with lowest reward 2. Extract ave, min, max reward levels and display 3. Add histogram of reward values Lecture 5: Creating Agent-based Models Reading notes Key Concepts and Principles in Agent-Based Modeling (ABM) 1. Purpose of ABM: ABMs simulate interactions of autonomous agents to observe emergent behavior within a system. Useful for analyzing systems where individual interactions lead to unpredictable outcomes. 2. Design Principles: o ABM Design Principle: Start with a simple model and incrementally add complexity to focus on the primary question. o Top-Down Design: Formulate a conceptual model before coding. o Bottom-Up Design: Start coding with general concepts, refining as insights emerge. 3. Modeling Approaches: o Phenomena-Based Modeling: Creates models to reproduce known patterns (reference patterns). o Exploratory Modeling: Focuses on experimenting with agent behaviors to observe emergent patterns. Building an Agent-Based Model 1. Defining the Model's Purpose: Identify a primary question or phenomenon to explore (e.g., predator-prey dynamics). 2. Choosing Agents: o Agents should be autonomous with distinct properties and behaviors. o Use granularity to select appropriate agent scale (e.g., individual animals vs. clumps of grass). o Proto-Agents: Temporary agents with limited properties, used for simplicity. 3. Agent Properties and Behaviors: o Agents may have properties like location, energy, and direction. o Key behaviors include movement, reproduction, and resource consumption (e.g., sheep eating grass). 4. Environmental Attributes: o Define the environment where agents operate (e.g., a grassy field). o Use simple environmental properties initially (like presence of grass), then expand if necessary. 5. Scheduling Actions: o Time is divided into discrete steps; agent actions may follow an ordered sequence (e.g., movement, death, eating, reproduction). o Ordering may impact model outcomes and should be checked against the research goal. Implementing the Model: Wolf-Sheep Example 1. Setting Up Agents and Environment: o Define agents (e.g., wolves, sheep, and grass) and set initial properties. o Environmental setup includes grass patches with variable quantities. 2. Agent Actions: o Sheep: Wander randomly, lose energy when moving, and consume grass for energy. o Wolves: Predate on sheep and gain energy; die when energy depletes. o Grass: Regrows after being consumed, providing a renewable resource for sheep. 3. Parameterization: o Control parameters (e.g., initial population sizes, energy gain, movement cost) allow variation in model conditions. o Example parameters: Number of sheep/wolves, energy gained from grass, movement cost, and grass regrowth rate. 4. Observation and Measurement: o Record population changes over time to assess stability. o Validate by comparing model outcomes with known reference patterns (e.g., predator- prey cycles). Practical Tips Model Iteration: Start with a basic version (e.g., only sheep moving), then progressively add complexity (e.g., wolves, grass growth). Debugging and Validation: Test for emergent behaviors; unexpected results can reveal model weaknesses or complex system dynamics. Plotting and Data Collection: Use plots to track population changes and validate against the model’s goals. Wolf-Sheep Model in Agent-Based Modeling (ABM) Overview and Purpose Objective: The Wolf-Sheep model explores predator-prey dynamics, focusing on conditions under which two species (wolves and sheep) maintain oscillating, positive population levels within a shared habitat with limited, regenerating resources (grass). Real-World Reference: Inspired by predator-prey studies like the wolf and moose populations on Isle Royale, Michigan, where data shows oscillations in population sizes due to interdependence. Model Components 1. Agents: o Sheep: Represented as mobile agents (prey) that consume grass for energy. o Wolves: Mobile agents (predators) that consume sheep for energy. o Grass: Modeled as stationary agents on patches, providing a renewable food resource for sheep. 2. Agent Properties: o Energy: Sheep and wolves lose energy when moving and gain energy by consuming resources (grass for sheep, sheep for wolves). Grass Amount: Tracks the quantity of grass on a patch, used as a food source by sheep. o Location and Heading: Used to control movement; agents can turn and move in random directions. The world has a "toroidal" topology (wraps horizontally and vertically) to simulate continuous space without boundaries. 3. Agent Behaviors: o Movement: Both sheep and wolves move randomly each time step, turning randomly and moving forward by a fixed step. o Energy Gain and Loss: Sheep: Gain energy from grass, lose energy with movement. Wolves: Gain energy by eating sheep, lose energy with movement. o Reproduction: Each agent may reproduce if it has enough energy, costing energy to create a new agent. Simple, asexual reproduction is used to keep the model manageable. o Death: An agent dies if its energy drops below zero. 4. Environment and Resources: o Grass Regrowth: Grass on patches regrows at a specified rate, ensuring a renewable food source for sheep. o Patch Coloring: Grass amount affects patch color, with more grass shown as brighter green. This visual cue aids in observing grass levels across the world. Model Design Process 1. Setting Up Agents and Environment: o Sheep and wolves are initialized with properties like energy and randomly assigned starting positions. o Grass patches are initialized with a random grass amount between 0 and 10 to provide a heterogeneous food landscape for sheep. 2. Time Steps and Action Sequence: o Actions are ordered: move, check energy and die, eat, reproduce, and grass regrows. o Each action step represents a simplified version of natural processes, organized to keep interactions predictable and results analyzable. 3. Parameters: o Key parameters include: Initial Population Sizes: Set for both sheep and wolves to observe the impact on stability. Movement Cost: Energy lost per move step. Energy Gain from Grass/Sheep: Amount of energy sheep gain from grass and wolves from sheep. Grass Regrowth Rate: Controls how quickly grass replenishes, impacting sheep survival. o Exploration with Parameters: Variations in these parameters allow examination of different ecological scenarios (e.g., low regrowth rates simulating limited resources). Key Observations and Model Behavior 1. Population Oscillations: o Typical Oscillation: As wolf populations rise, sheep populations fall, eventually leading to a decrease in wolves due to a lack of prey. Grass levels rise as fewer sheep consume it, allowing sheep numbers to recover, which supports wolf recovery, and the cycle repeats. o Parameter Sensitivity: Population stability depends heavily on parameters. For instance: High grass regrowth rates can prevent sheep extinction by ensuring continuous food availability. High movement costs or low energy gains can lead to population collapse if agents cannot sustain their energy needs. 2. Emergent Dynamics: o Even in this simple model, complex behaviors such as population cycles and extinction events emerge due to the interactions between agents and resources. o Changes in one agent type (e.g., wolves) directly impact the others, showing interdependencies common in real ecosystems. Implementation in NetLogo 1. Code Structure: o Setup Procedure: Initializes the world, including agent counts, grass distribution, and resets the model's time ticks. o Go Procedure: Main loop for the model where agents perform behaviors in sequence; stops if all sheep or wolves die. o Plotting: Tracks population changes over time, providing a visual indication of population dynamics. 2. Simulation Controls: o Sliders for parameters (e.g., grass regrowth rate, movement cost) allow easy adjustment to study different scenarios. o Stop Conditions: Model halts when either sheep or wolves are extinct, highlighting the need for balanced conditions to maintain population oscillations. Lecture notes Creating an ABM Designing your model Building your model Examining your model What is a model? A conceptual / textual description A software-based implementation 2 major categorties of ABM: 1. Phenomena-based modeling: model captures the referent pattern (e.g. segregation, spiral formation, oscillating population of agents /species) 2. Exploratory modeling: create agents, define their behavior, and explore the patterns that emerge What do research questions look like in the design of models? How does a colony of ants forage for food= No clear question, but want to model X and see what happens Conceptualizing vs. Coding models Top-down: Develop entire conceptual model first then implement it Need to have research question, design agents and their rules for behavior, elements of the situation /environment Refine and revise until it has enough detail to be coded Buttom-up Choose a domain of interest, start coding somethign relevant to the domain, adding in the conceptualizations, mechanisms, properties, entities along the way => In practice: a combination of approaches ABM design principle Start simple and build toward the question you want to answer => start with the simplest set of agents and behevaiors relevant to your topic => always keep your research question in mind (avoid unnecessary stuff) => make sure the modeling method fits with the question (agent/based vs. equation based) => heterogenous agent inhabiting space vs. Values following a funciton Verification Ensuring that a computational model faithfully implements it's target conceptual model Simpler models are easier to verify, and scale up form Each version of the model should be linked to a research question Choosing your research questions Make sure the modelling method fits the question (ABM vs. EBM) o Heterogeneous agent inhabiting space vs. Values following a function Choosing your agents Agent properties Environmental characteristics and stationary agents Agent behavior Time steps Parameters Measures SUMMARY OF WOLF SHEEP SIMPLE MODEL DESIGN Question: Under what conditions do two species sustain oscillating positive population levels in a limited geographic area when one species is a predator of the other and the second species consumes limited but regenerating resources from the environment? Agent types: sheep, wolves, grass Agent properties: energy, location, heading (wolf and sheep), grass amount (grass) Agent behaviours: move, die, reproduce, eat (wolf only), eat grass (sheep only), regrow. Parameters: number of sheep, number of wolves, move cost, energy gain from grass, energy gain from sheep, grass regrowth rate Time step: 1. Sheep and wolves move 2. Sheep and wolves die 3. Sheep and wolves eat 4. Sheep and wolves reproduce 5. Grass regrows Measures: sheep population vs. Time, wolf population vs. Time Examining your model Multiple runs: BehaviorSpace tool in Netlogo or R control for netlogo Keep time steps constant but keep random seeds Parameter sweeping and results collation: Robustness and sensitivity analysis Data analysis Statistical inference, visualization, etc. Lecture 6: Components of Agent Based Models Overview of Agent-Based Models (ABMs) 1. Core Components: o Agents: The basic units, defined by their properties and behaviors. o Environment: The space where agents act, which can also act autonomously. o Interactions: Can occur between agents or between agents and the environment. 2. Additional Components: o Observer/User Interface: Allows users to direct agents and observe model behaviors. o Schedule: Dictates when agents perform actions, often controlled by commands like SETUP and GO in NetLogo. Example Models 1. Traffic Basic Model: o Illustrates how traffic jams can form as agents (cars) slow down to avoid collisions. o Emergent behavior is seen as jams move backward while cars try to move forward, highlighting the ripple effect in agent interactions. 2. Wolf-Sheep Model: o Demonstrates environment autonomy, with grass patches that regrow independently of agent actions. Agent Characteristics 1. Properties: o Include default properties (e.g., color, coordinates) and model-specific properties (e.g., SPEED in Traffic Basic). o Can be initialized to constant values or distributions (e.g., uniform or normal distribution for variety). 2. Behaviors: o Actions include basic commands like FORWARD, DIE, and MOVE-TO. o New behaviors are often defined to tailor agent actions to the model (e.g., SPEED-UP- CAR and SLOW-DOWN-CAR in Traffic Basic). 3. Agent Types: o Mobile Agents (e.g., turtles in NetLogo). o Stationary Agents (e.g., patches representing static parts of the environment). o Connecting Agents (e.g., links representing relationships between agents). Collections of Agents Breeds: Groups of agents with distinct properties or behaviors, such as "wolf" and "sheep" in predator-prey models. Agentsets: Unordered collections of agents, enabling group actions (e.g., all cars in Traffic Basic above a certain speed). Granularity of Agents Agents should represent the core unit of interaction relevant to the model’s goals (e.g., cells in a Tumor model or humans in an AIDS model). Granularity affects computational efficiency, with a balance needed between model complexity and performance. Types of Agent Cognition 1. Reflexive Agents: Simple, rule-based responses (e.g., slowing down if another car is ahead in Traffic Basic). 2. Utility-Based Agents: Make decisions to maximize certain outcomes, like fuel efficiency in cars. 3. Goal-Based Agents: Operate with specific objectives (e.g., commuting from home to work in the Traffic Grid model). 4. Adaptive Agents: Change strategies based on experience, learning from past interactions to optimize future actions. Advanced Agent Types 1. Meta-Agents: Aggregated entities made up of multiple agents. 2. Proto-Agents: Simplified agents used as placeholders during model development. Lecture notes Exploratory: Basic properties of agents you implement WHO (unique agent ID no.) something and XCOR and YCOR you see what HEADING happens COLOR PCOLOR Top-down and Behvaior: phenomena Forward/backward based approach: Right/left seeing if it for DIE example fits Hatch how the users Types of agents interact. Mobile, stationary, connecting (link two or more other agents) Breeds of agents Bottom-up : just Sets of agents start o Can be used to tell agents of different types / breeds to perform implementing certain actions things in the Computing agentsets software right Computational complexity and efficientcy Big-O: time to complete a function (can take hours) away and then Granularity of an agent seeing how that Atoms, molecules, cells, humans, organizations, and governments fits. Choose a level that can represent the fundamental level of interaction Adaptive needed to understand your phenomenon and research question agents: can o Phenomenon o Research question change Agent cognition types: adaptive, goal-based, reflexive and utility-based agents decisions and Environments strategies Spatial environments (might update => discrete - lattice graphs; square (more similar to cartesian system ) and hex actions based on (more closely approximates a continuous plane) prior histories) => continuous - each point in the space => NetLogo by default is continuous with square lattice overlaid Goal-based agents: attempt to achieve a particular goal Reflexive agents: follow simple rules (e.g. if, then) Boundary contidion: what happens when agents reach the edge of the Utility-based environment? agents: attempt o Toroidal: reappears on the other side (left - right, top-bottom) to maximize a o Bounded: cannot go further utility function o Infinite plane: no limits Networks: useful for spread of e.g. disease, the formation of social groups etc => links are their own agent type and nodes are the patches => Random (random connections), scale-free (sub networks have same features as global network), small-world (small dense clusters with few long distance links) 3D environments o Geographical information systems (GIS) Data about actual physical locations Interactions: agent-self, agent-agent, environment-self, environment-environment agent-environment Observer / User interface Observer : information provided to the user by the model (whole environment, following an agent etc) User input / model output (buttons, sliders, plots etc) Visualization (simplify, explain, emphasize main point) Schedule Description of the order in which the model operates o order of events (important to consider during conceptual model and implementation) Setup & go Asynchoronous updates (updates known immediately) vs. Synchrounous updates (udates known with Lecture 7: Adaptive Agents Key Models and Concepts in Agent-Based Subsistence Modeling 1. Wolf–Sheep Predation Model o Objective: Simulates predator-prey dynamics, illustrating population oscillations. o Mechanics: Sheep consume grass, wolves consume sheep. Grass regrows after a countdown, creating cycles in populations. Too fast regrowth leads to prey boom, then predator overgrowth and crash. o Applications: Basis for many human-environment models, emphasizing balance between consumption and resource renewal. 2. Village Ecodynamics Project Model (Kohler) o Objective: Models Puebloan farming systems dependent on rainfall, exploring effects of climate variability on crop yield. o Mechanics: Uses empirical precipitation and heat data to influence patch productivity, modeling agricultural resilience. o Application: Demonstrates how environmental data informs ABM subsistence models and reflects population resilience under varying environmental pressures. 3. AmphorABM (Crabtree) o Objective: Explores interactions between subsistence and luxury agriculture in ancient Gaul. o Mechanics: Gaulish farmers plant grain, while Etruscan farmers grow wine in specific areas. Wine farming only occurs in coastal regions, leading to competition and trade dynamics. o Application: Shows how specific crops tied to environmental patches can drive societal interactions and trade. 4. MedLanD Model o Objective: Examines Neolithic farming households managing patch productivity. o Mechanics: Agents evaluate soil fertility and plot yields to select fields. Soil regenerates when left fallow, with degradation from continuous use. o Application: Provides insights into agricultural sustainability and erosion, using spatial and temporal landscape dynamics. 5. Patch-Choice Model (Barton) o Objective: Models foraging behavior based on optimal resource return, inspired by the Marginal Value Theorem. o Mechanics: Agents harvest from resource-rich patches until returns decline, then move to a new patch. Tracks caloric returns over time. o Application: Useful for understanding foraging strategies and energy optimization in environments with unevenly distributed resources. 6. PaleoscapeABM (Wren) o Objective: Studies foraging decisions with patch heterogeneity. o Mechanics: Agents assess patches within a radius, factoring anticipated return against movement costs. o Application: Enhances understanding of spatial decision-making, especially where agents must weigh energy benefits and costs. 7. Diet-Breadth Model (Barton) o Objective: Determines forager’s choice of prey based on caloric value and energy costs. o Mechanics: Assigns values and costs to food types, with agents selecting high-return items. Lower-energy states influence diet breadth. o Application: Models decision-making in resource-scarce environments and aligns well with optimal foraging theory. 8. Ger Grouper Model (Clark & Crabtree) o Objective: Explores household fission and survival in variable environments. o Mechanics: Households split when energy is abundant, with energy shared probabilistically with kin. o Application: Demonstrates population resilience and environmental dependency, particularly in nomadic or semi-nomadic societies. 9. Fission–Fusion Model (Crema) o Objective: Investigates group expansion or contraction based on fitness in resource- limited patches. o Mechanics: Agents respond to local productivity, opting to go solo, merge, or fuse with other groups when resources are low. o Application: Highlights population dynamics and migration within environmental constraints. 10. LGM Ecodynamics Model (Wren & Burke) o Objective: Examines population dynamics based on ecological suitability. o Mechanics: Calculates patch suitability to influence agent survival probabilities, with fertility rates reflecting ethnographic data. o Application: Useful for modeling how environmental quality impacts population growth and survival over time. 11. Cardial Spread Model (BernabeuAubán) o Objective: Simulates Neolithic village expansion and migration. o Mechanics: Villages grow based on local resources and split when populations exceed a threshold, following predefined movement rules. o Application: Models agricultural spread and migration patterns in early human settlements. Common Themes and Techniques Energy Trade-offs: Many models integrate energy management, balancing short-term gains (e.g., immediate foraging) with long-term needs (e.g., planting, storage). Environmental Adaptability: Models emphasize how agents adapt to environmental pressures, such as climate oscillations or patch productivity. Resource Depletion & Regrowth: Frequently, patches represent resources that agents consume and must wait to renew, demonstrating how scarcity impacts behavior. Agent Decision-Making: Choice mechanisms, like marginal returns or fitness thresholds, guide agents on whether to stay, move, or interact with others based on available resources. Lecture notes Subsistence: Resilience: when an agent Capacity of a system to recover from hardship and external fluctuaions or oganism Spatial variability: clusteing of resources or other external factors that differ maints or across the environment (modeled area) Temporal variability: environmental changes that fluctuate over time supports (climate, weather, and how these affects the resources) oneself often AmphorABM model minimally 2 types of farmers (Gaulish (wheat) and Luxury farmers(wine)) (subsistence Patch specific growth (wheat can be grown anywhere and wine can grow only along based models the river) focus on patch- Energy expenditure in amphorABM agent Loss due to planting interaction Alcohol decreases energy expenditure (due to drink /planting party) and/or patch- Access to metal reduced energy expanded agent-agent Some grain is stored, other is used for energy interactions) Can store food to increase resilience (might decay though) Foraging algorithms Optimal Optimal foraging theory foraging theory: Marginal value theorem resource Expenditure require to travel and search new locations acquisition => Patch choice: nehavior that There are productive and unproductive pataches with a certain food value Density of productive patches can be set maximize net Foragers gain energy by harvestng food and consuming it benefit (after Track past 10 time steps of food values collected accounting for Continues foraging until the current rate of patch drops below envounter rate costs) for entire region (based on rolling average of prior time steps). If lower, Marginal value moves to new location with distance 10. theorem: point Population dynamics Considering how a population might split (hourseholds) and reproduce when of departure energy levels or population sizes reach a threshold where a current "households" extract and consume energy from "productive" patches and location drops share them according to probabilities with relatives below the Need to find balance of productivity of patches and reproduction average return rate of the environment Social dynamics and the tragedy of the commons Can be used as a model of how agents interac and negotiate the use of common recourses Optimizing self-interest can drive a system to collapse (no longer benefits anyone) Prisoner's dilemma Game theory- mathematical models of interactions between agents trying to optimize individual utilizy while outwitting their opponents What has be best overall option? / what has the best individual option? Prisoner's dilemma evolutionary Multiple players and iterations Assumes an increase in number of people corporate will increase proportional to benefit for each cooperating player Defecting players have a value a * no. Of players that coorporate Coorperation is thus contingent on the factor multiple (alpha) for not cooperating Parameterization and input data Emulation-driven models o data driven models with a high degree of realism and validated against datasets o meticulously derive parameters from data (e.g. population - age-specific fertility rates) Exploration-driven models o theory driven models with high degree of abstraction and generality. Not necessarily validated o systematicall vary parameters under a range of conditions (sometimes arbitrary), where relative relationship is more important Lecture 8: Analyzing Agent Based Models Reading notes Key Points Statistical Analysis: Using descriptive statistics like means, standard deviations, and hypothesis testing to summarize and understand model behavior. Graphical Representations: Creating visualizations like time series plots and 3D charts to identify patterns and trends in model outputs. Network Analysis: Examining network properties like average degree, clustering coefficient, and path length to understand how interactions between agents affect model dynamics. Spatial Analysis: Leveraging landscape metrics like edge density to quantify spatial patterns in the model environment and their impact on processes like disease spread. Necessity of Multiple Runs: Running ABMs multiple times is crucial due to the inherent randomness in their algorithms, allowing researchers to characterize the distribution of model outputs. Batch Experiments: Using tools like BehaviorSpace to automate the process of running multiple parameter sweeps and collecting the results. Combining Techniques: Integrating different analysis methods (e.g., statistics, graphs, networks, spatial) to gain a more comprehensive understanding of ABM behavior. Modeling the Spread of Disease The Spread of Disease model demonstrates how diseases can spread through a population, with agents moving randomly and infecting others upon contact. Increasing population density leads to faster disease spread, as there are more opportunities for infection. (Section: Modeling the Spread of Disease) The model can also be adapted to include environmental factors, where infected agents leave behind "infectious" patches that can infect other agents. (Section: Environmental Data and ABM) Network-based variants of the model show how the structure of social connections affects disease propagation. (Section: Analyzing Networks within ABM) Statistical Analysis Descriptive statistics like means and standard deviations can be used to summarize model outputs and identify trends. (Section: Statistical Analysis of ABM: Moving beyond Raw Data) As population density increases, the mean time to 100% infection decreases, and the standard deviation also decreases. (Table 6.4) Statistical analysis is a common method for confirming or rejecting hypotheses about ABM behavior. (Section: Statistical Analysis of ABM: Moving beyond Raw Data) Graphical Representations Graphs and visualizations can help identify patterns and trends in model outputs that may not be apparent from raw data. (Section: Using Graphs to Examine Results in ABM) Time series plots can reveal different phases of model behavior, such as slow initial growth, rapid expansion, and eventual saturation. (Section: Using Graphs to Examine Results in ABM) Overlaying multiple runs on the same graph can show the characteristic behavior and variability of the model. (Section: Using Graphs to Examine Results in ABM) Network Analysis In the network variant of the Spread of Disease model, the average degree (connections per node) has a significant impact on the extent of disease spread. (Section: Analyzing Networks within ABM) As the average degree exceeds 1.0, a "giant component" forms in the network, allowing the disease to infect a large proportion of the population. (Section: Analyzing Networks within ABM) Network properties like clustering coefficient and average path length can also be used to analyze how the structure of interactions affects model dynamics. (Section: Analyzing Networks within ABM) Spatial Analysis In the environmental variant of the Spread of Disease model, the decay rate of the disease in the environment affects the time to 100% infection. (Section: Environmental Data and ABM) Landscape metrics like edge density can be used to quantify the spatial patterns of disease spread and inform intervention strategies. (Section: Environmental Data and ABM) Integrating ABMs with Geographic Information Systems (GIS) can provide a powerful combination of spatial pattern and process modeling. (Section: Environmental Data and ABM) Table: Time to 100% Infection Population Mean Std. Dev. 50 366.8 47.39385802 100 213.8 27.40154091 150 144.4 17.65219533 200 118.7 12.12939497 This table summarizes the mean and standard deviation of the time to 100% infection for different population sizes in the Spread of Disease model. (Section: Statistical Analysis of ABM: Moving beyond Raw Data) Analyzing Agent-Based Models (ABMs) 1. Types of Measurements in ABMs Statistical Measures: Basic summaries like mean, standard deviation, and distributions are used to understand general trends and variability. Time Series Analysis: Time series data captures changes in the model over time. This analysis can identify patterns, phases, and different behaviors (e.g., slow growth, rapid infection spread). Network Analysis: Essential when interactions are defined by social networks rather than physical space, e.g., disease spread on social networks. Spatial Analysis: Useful for examining patterns that emerge in physical space, like environmental infection spread. 2. Statistical Analysis and Summarization Summarizing Data: Use mean and standard deviation to identify trends. For instance, in disease spread, higher population density often decreases time to full infection, as agents have more contact opportunities. Multiple Runs: Given randomness in ABMs, running models multiple times helps establish reliable patterns. Tools like NetLogo’s BehaviorSpace automate these batch runs and enable parameter sweeps. 3. Graphical Analysis Plotting Raw and Summary Data: Gra3phs illustrate trends and make it easier to interpret data. For example, plotting infection rate against time can reveal phases of rapid spread. Error Bars and Standard Deviation: Adding these elements shows variability across multiple runs, clarifying the consistency of patterns in the data. 4. Network-Based Analysis in ABMs Network Properties: In network-based ABMs, properties like average degree, clustering coefficient, and path length impact the model. For example, a higher average degree (connections per node) typically facilitates faster spread. Threshold Effects: When average degree exceeds a critical value (e.g., 1.0 in a random network), a giant component forms, enabling widespread infection. Social Network Analysis (SNA): SNA measures, like clustering, support analysis of interaction patterns. This complements the process modeling in ABMs. 5. Spatial Analysis with Geographic Information Systems (GIS) GIS Integration: Geographic data adds spatial layers to ABMs, enabling complex spatial pattern analysis. GIS tools (e.g., ArcGIS) can work with ABM data for comprehensive spatial modeling. Edge Density: Measures the density of infected areas (infected vs. non-infected regions), guiding intervention strategies in spatially dispersed infections. 6. BehaviorSpace in NetLogo for Automated Experimentation Parameter Sweeps: BehaviorSpace allows parameter variation across runs, which can help identify critical thresholds or conditions in model behavior. Multiple Parameters: Running experiments by adjusting multiple parameters (e.g., population density and movement speed) captures more complex dynamics and interactions. 7. ABM Design Considerations Simplicity vs. Complexity: Start with a simple model, adding complexity only as needed. Excessive parameters increase validation difficulty and make pattern identification challenging. Control and Validation: With multiple parameters and outputs, validating ABMs against real- world data is essential for reliability. 8. Methods for Dealing with ABM Data Complexity Statistical, Graphical, Network, and Spatial Data Types: Different analysis methods support different insights—statistics for trends, graphs for visual trends, network measures for social interaction modeling, and spatial data for geographic patterns. Combining Data Types: Using these data types as both inputs and outputs (e.g., initializing a model with network properties or adjusting parameters dynamically based on graphical insights) allows a richer, more integrated understanding of the system. 9. Practical Example - Spread of Disease Model Random Movement Model: In the baseline disease spread model, agents move randomly, infecting others on contact. Analysis of infection over time reveals different infection phases: initial slow growth, rapid spread, and tapering off as susceptible agents decrease. Network-Based Variation: When disease spread depends on a network, infection may only reach all agents if average connections per node are above a threshold. Environmental Variation: Environmental transmission allows infection persistence on surfaces, influencing spread dynamics based on decay rate and contact frequency. Lecture notes Types of measurements and when to think about them Good to know what you want to measure and analyze before you build your model o e.g. measuring time to 100% infection in population at various population sizes o Traffic throughout, population size, etc. Should be clearly linked with a research question or goal Why we need multiple runs: there are randomness in our models ABM employs randomness so the measures will vary from one run to the next Sampling error - we want to be confident that our results are robust How many runs do we need? Usually 100 - 10 000 It depends on the number of parameters, convention, variance stability or power analysis (detecting effects) If we don't know the effect size, we cannot conduct an analysis method to determine how many runs are neccessary Variance stability: look at variance across samples (runs), set a threshold (e.g. E ~ 0.01) , nmin = coefficient of variation from consecutive sample sizes < E Power analysis: G*Power Need to know wha kind of analysis you plan to do, and what size effect you might expect (or a range) Parameter sweeping / sensitivity analysis Systematically checking the plausible range of parameter values Assess the important of parameters on model behavior Could be the key thing that drives your research question o levels of a certain parameter o determine how the other parameters effect the key behavuor your observe Statistical analysis of ABM Descriptive statistics: Means, standard deviations, medians, and other methods of analyzing the values of a variable Inferential statistics- to compare different methods, models with different parameters, to model patterns in output etc. Types of data to analyze from ABMs Statistical Graphical Network-based Spatial Graphical: Outgrowth of statistical results: transforms statistical results into graphs that can be more easily exmained by the observer. Network-based Have to consider metrics for network model because some options are not viable o e.g. may never reach 100% infection of population with less connected nodes o Termination criteria for experiemnts Other ideas could cluster coefficient, path length, node centrality, etc. Spatial analysis and environment Analysis of patterns of variable in a one-, two-, or higher dimensional space, and they frequently address questions regarding the pattern of data in the space (or in interaction with space) e.g. environmental variant of spread disease model Validation, verification, and replication Model validation: determine whether the model corresponds to the real-world phenomenon Model verification: determine whether implemented model corresponds to target conceptual model Model replication: someone else implements the model and sees if the results are consistent. Lecture 9: More on Analysis of ABMs Reading notes 1. Overview of Experiment Design Experiment Design: The process of running simulations to understand model behavior. This involves testing various parameter configurations and analyzing the resulting data. Purpose: To validate model dynamics, compare results to real-world data, and explore how input parameters affect outcomes. 2. Key Concepts Parameter Sweep: Testing a range of parameter values systematically while holding others constant to understand their impact. Sensitivity Analysis: Determines how changes in input parameters affect the model’s outcomes. Useful for identifying which parameters have the most influence. Uncertainty Analysis: Tests the robustness of model outcomes by varying parameters that have uncertain values. Helps assess the reliability of the model's results. 3. Data Collection and Exporting Types of Data: o Artificial Data: Data generated by the simulation (e.g., population counts, agent interactions). o Output Measures: What you record from the simulation, like the number of agents, resource use, etc. Exporting Data: o Use tools like NetLogo’s BehaviorSpace to automate running parameter sweeps and export data. o Export formats: CSV files are common for further analysis in Excel, R, or Python. 4. Analysis Techniques Analyzing Output: o Visualization methods: Scatter plots, line graphs, and bar charts to observe relationships between parameters and outcomes. o Common tools: Excel for basic plotting; R and Python for more complex data manipulation and visualization. Interpreting Results: o Identify trends and patterns, such as linear, nonlinear, or threshold effects. o Relate findings to research questions and validate results against archaeological data. 5. Emergence in ABM Emergence: The appearance of unexpected, large-scale patterns from the interactions of individual agents. Example: A society-wide change in pottery use due to individual trade preferences. Importance: Emergence helps reveal complex dynamics that might not be apparent without a model. 6. Practical Modeling Considerations Calibration: Adjusting parameters to match real-world data, narrowing the parameter space to plausible ranges. Scenario Comparison: Testing different configurations (e.g., varying agent behavior or environmental conditions) to compare outcomes. Run Duration: Determine when to stop a model—either at a fixed point (e.g., 500 years) or when it reaches equilibrium. 7. Documentation and Open Science Model Documentation: o Use protocols like ODD (Overview, Design concepts, and Details) for consistency. o Include setup, parameters, and code explanations for transparency. Sharing Code: o Make code available in repositories (e.g., GitHub) with proper licensing. o Encourages peer review, replication, and further research by other scholars. 8. Tools and Practical Tips NetLogo’s BehaviorSpace: For running parameter sweeps and collecting data efficiently. Visualization: Use R or Python for large datasets or complex plots; Excel is suitable for quick plots. Common Issues: o Be aware of burn-in periods where the model needs to stabilize before collecting data. o Stochastic models may require multiple runs to capture variability. Lecture notes Sensitivity Goal of analyzing (simulated) ABM data analysis: Tests Experimental design that: the model to Empirically demonstrates that a given pattern reliably occurs see how much under certain conditions a model's That specific factors ( encoded as parameters), results in distinct outputs output will be Can explain why this happens affected by incremental changes to various plausible parameter values, One factor at a time sweeps (OFAT) Uncertainty analysis: Tests whether different values that you do not know are true AmphotABM key questions and data or false will 1. what was the max. amount of wine that could be produced in this area have any under certain conditions impact => calculate how much wine the agents produce 2.How quickly would Greek wine replace Etruscan wine if people had different levels of preference for the former? => record proportion between two wines over time; or the time when greek wine is more abundant than etruscan 3.under what conditions is the density of vitivulture in different parts of the area consistent with the archaeological record? => record presence/absence of winemakers on each patch and ist changes over time How long should you run the model (number of ticks)? A predetermined duration (a meaningful time unit for RQ) Point of equilibrium - moment in the simulation when the model stabilizes and nothing "new" can be learned from Predator-prey (reaches a relatively fixed range oscillation) Can also use coefficient of variation with a run Way to extract the data Data for any plot of interface can be exported Export-my-data procedure Any time with button on INTERFACE Every tick by putting it at the end of the go procedure Every n number of ticks using reminder in go At the end of simulation within a stop condition How and what to publish Two audiences: domain / content specialists and other scientific modelers Calibrate paper to both types of readers Model should be described enough in text with visualization to help reader understand results But excessive technical details and code are supplementary material What is done => description of model methods Why => motivation and justification for algorithms and coding decisioins being made Recap: 1. Experimental design a. How to answer key research questions (what measures, scenarios, parameters) 2. Length of simulation 3. Number of runs 4. Sensitivity analysis 5. Statistical tests 6. Open science efforts Lecture 10: Example publication combining ABM, MAS and cognition reading notes Key Points 1. Cultural Attractors as Cognitive Alignment: o Cultural attractors emerge from individual cognition influenced by group dynamics and cultural transmission (Sperber, 1996; Boyd & Richerson, 2005). o Example: This study uses an agent-based model (ABM) to explore how individual cognitive biases shape emergent cultural attractor landscapes. 2. Computational Models of Collective Perception: o Previous work includes computational explorations of category formation in groups, e.g., phoneme categorization (De Boer, 2000; Baronchelli et al., 2010). o These models often abstract away individual cognitive differences, which this study addresses by integrating cognitive realism into an ABM. 3. Agent-Based Models with Multi-Agent System Dynamics: o The model builds on multi-agent systems (MAS) with agents interacting and adapting their "cognitive landscapes" based on observed signals. o Agents use Gaussian Mixture Models (GMM) for category learning, allowing the simulation of cognitive constraints and demographic influences on cultural evolution. 4. Cross-Domain Connections: o The model is applicable beyond linguistic cognition, exploring cultural phenomena like symbolic communication and behavioral patterns (e.g., Deacon, 1998; Csibra & Gergely, 2011). Highlights of Relevant Literature 1. Cultural Evolution Frameworks: o Buskell (2017) and Henrich et al. (2008) bridge Darwinian selection and transformative cultural attraction theory. o Previous models (Acerbi & Mesoudi, 2015; Sperber, 1996) focus on how cultural attractors stabilize through repeated interactions. 2. Multi-Agent and Category Dynamics: o Steels & Belpaeme (2005) model grounding perceptual categories using MAS, focusing on linguistic emergence. o Models like Reali et al. (2018) incorporate transmission noise and population size effects, aligning with this study's findings. 3. Integrative Theories: o The approach integrates multi-level dynamics, including cognitive priors, developmental timelines, and population-level demographic structures, extending work by Kirby et al. (2008) and Skyrms (2010). 4. Applications of Noise and Variability: o Turner & Smaldino (2018) and Wiesenfeld & Moss (1995) highlight the role of stochasticity in cultural and opinion dynamics, echoing findings on noise-driven stability and complexity in this model. Lecture notes (no flashcards on this lecture) => categorical regression and two-sample t-test The model used in Falandays and Smaldino article (cultural attractors) could possibly be useful for studying what other things? => language, tools, ideas and customs Cultural attractor Key ideas o Cognitive landscape of individuals o Interdependence between individual agents and population which defines the culture o Explore the role of innate cognitive capacities, levels of transmission error, production biases, learning periods, lifespans, and population sizes to understand the conditions that may be favorable or unfavorable for cumulative culture to emerge, via collective cognitive alignment Agent details Each agent i possesses in memory a set of K categories, where each category J is defined as a two-dimensional gaussian distribution defined by mean and sd, Amplitude: best rate of category Correlation between dimentions An agent's set of categoies as mixture of Gaussians (MOG) Model at each discrete time step Communication Random selection of nearby agent to communicate with Communicates a signal from a category (based on amplitude coefs) Biased towards mean value of a category and ensures that production of a category within an individual is less variable than those encountered in the population Noise added to signal Agents update their categories by mapping the communication to ist most similar category and updates that frequency while lowering the frequency of others Reproduction Each agent has a probability of 1/L of dying, giving an expected lifespan of L iterations Any agent who dies is removed and replaced by a new agent Important for critical period simulation f Outcomes Complexity ▪ Shannon entropy of frequency distribution of k-means clusters Discriminability ▪ Coefficient of k-means clusters with -1 to 1 (indicating well separated clusters) (In)stability ▪ Dissimilarity metric for probability distributions (earth mover's distance) Conformity ▪ Average dissimilarity of the distribution of signals generated by an individual agent to the distribution generated from the rest of the population All metrics standardized Transmission noise o Sources of noise modulate a trade-off between complexity and discriminability, or stability and conformity o Critical period Enhances the stability over time Shorter learning times increase complexity Longer lifespans result in a decrease in complexity at the population-level o Smaller populations maintain more complex distributions Distributions more stable within large populations What does this paper provide us? - an example of an ABM considering MAS and cognition - connection between theory, prior work, and current approach - methods and results for analysis of ABM o measures, parameter investigation, etc, - ways to visualize design of model, output of model, and results - how to write up results and include interpretations - some limitations of model (e.g. not fitness landscape) and ideas for the future