ECAI 2014 Tutorial on a behavioral analysis tool for agent-based simulations (PET)
1. When Experimental and Computational Research Meet:
The Participatory Extension Module v2.0
Richard O. Legendi, Tamás Máhr, László Gulyás,
Rajmund Bocsi, Vilmos Kozma, Peter Rieger
{rlegendi, tmahr, lgulyas, rbocsi, vkozma, prieger}@aitia.ai
AITIA International, Inc.
The research leading to these results has received funding from the
European Union, Seventh Framework Programme FP7/2007-2013
under grant agreement no. CRISIS-ICT-2011-288501.
3. Background
Traditional modeling approaches challenged
(in economics and elsewhere)
The concept of rationality in question
The „wilderness of irrationality”
Behavioral Economics attemps to collect empirical data
on human (economic) behavior
Recognized by Vernon Smith's Nobel prize
Early / traditional behavioral experiments are carried out
in small groups and with simple economies
3
4. Background, cont.
Experiments with a large number of participants is hard to
handle
Programming complex market behavior (experimental
scenarios)
With complex agents
With complex market interactions
The technique of agent-based simulations lends itself
naturally
Some agents of an ABM are controlled by human subjects
4
5. Background, cont. 2
Agent-based models may also benefit from
participatory experiments
Sensitivity of system behavior can be tested
Especially in case of learning / evolving agents
(prone to co-evolve, converge too early)
E.g., human agents in the SFI Artificial Stock Market
Empirical data about individiual behavior
Data collection, calibration, etc.
5
6. Background: The CRISIS Project
“The CRISIS project addresses building a next generation
macroeconomic and financial system policymaking model: a
bottom-up agent-based simulation that fully accounts for the
heterogeneity of households, firms, and government actors. The model
will incorporate the latest evidence from behavioral economics in
portraying agent behavior, and the CRISIS team will also collect new
data on agent decision making using experimental economics
techniques. While any model must make simplifying assumptions
about human behavior, the CRISIS model will be significantly more
realistic in its portrayal of relevant agent behavior than the current
generation of policymaking models.”
Crisis project description: https://www.crisis-economics.eu/
6
8. PET v2.0
AITIA's PET Software since 2004
Participatory Extension
Generalized components behind the CRISIS Game
Modern, scalable infrastructure
Previous version is 5+ years old
Components may run on (several) different machines
Software already available for any experiment
8
9. PET v2.0
Can be used:
Locally
Laboratory experiments
Policy makers (scenario analysis with a proper model)
On any webserver to run constantly
Gather data (scores from model and all user actions replay)
Dissemination
Questionnaire module
E.g., Verify if subjects understood the rules, etc.
9
11. The El Farol Bar Problem
Agents are researchers (N=100)
They visit a popular but small bar in Santa Fé
If attendance > 60 (overcrowded)
Who hasn’t come
If attendance <= 60
Who hasn’t come
Each day agents decide individually and in the same time
W. Brian Arthur, “Inductive Reasoning and Bounded Rationality”, American Economic Review
(Papers and Proceedings), 84,406–411, 1994.
11
12. The El Farol Bar Problem
MASON implementation of a NetLogo variant
Artifical agents:
ARMA-based prediction with history
(Autoregressive moving-average model)
Players have two actions: No go / go
If +1 Score!
Goal: get max score
Rand, W. and Wilensky, U. (2007). NetLogo El Farol model. Center for Connected Learning
and Computer-Based Modeling, Northwestern Institute on Complex Systems, Northwestern
University, Evanston, IL.
12
20. What is required to use?
An ABM model
PET is a generic framework
Currently Java and MASON models are supported
22
21. What is required to use?
An ABM model
PET is a generic framework
Currently Java and MASON models are supported
Development of the web interface
No restriction on tools (HTML5, GWT, ...)
Communication to server by standardized tools (AJAX)
Config files to map incoming messages to model actions
23
23. Communication
Messages
translated to method calls (to the model or the controlled
agent)
can have arguments
can have return values
Triggered messages
activated by the GUI
send from the simulation to the GUI when triggered
new turn
player joined
player acted
exception
...
25
24. Simulation control
discreet event-based simulation
turns are defined by actions
Action
an agent message mapped to an agent method that
is scheduled (possibly indirectly)
has no return value
takes no arguments
Action alternative
a method with the same name as an action
has arguments
26
27. Creating a GUI
Pet2 Eclipse plugin
based on GWT
co-develop the mason model (Java project) and the GUI
(Pet2 project)
GWT designer extended/simplified
charts
data tables
labels
data source is configurable in property editors
29
34. Pet GWT module
Pet class
facilitates communication between GUI and simulation
register user (with agent type)
send message
activate triggered message
responses are handled in callbacks
36
36. Future Works
Tools to support front-end creation
finish / improve eclipse plugin
questionnaire
Tutorials, docs to be developed
Additional platforms
+Your ideas?
38
37. Interested?
„A New Set of Tools Supporting Agent-Based Economic
Modeling”, EPIA 2013
Statistical and Behavioral Model Analysis Tools.
Hands-on workshop @ ESSA 2013
Hands-on workshop @ ECAI 2014
Hands-on workshop @ ESSA 2014
39
38. THANK YOU!
Questions?
Will be available soon from http://iaws.aitia.ai/
Download the software:
http://mass.aitia.ai/documentation/tutorials
Try the CRISIS Game
http://game.crisis-economics.eu
Take a look on the El Farol model:
http://github.com/rlegendi/mason-examples
40
The research leading to these results has received funding from the
European Union, Seventh Framework Programme FP7/2007-2013
under grant agreement no. CRISIS-ICT-2011-288501.