An Introduction to Multiagent Simulation 31 05 2002















































- Slides: 47
§ An Introduction to § Multi-agent Simulation 31 -05 -2002
Agenda Context and Issues Introduction to simulation Multi-agent simulation Business process modelling and simulation Simweb perspective Modelling exercise \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 2
Agenda Context and Issues Introduction to simulation Business process modelling and simulation Multi-agent simulation Simweb perspective Modelling exercise \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 3
Context and Issues Objective of the Training Seminar: The Modeler’s View § § This seminar is a deliverable of work package 1, “Participatory Problem Analysis” The objective of is to 1. Refine the definition of the problem and the user requirements 2. Establish a common knowledge base among all participants in the project § § We should add “model specifications” to the first point When talking about building models in Sim. Web, we should distinguish two aspects 1. Creating the model infrastructure 2. Implementing the sector model(s) § Today we would like to gain a better understanding of what we can expect as input from the other partner activities and how the modelling process takes account of the information \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 4
Context and Issues “No-Model” Model Infrastructure The Modelling Process How? Simulation System Calibration Feedback Evaluation Real-World Description Market Analysis \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar Stakeholders 5
Context and Issues We would like to (better) understand. . . § § § . . . the strategy of the market analysis – what are you looking for and how is this decided? . . . how the results of the market analysis can be used to build the sector models. . . how the choice of model (MA simulation in our case) constrains the market analysis methodology – e. g. aggregate vs. agent model. . . how MA models are designed and adjusted in other areas of social science (e. g. Firma) – the process. . . if, how, and when the participatory evaluation methodology influences the modelling process We propose to set up a work package spanning task to address this problem \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 6
Agenda Context and Issues Introduction to simulation Business process modelling and simulation Multi-agent simulation Simweb perspective Modelling exercise \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 7
Introduction to simulation Formal modelling formal modelling mathematical analysis computer simulation physical sciences social sciences \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 8
Introduction to simulation The uses of simulation § Understanding of features in the social world § Prediction: e. g. business forecasting, demography over the years § Tools: expert systems (simulate expertise of professionals) § Training: flight simulators, simulators of national economies § Entertainment: Sim. City, Sims, flight simulators. . . § Formalisation: theory (precise, coherent, complete) § Discovery of consequences in the artificial society \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 9
Introduction to simulation The logic of simulation parameter estimation simulation predicted data simulated model abstraction similarity target collected data gathering \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 10
Introduction to simulation Stages of simulation-based research designing a model \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar building the model verification and validation publication 11
Introduction to simulation Model accuracy simplicity understanding \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar accuracy prediction 12
Introduction to simulation Social simulation: special features non-linearity bounded-rationality l linear: proportional l local information l non-linear: chaotic l limited capacity to process information complexity self-organisation l simple behaviour and simple rules > complex organisation (sand pile, ants. . . ) l appears without central planning from the actions of individual agents l mathematical analysis impossible l flocks, markets, Internet. . . emergence l interactions among objects at one level give rise to different types of objects at another level \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 13
Introduction to simulation Types of simulation § Discrete event • event: distinct points of time • between two consecutive events nothing happens • number of events are finite § Continuous t • the state changes all the time (e. g. water level in a reservoir) • discrete event simulation can serve as an approximation. t \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 14
Agenda Introduction to simulation Business process modelling and simulation Multi-agent simulation Simweb perspective Modelling exercise \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 15
Business Process Modelling and Simulation § BPM commercial software packages facilitate business process improvements through modelling and simulation. § They allow to: • Model your processes to define, document, and communicate. • Simulate the future performance of your business to understand complex relationships and identify opportunities for improvement. • Visualise your operations with dynamic animation graphics. • Analyse how your system will perform in its “as-is” configuration and under a myriad of possible “to-be” alternatives so that you an confidently choose the best way to run your business. \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 16
Business Process Modelling and Simulation Examples § Mortgage Applications • Simple mortgage application review process. § Truck Assembly • This model demonstrates the operations of a truck assembly line. A new truck chassis enters the line every 9. 5 minutes. It is then conveyed down the line from work position to work position, whereby each work position adds a part or performs an operation. The model animation includes a display of utilization statistics for each work position, as well as the number of trucks produced. § Flexible Manufacturing • This model shows a detailed operation of a typical factory. The Factory includes an Injection molding area, machining centre, foam gasket assembly, painting area, and warehouse. Detailed statistics are kept for performance measurements at each area. \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 17
Mortgage Application Simulation Run \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 18
Mortgage Application Reports \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 19
Truck Assembly Simulation Run \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 20
Flexible Manufacturing Simulation Run \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 21
Agenda Introduction to simulation Business process modelling and simulation Multi-agent simulation Simweb perspective Modelling exercise \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 22
Multi-agent simulation What is an agent? A weak definition § “Computational system situated in some environment, that is capable of flexible autonomous action in order to meet its design objectives” [Jennings et al. 1998] § By flexible, it is meant that the system is: • Responsive. Agents perceive and respond to their environment. • Pro-active. Goal-directed behaviour; agents take the initiative. • Social. Capability of interacting with artificial agents and humans. \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 23
Multi-agent simulation Simulation and the environment § Collective behavioiurs of a system’s components can have dynamics that influence the environment. If so • constraints on components are not fixed • attempts to analyze the system must provide ongoing mutable parameterization of the environment § Even when a clean formulation is possible, analysis often involves concurrent expansion of recursive functions -> analytical compression is hard or impossible \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 24
Multi-agent simulation Why multi-agent simulation? § To study complex nonlinear systems e. g. • Organisms Cell behavior drives and is driven-by metabolism, hormones • Ecologies The viability of a certain species being dependent on a complex of other species • Economies Consumer behaviour drives economy. Economy places constraints on consumers. • Transportation Automobiles make up traffic patterns. Traffic jams constrain drivers \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 25
Multi-agent simulation Why multi-agent simulation? Synthesis and Analysis § With synthesis, the modeller aims to accurately describe a systems' components and plausible interactions, and then use a realization of that description as an empirical basis for study of the systems' global dynamics. § This bottom up approach is called Agent-Based Modelling (ABM). § ABM complements and enhances, rather than supplants, traditional approaches. § Agent-based models allow us to study • Spatial interaction • Adaptive, heterogeneous agents • Agents which face costs of information acquisition and processing • Nested subsystems - economy, markets, firms, plants, employees • etc. \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 26
Multi-agent simulation How to If <cond> then <action 1> else <action 2> Inanimate agents Animate agents Observer Data Organizations of agents Artificial world \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 27
Multi-agent simulation Discrete event simulation § Simulation proceeds in discrete time steps § Interaction between agents or procedures within simulation may have own event schedule \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 28
Multi-agents simulation Software § Software: • • • Agent. Sheets ARVA (cellular automata) Ascape CABLE CORMAS EVO (Swarm-based) MAGSY Multi-agent modelling language – MAML (Swarm-based) REPAST (Java, Swarm-like) Sim_Agent Swarm XRaptor \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 29
Multi-agent simulation An implementation: Swarm § Objective C, Java… § Object-oriented (not agent-oriented) § Structure: Schedule The Model Swarm Probes Agent Sub-Swarm The Interface \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 30
Multi-agent models An implementation: Swarm § A computer’s CPU executes program instructions § Swarm kernel is virtual CPU running model and GUI events GUI § Nested Swarms merge activity schedules into one Swarm kernel Model Operating System CPU A Swarm as a virtual computer \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 31
Multi-agents simulation Examples § Examples: • Sugarscape • MANTA • Evolution of organised society (EOS) • SFI Artificial Stock Market • Fish Market \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 32
Multi-agent simulation Artificial stock market: why agent-based simulation? Standard economic theory § Agents are homogeneous • same demand functions for assets • rational expectations about prices and dividends § There exists unique price that clears the market § Researchers can obtain analytical solutions § Agents are heterogeneous!!! They act and evolve differently Agent-based simulation (there are signs of heterogeneity in the rules that financial agents apply) § Agents are not hyper-rational utility maximising but rationally bounded § Mathematical analysis too complex. Difficult to obtain the clean solutions found for homogeneous agents. \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 33
Multi-agent simulation Artificial stock market: multi-agent model § Standard neo-classical model of asset pricing § Agents are risk averse. § Agents have heterogeneous demand functions for the asset that change based on their prediction of next period asset price and dividend. § Each agent employs a number of different ways to forecast prices and dividends. § Agents evolve over time via evolutionary algorithms. § Auctioneer calculates the price the most closely cleas the market. \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 34
Multi-agent simulation Artificial stock market: multi-agent simulation parametrisation num. BFagents – the number of agents in the simulation. initholding – the initial asset holding of each agent. initialcash – the initial cash holding of each agent. minholding – the minimum asset holding of each agent (short selling constraint). mincash – the minimum cash holding of each agent (borrowing constraint). intrate – the interest rate. baseline – the dividend baseline. mindividend – the minimum dividend. maxdividend – the maximum dividend. amplitude – the amplitude of deviations from the baseline. period – the mean period or auto-correlation time. exponential. MAs – whether moving averages are exponential or uniform maxprice – the maximum price. minprice – the minimum price. taup – moving average healing time for profit. sptype – the specialist type maxiterations – the maximum number of price iterations for iterative specialists. minexcess – the target for |bids - offers| for iterative cases. eta – the amount by which price changes per bid or offer for eta specialist. etamax – maximum value of eta with the adaptive eta specialist. etamin – minimum value of eta with the adaptive eta specialist. rea – dividend multiplier for RE price with the re specialist. reb – constant offset for RE price with the re specialist. random. Seed – the random number seed for the market and specialist (0 is random). tauv – moving average healing time forecaster variances. \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 35
Multi-agent simulation Artificial stock market: multi-agent simulation parametrisation numfcasts – number of forecasters per agent. tauv – moving average healing time forecaster variances. lambda – the degree of agent risk aversion. maxbid – the maximum bid or offer. selectionmethod – the method by which to select between activated rules: best, roulette, or average. mincount – the minimum number of observations before a forecaster is used. subrange – this is used for initialization of the forecast parameters a, b, and c. min and max values of the parameter a ( the coefficient on pt+dt in the prediction equation). min and max values of b (the coefficient on dt). min and max values of c (the constant term). newfcastvar – variance assigned to a new forecaster. initvar – variance of overall forecast for time steps t < 200. bitcost – penalty parameter for specificity (i. e. , non-hashed bits in a forecaster). maxdev – max deviation of a forecast in variance estimation. individual – whether to use individual forecast variances: yes or no. bitprob – probability each bit is either 0 or 1 (i. e. , non-hashed) initially. \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 36
Multi-agent simulation Artificial stock market: multi-agent simulation output \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 37
Multi-agent simulation Fish market (I) \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 38
Multi-agent simulation Fish market (II) \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 39
Multi-agent simulation Fish market (III): tournament setting \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 40
Agenda Introduction to simulation Business process modelling and simulation Multi-agent simulation Simweb perspective Modelling exercise \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 41
Simweb perspective Multi-agent simulation for strategical decision § Simweb allows to research or adapt business models to new reality of digital content markets. § Simweb allows to determine business models which minimise the risk over a rank of possible futures, as well as those with the highest success or failure probability. § Simweb uses multi-agent simulation to forecast the reacheable market shares for each scenario. § Simweb is based on market characterisation: • consumers (i. e. bargain hunters, image sensitives. . . ) • products (i. e. low-cost, high marketing investments. . . ) • providers (business models) \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 42
Simweb perspective Digital content distribution model l l consumers l l 20 -35 years old 15 -30 €/month high bandwidth <5 conn/week <20 years old <10 €/month high bandwidth >30 conn/week l pay-per-download: 0, 10€ l max: 1 Mb/s l month subscription: 20€ l max: 10 downlds \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar providers 43
Simweb perspective Multi-agent simulation for supporting strategical decisions Expected Market Share Decision Maker NEW MARKET STRATEGY Simweb is meant to be a strategic decision support tool to help select the most succesful business models in the digital contents sector. \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 44
Agenda Introduction to simulation Business process modelling and simulation Multi-agent simulation Simweb perspective Modelling exercise \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 45
Modelling exercise Fish market \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 46
Modelling exercise Technical Issues § Agent Description • Why multi-agent simulation? • Describing agent roles • Describing agent interactions § How do we implement interaction protocols § How do we model the environment? § How can we interpret the results? § Once the (uncalibrated) model is produced: • How should we adjust it? • What elements of the model are affected by the adjustments? - Structural - Parameters \Usersi. SOCOLabProjectsSimwebSIMWEB-MAS-20020531 -jar 47