Jedi in Netlogo
Paul Chapron
Sébastien Rey-Coyrehourcq
twitter / github : @chapinux @reyman64
mail : paul.chapron@iscpif.fr & sebastien.rey-coyrehourcq.fr@univ-rouen.fr
Agent Based Model
Exchange messages
Think
Move and Perceive
Evolve on environment
Act on environment
(more or less ...)
[Ferber 1999, Drogoul 2009]
Agent Based Model
not a model, but a meta-model
city
ant
mosquito
people
tree
[Drogoul Treuil 2008]
Influences of ABM
1970-80
Alan Kay
Oriented
Object Programming
Generic
Ontology
Formalism
Software Evolution
Influences of ABM
Carl Hewitt
Actor model
1973
Software and IA Evolution
Influences of ABM
Jacque Ferber
DAI Computer Scientist at Paris 6
CS Intellectuals Purveyors in SHS
James Doran
DAI Computer Scientist at Essex
DAI in Sociology since 1980's
DAI in archaeology since 1980's
Simulation in archaeology since 1960's
Geography since 1990's
Ecology since 1990's
Influences of ABM
Complexity Theory and Artificial Life ( self organization + emergence)
Simple rules could product complex phenomena
Influences of ABM
Complexity Theory and Artificial Life ( self organization + emergence)
Simple rules could product complex phenomena
Von Neumman & Arthur Burks
1966
CA, ABM and ...
... Artificial Life ?
Langton
"Artificial Life"
~1980 SFI
Bach Group
Burks, Axelrod,
Holland, etc.
Cybernetics
(Wiener, Mc Culloch)
Swarm
platform
Biology & GST
(Bertallanfy)
BCL of
Von Foerster
AutoPoeise
(Maturana & Varela)
Biology &
Evolutionary computation (M. Conrad)
Logo / Turtle
S. Papert & M. Minsky
Bioinformatics
A. Lindermayer
Bioinformatics
& Ecology
P. Hoggeweg
Starlogo
M. Resnick
Phy, Eco, Geo
Y. Prigogine ULB team
Logo's
platform
ECAL conf
SFI
CS
J. Ferber
[Rey 2015]
ABM, rupture or continuity ?
... an old idea in SHS ...
MC
micro-simulation 1957
[Sanders 2013, Rey 2015]
individual entities ?
James Doran
Archeological simulation 1970
Torsten Hägerstrand
Guy Orcutt
MC
micro-simulation 1953, 1965
bottom-up ?
rules-based ?
Simulation,une vieille idée en geographie
1950
1980
Hägerstrand, Marble, Pitts, etc.
Pumain, Sanders, etc.
Guermond, Langlois, etc.
Chamussy, Le Berre, Uvietta, etc.
Forrester
pioneers
turning point
1970
Wilson
Batty
Ackerman, Chorley, Hagget, Berry, etc .
Prigogine, Allen,
Sanglier, Haken, etc..
conceptual
technical
1990
Couclelis,
Tobler,etc.
Epstein, Doran, etc.
Influences répétées du projet systemique (Von Bertallanfy et cie.)
open systems, retro-action, self-organization, equifinality, bifurcation, etc.
[Pouvreau 2013]
~ 1980 in France
Agent Based Modelling
(et en SHS ...)
[Rey 2015]
Cellular
Automata
Non Linear Dynamical
Systems
Systèmes dynamiques
Automate
Cellulaire
Modèle multi-agent
jeu de la vie
fourmis
proie prédateur
Intègre
Une flexibilité séduisante ...
... avec de grandes capacités d'intégration
Une flexibilité séduisante ...
... au sein d'un laboratoire virtuel spatio-temporel
discuter
formaliser
Une flexibilité séduisante ...
... au sein d'un laboratoire virtuel spatio-temporel
discuter
formaliser
intégrer
Une flexibilité séduisante ...
... au sein d'un laboratoire virtuel spatio-temporel
SIMULATEUR
substrat silicium
"reconstruction"
?
?
?
!
Simuler, ok, mais ...
... avec une question de recherche c'est mieux !
"2nd-empirie"
L'importance des critères / patterns ...
... pour contraindre la dynamique des simulations
question(s) de recherche
"The general idea of POM (Pattern Oriented Modelling) is to use multiple observed patterns as indicators of a system’s internal organization. Trying to reproduce such patterns with our ABMs makes us decode the internal organization of the real system. The point of POM is to consciously think in terms of pattern, regularities or stylized facts right from the beginning and to select model structure accordingly."
Railsback et Al. 2012
structure interne
patterns multiples
L'école allemande de V. Grimm ...
... pionnière sur les aspects formalisations
Railsback et Al. 2012
aller - retour
You should always start with
“null theories”
1- Modèle fonctionel dès le départ
2 - Tester l'apport de chaque hypothèse
"null"
"medawar Zone"
SURPRISE !
L'école allemande de V. Grimm ...
... pionnière sur les aspects formalisations
Les choix
générent des chemins / modèles ...
qui peuvent générer le/les même(s) pattern(s)
1
2
( )
( , )
( )
[Grimm2016, Cottineau2016]
L'importance du chemin
Equifinalité
patterns simulés
p1 cluster
p2 densités
p3 attribut
1
2
( )
( , )
( )
[Grimm2016, Cottineau2016]
L'importance du chemin
Deconstruire les choix & les chemins ... &
les reconstruire ensuite pour mieux comprendre ...
Know where and when
parameters and mechanisms break
Look back and challenge choices
Share your results
and challenge others
Cumulative knowledge
a) Organiser la saine confrontation des points de vue
b) Organiser la "surprise" par l'observation des écarts entre comportements attendus vs simulés
d) Trouver les bugs et cas limites
Et donc ? Systématiser l'exploration !!
b) Justifier le chemin pris lors de la construction
Oui, mais comment ?
Analyse de sensibilité ?
"By exploring the sensitivity of model output to changes in parameters, we learn about the relative importance of the various mechanisms represented in the model and how robust the model output is to parameter uncertainty."
- sensibilité locale
- sensibilité globale
"Sensitivity analysis (SA) is used to explore the influence of varying inputs on the outputs of a simulation model (Ginot et al. 2006).
[Thiele2014]
allons y !
Modelisation ? Simulation ?
+ 20 raisons différentes de créer des modèles
modèle ~= modèle de simulation
simplification ou facilitation ?
modéliser, un objectif en soit or modéliser pour éclairer ?
modélisons pour une question
( voir les travaux de Phan, Varenne, Livet, etc. )
substrat silicium
une nouvelle empirie
equations
objects
stocks
performance ? parcimonie ? compression ? compréhension ? co-construction ? ...
"reconstruire" la réalité
dynamique complexes
difficile à comparer
Connaissance ?
modèle de simulation
processus
entité
choix des representations et échelles pour
patterns
parameters
choix depuis une réalité
=
Plateforme & Pratique
Introducing Netlogo platform
Logo langage 1966
Seymour Papert
Logo turtle 1969-70 inspired by
Walter Grey's turtle in 1948
to square
repeat 4 [forward 50 right 90]
end
1928 - 2016
Introducing Netlogo platform
StarLogo
& Netlogo
Sensibilité locale - OAT
évaluation à l'oeil
"Face Validity"
stratégie / DOE
"One-Variable-At-A-Time"
- peu fiable
- couteux en temps
- limité
- difficilement reproductible
"Tinkering" de Papert & Retsnick
- ludique
- interactif
- exploratoire
- incrémental
- essai erreur
Construire et explorer simplement avec Netlogo
Fer à cheval
KISS
KIDS
Stylisé
Particulier
[Sanders & Banos 2011, 2013, Banos 2013]
Schelling
Schelling - Sakoda simulation
[1916 - 2005]
[1921 - 2016]
Journal of Mathematical Sociology (Vol 1) 1971
Journal of Mathematical Sociology (Vol 2) 1971
- The checkerboard model of social interaction -
- Dynamic models of segregation -
Phd Dissertation 1949
Schelling
Sénat - 1966
Crédit : Henry Griffin / Associated Press
Schelling model
place vide
habitant bleu
habitant rose
position aléatoire sur une grille en 2D
Schelling model
False
déplacement aléatoire
True
reste ici
Moore
Neumann
% similaires
% similaires
Schelling model
Jouons avec différents seuil
Jouons avec plus ou moins de positions libres
experimentons avec netlogo
Essayons d'identifier les différents états du modèle de Schelling et plaçons les sur le schéma
Try to identify different states of the Schelling model and place them on this diagram
[Gauvin 2009, Daude 2007]
Schelling model
Que peut on attendre si on accepte un peu d'hétérogénéité ?
=
moyenne ~ 70 % similaire
attendu
réalité
Joshua Epstein
Social Simulation Conference 2015
Sugarscape model
KISS
KIDS
Stylized
Particular
[Sanders & Banos 2011, 2013, Banos 2013]
Schelling
Sugarscape
Sugarscape model
max sugar by patch
world - n * n patch -
Sugarscape model
Sugarscape model
limited vision, growing sugar
Sugarscape model
Sugarscape model
Sugarscape model
more rules ?
farm workers
farm owners
tax
https://hal.archives-ouvertes.fr/hal-01094421
Collectif MAPS :
Sugarscape model
reproduction
Sugarscape model
play with tax and note observation
Tax | 0.05 | 0.10 | 0.20 | 0.30 |
---|---|---|---|---|
Gini | ||||
Total population | ||||
% capitalist | ||||
% farmers | ||||
Mean ressources farm owners | ||||
Mean ressources farm workers |
value at ticks = 2000
Tax | 0.05 | 0.10 | 0.20 |
---|---|---|---|
Gini | 0,40 | 0.28 - 0.38 | 0.35 - 0.38 |
Total population | 430 | 250 | 240 |
% capitalist | 5 | 12 | 20 |
% farmers | 95 | 88 | 80 |
Mean ressources capitalist | 25 | 28 | 26 |
Mean ressources farmers | 22 | 22 | 23 |
not so big differences between roles ... need some new visualisation ...
smaller population, higher share of farm workers, more inequalities
... possible collapse of system or
new equilibrium ...
add some new visualisations
right clic in blank zone in interface
change pen name
change plot name
change xy
advanced pen
mode "Bar"
name | pen name | interval |
---|---|---|
Wealth-Rentiers | WR | 5 |
Wealth-Recoltants | WRe | 5 |
parameters for 2 plots
Sugarscape model
Go to "code" tab, and add this source code ...
;; .... At the end of this function ....
;; .... add this code to plot Distribution of Wealth
to update-lorenz-and-gini-plots
; ... some code ...
set-current-plot "Wealth-Rentiers"
set-current-plot-pen "WR"
if any? turtles with [class = ClasseRentier]
[histogram [sugar] of turtles with [class = ClasseRentier] ]
set-current-plot "Wealth-Recoltants"
set-current-plot-pen "WRe"
if any? turtles with [class = ClasseRécoltant]
[histogram [sugar] of turtles with [class = ClasseRécoltant] ]
end
Sugarscape model
... then return to "interface" tab, and relaunch simulation
Play with catastrophe ...
Sugarscape model
Multiple states for the same system
Resilient : same state before and after catastrophe
New equilibrium : all red dead, only blue
Collapse : everyone is dead
Tax | 0.05 | 0.10 | 0.20 | 0.30 | 0.40 |
---|---|---|---|---|---|
Little catastroph | resilient | ||||
medium catastroph | |||||
Big catastroph | |||||
Cataclysme |
Sugarscape model
Sugarscape model
switching role
Tax | 0.05 | 0.10 | 0.20 | 0.30 | 0.40 |
---|---|---|---|---|---|
Little catastroph | resilient | ||||
medium catastroph | |||||
Big catastroph | |||||
Cataclysme |
Formation JEDI Netlogo
By sebastien rey coyrehourcq
Formation JEDI Netlogo
- 874