KuKi Simulation 384.112 VU 2.0 Simulation AK der Kognitionswissenschaft und Künstlichen Intelligenz Institut für Computertechnik ICT Tobias Deutsch Institute of Computer Technology Simulation Simulation Types of Simulation Predictability Time model Locality Agent Based Simulation Bubble Family Game Institut für Computertechnik KuKI: Ausgewählte Kapitel Kognitionswissenschaft & Künstliche Intelligenz 2 Computer Simulation Definitions The process of imitating a real phenomenon with a set of mathematical formulas. http://www.webopedia.com Simulation ist die Nachbildung eines dynamischen Prozesses in einem realen Modell, um zu Erkenntnissen zu gelangen, die auf die Wirklichkeit übertragbar sind. DIN 3633 A computer simulation or a computer model is a computer program which attempts to simulate an abstract model of a particular system. http://en.wikipedia.org/wiki/Computer_simulation Institut für Computertechnik KuKI: Ausgewählte Kapitel Kognitionswissenschaft & Künstliche Intelligenz 3 1 KuKi Simulation Why Simulate Closed form analytic solutions not possible Real world experiments not possible Target system does not exist (yet) Prove a theory in controlled environment Etc. Institut für Computertechnik KuKI: Ausgewählte Kapitel Kognitionswissenschaft & Künstliche Intelligenz 4 Simulation Cycle F.Breitenecker TU Wien Institut für Computertechnik KuKI: Ausgewählte Kapitel Kognitionswissenschaft & Künstliche Intelligenz 5 Simulation Modeling Steps Problem formulation Modeling / Degree of abstraction Analysis of model Verification of model If verification against problem formulation fails, back to Modeling Experiments with the model Institut für Computertechnik KuKI: Ausgewählte Kapitel Kognitionswissenschaft & Künstliche Intelligenz 6 2 KuKi Simulation Optimization Experiments For verified models Find the best parameters for a desired simulation outcome Parameters can be ranged to reduce search range Monte Carlo methods for selecting paramters Function for desired outcome difficult to define Can’t do miracles! KuKI: Ausgewählte Kapitel Kognitionswissenschaft & Künstliche Intelligenz Institut für Computertechnik 7 The 10 DON’Ts of Mathematical Modeling 1. Don't believe in the 33rd order consequences of a 1st order model. 2. Don't extrapolate beyond the region of fit. 'Cum grano salis.‘ 'Don't go off the deep end.' 3. Don't apply any model until you understand the simplifying assumptions on which it is based, and can test their ability. 'Use only as directed.' 4. Don't believe the model is reality. 'Don't eat the menu.' 5. Don't distort reality to fit the model. 'The Procrustes Method.' 6. Don't limit Yourself to a single model: More than one may be useful for understanding different aspects of the same phenomenon. 'Legalize polygamy.' 7. Don't retain a discredited model. 'Don't beat a dead horse.' 8. Don't fall in love with your model. 'Pygmalion.' 9. Don't apply terminology of subject A to the problems of subject B if it is to the enrichment of neither. 'New names for old.' 10. Don't expect by having named a demon you have destroyed him. 'Rumpelstiltskin.' Golomb, S.W., 1970. Mathematical Models - Uses and Limitations. Simulation, 4 (14), 197-198. Institut für Computertechnik KuKI: Ausgewählte Kapitel Kognitionswissenschaft & Künstliche Intelligenz 8 The 10 DON’Ts of Mathematical Modeling Don't believe the model is reality. Don't distort reality to fit the model. Don't extrapolate beyond the region of fit. Don't retain a discredited model. Don't fall in love with your model. Golomb, S.W., 1970. Mathematical Models - Uses and Limitations. Simulation, 4 (14), 197-198. Institut für Computertechnik KuKI: Ausgewählte Kapitel Kognitionswissenschaft & Künstliche Intelligenz 9 3 KuKi Simulation Types of Simulation Locality Predictability Local vs. Distributed Stochastic vs. Deterministic Time model Continuous vs. Discrete Institut für Computertechnik KuKI: Ausgewählte Kapitel Kognitionswissenschaft & Künstliche Intelligenz 10 Predictability Stochastic Usage of random number generators Also called Monte Carlo simulations Real life processes Client arrivals, device failures, people decisions, … Deterministic Reproducible results Perform always the same for a given input Institut für Computertechnik KuKI: Ausgewählte Kapitel Kognitionswissenschaft & Künstliche Intelligenz 11 Time Models - Continuous Values change with time Differential equations (partly or ordinary) Implemented numerically Continuous trajectories are obtained in discrete time steps Institut für Computertechnik KuKI: Ausgewählte Kapitel Kognitionswissenschaft & Künstliche Intelligenz 12 4 KuKi Simulation Time Models - Discrete Event based Causes changes in the state Takes zero time Simultaneous events are serialized (random or deterministic order) Types of Events Timer (static or dynamic) State transisitions KuKI: Ausgewählte Kapitel Kognitionswissenschaft & Künstliche Intelligenz Institut für Computertechnik 13 Time Models - Hybrid Hybrid Combination of continuous and discrete time models E.g. event injection KuKI: Ausgewählte Kapitel Kognitionswissenschaft & Künstliche Intelligenz Institut für Computertechnik 14 Agent Based Simulation Special case of discrete time models No underlying equation The model … is represented directly has an internal state a set of rules/behaviors Institut für Computertechnik KuKI: Ausgewählte Kapitel Kognitionswissenschaft & Künstliche Intelligenz 15 5 KuKi Simulation What is an Agent Agent *) Attributes *) Behavioral rules *) Memory *) Ressources *) Decision making sophistication *) Rules to modify behavioral rules Environment and Agents Macal, C. and North, M., 2005, Tutorial on Agent-Based Modeling and Simulation, Proceedings of the 2005 Winter Simulation Conference KuKI: Ausgewählte Kapitel Kognitionswissenschaft & Künstliche Intelligenz Institut für Computertechnik 16 Agent Based Simulation Agents are individuals Interact with each others Simple rules may lead to complex simulations (e.g. Flock of Boids http://www.red3d.com/cwr/boids/index.html) Spatial distribution easy to simulate Institut für Computertechnik KuKI: Ausgewählte Kapitel Kognitionswissenschaft & Künstliche Intelligenz 17 Agent Based Simulation Applications Business and Organizations Economics Manufacturing, consumer markets, supply chains, insurance Artificial financial markets, trade networks Infrastructure Crowds Human movement, evacuation modeling, spread of diseases Society and Cultures Electric power markets, hydrogen economy, transportation Ancient civilizations, civil disobedience, social interaction, psychology Terrorism Social determinants, organizational networks Military Biology Command & control, Force-on-force Ecology, Animal group behavior, Cell behavior, Sub cellular molecular behavior Macal, C. and North, M., 2005, Tutorial on Agent-Based Modeling and Simulation, Proceedings of the 2005 Winter Simulation Conference Institut für Computertechnik KuKI: Ausgewählte Kapitel Kognitionswissenschaft & Künstliche Intelligenz 18 6 KuKi Simulation Hare Rising Stories Continuous Model Agent Based Model online resource online resource Institut für Computertechnik KuKI: Ausgewählte Kapitel Kognitionswissenschaft & Künstliche Intelligenz 19 Crowd Simulation Institut für Computertechnik online resource / www.xjtek.com KuKI: Ausgewählte Kapitel Kognitionswissenschaft & Künstliche Intelligenz 20 Bubble Family Game Bubbles are autonomous agents Organized in teams Need energy to survive Every action costs energy Energysources provide energy Bubble Energysource Institut für Computertechnik KuKI: Ausgewählte Kapitel Kognitionswissenschaft & Künstliche Intelligenz 21 7 KuKi Simulation Are You Living In a Computer Simulation? Bostrom, Nick, (2003), Are You Living In a Computer Simulation?, There are more things in heaven and earth, Horatio, than are dreamt of in your philosophy Philosophical Quarterly, 2003, Vol. 53, No. 211, pp. 243-255. Hamlet (I, v, 166-167) http://www.simulation-argument.com/ Institut für Computertechnik KuKI: Ausgewählte Kapitel Kognitionswissenschaft & Künstliche Intelligenz 22 Welt am Draht (1973) Movie by Rainer Werner Fassbinder Based upon the book Simulacron-3 by Daniel F. Galouye A simulated world inside the simulated world Test effects of a perfect simulation on society Personalities start to “diffuse” to other levels (Forget about “The Matrix”) Institut für Computertechnik KuKI: Ausgewählte Kapitel Kognitionswissenschaft & Künstliche Intelligenz 23 8