Simulation & Understanding
Francis Tseng (@frnsys)
disclaimer: I am not a social scientist just an interested spectator
Proust, Katrina, et al. "Human health and climate change: leverage points for adaptation in urban environments." International journal of environmental research and public health 9.6 (2012): 2134-2158.
Wicked problems
- difficult to agree on the problem (or whether there's a problem at all)
- there is no comprehensive perspective
- wicked problems are interconnected
- no way to verify or experiment solutions
- there may be (very) delayed feedback loops
- every wicked problem is unique
- are nonlinear (outputs are disproportionate to the inputs)
- they are massive & intimidating
Rittel, H. W., & Webber, M. M. (1973). Dilemmas in a general theory of planning. Policy sciences, 4(2), 155-169.
many inherent difficulties, but can they be made any more manageable?
~ simulation ~
what simulation?
- agent-based modeling
- system dynamics
Agent-based modeling
System dynamics
where is simulation used?
Language Evolution Simulation (Fatih Erikli)
Differentiation without Distancing. Explaining Bi-Polarization of Opinions without Negative Influence (Michael Mäs, Andreas Flache)
A Distributed Platform for Global-Scale Agent-Based Models of Disease Transmission (Jon Parker, Joshua M. Epstein)
Simulados (Barcelona Supercomputing Center, 2016)
MONIAC (Monetary National Income Analogue Computer)
how does simulation work?
- tolerance threshold: min % of same-type neighbors to be satisfied
- if not satisfied, household moves to vacant position
import syd
import numpy as np
class SchellingAgent(syd.Agent):
state_vars = ['type', 'position', 'satisfied', 'threshold']
async def decide(self):
neighbors = await self.world.neighbors(self.state.position)
same = np.where(neighbors == self.state.type)[0]
satisfied = same.size/neighbors.size >= self.state.threshold
self.submit_var_update('satisfied', satisfied)
if not satisfied:
await self.world.queue_random_move(self.state.position, self.state.type, self.addr)
import random
class SchellingWorld(syd.world.GridWorld):
state_vars = ['grid', 'vacancies']
async def decide(self):
self.submit_update(self.update_vacancies)
@syd.expose
async def queue_random_move(self, position, agent_type, agent_addr):
if self.state.vacancies:
new_pos = self.state.vacancies.pop(random.randrange(len(self.state.vacancies)))
self.submit_update(self.move_position, position, new_pos, agent_type)
agent_proxy = await self.container.connect(agent_addr)
await agent_proxy.submit_var_update('position', new_pos)
def update_vacancies(self, state):
state.vacancies = list(self.vacancies(empty_val=0))
return state
from itertools import product
types = [1, 2]
n_agents = 50
width = 10
height = 10
grid = np.zeros((width, height))
positions = list(product(range(width), range(height)))
sim = syd.Simulation(node)
world, world_addr = sim.spawn(SchellingWorld, state={'grid': grid, 'vacancies': []})
for _ in range(n_agents):
position = positions.pop(0)
type = random.choice(types)
agent, addr = sim.spawn(SchellingAgent, state={
'type': type,
'position': position,
'satisfied': 0.,
'threshold': threshold
}, world_addr=world_addr)
syd.run(world.set_position(type, position))
for report in sim.irun(n_steps, {
'n_satisfied': (lambda ss: sum(s.satisfied for s in ss if hasattr(s, 'satisfied')), 1)
}):
print('mean satisfied:', report['n_satisfied']/n_agents)
why simulation?
why simulation?
- a systems language
- a canvas for alternatives
- exploring policy-space
- a means for discourse
- exploration & education
- experience generation
A systems language
cognitive mapping
a situational representation on the part of the individual subject to that vaster and properly unrepresentable totality which is the ensemble of society's structures as a whole (Postmodernism, Fredric Jameson)
alienation
an inability to cognitively map the mechanisms and contours of the world system is as debilitating politically as being unable to mentally map a city would be for a city dweller. (Jeff Kinkle, referring to Fredric Jameson)
"crisis of representation"
"representational breakdown"
one method: networks
[Marain] appeal[s] to poets, pedants, engineers and programmers alike
what we want in a new representational language:
- explicit description of structure/relationships (network)
- emotional/experiential aspects & dynamics (narrative)
Arrival (2016)
Donella H. Meadows (Thinking in Systems):
there is a problem in discussing systems only with words. Words and sentences must, by necessity, come only one at a time in linear, logical order. Systems happen all at once.
... Pictures work for this language better than words, because you can see all the parts of a picture at once.
a new "representational infrastructure"? (Wilensky & Papert, 2006;2010)
e.g. roman -> hindu-arabic numerals
A canvas for alternatives
Humans of Simulated New York (HOSNY)
in collaboration with Fei Liu
example
monoculture crop blight
- "normal" productivity per equipment
- labor required to produce food at high levels
- nutritional value of food at low levels
example
massive solar flare
- low productivity per equipment
- labor required to produce food at high levels
- nutritional value of food at low levels
example
fully-automated luxury communism
- extremely high productivity per equipment
- labor required to produce food at "normal" levels
- nutritional value of food at "normal" or high levels
countermapping / radical cartography
the Detroit Geographical Expedition and Institute (DGEI)
Afterall, it is not the function of geographers to merely map the earth, but to change it. (William Bunge, DGEI)
Exploring policy-space
Modeling Complex Systems for Public Policies
Editors: Bernardo Alves Furtado, Patrícia A. M. Sakowski e Marina H. Tóvolli/ Brasília, 2015
Instead of seeing an individual proposal as “right or wrong”, “bad or good”, people can see it as one point in a large space of possibilities. By exploring the model, they come to understand the landscape of that space, and are in a position to invent better ideas for all the proposals to come. Model-driven material can serve as a kind of enhanced imagination.
What can a technologist do about climate change?, Bret Victor
A means for discourse
To succeed even within the game’s fairly broad definition of success (building a habitable city), you must enact certain government policies. An increase in the number of police stations, for instance, always correlates to a decrease in criminal activity; the game’s code directly relates crime to land value, population density, and police stations. Adding police stations isn’t optional, it’s the law.
Les Simerables, Ava Kofman
Procedural rhetoric:
an argument made by means of a computer model. A procedural rhetoric makes a claim about how something works by modeling its processes in the process-native environment of the computer rather than using description (writing) or depiction (images). (Persuasive Games: The Proceduralist Style, Ian Bogost)
The Founder
a dystopian business simulator
Exploration & education
"explorable explanations":
What if a book didn't just give you old facts, but gave you the tools to discover those ideas for yourself, and invent new ideas? What if, while reading a blog post, you could insert your own knowledge, challenge the author's assumptions, and build things the author never even thought of... all inside the blog post itself? (Nicky Case)
In the 1960's Buckminster Fuller proposed a “great logistics game” and “world peace game” (later shortened to simply, the “World Game”)...a tool that would facilitate a comprehensive, anticipatory, design science approach to the problems of the world. The use of “world”...refers to Fuller's...contention that we now need a systems approach that deals with the world as a whole...
Optimists’ Creed: Brave New Cyberlearning, Evolving Utopias (Circa 2041), Winslow Burleson & Armanda Lewis
Experience generation
the narrative power of KRZ, Gone Home, etc
+
the open-world responsiveness of DF, Stellaris, etc
?
data about human phenomenon:
experiences → numbers (→ structure)
can we do the reverse?
experiences ← numbers (← structure)
can we rebuild (part of) the world from a description of it?
generating plausible people
>>> from people import generate
>>> year = 2005
>>> generate(year)
{
'age': 36,
'education': <Education.grade_12: 6>,
'employed': <Employed.non_labor: 3>,
'wage_income': 3236,
'wage_income_bracket': '(1000, 5000]',
'industry': 'Independent artists, performing arts, spectator sports, and related industries',
'industry_code': 8560,
'neighborhood': 'Greenwich Village',
'occupation': 'Designer',
'occupation_code': 2630,
'puma': 3810,
'race': <Race.white: 1>,
'rent': 1155.6864868468731,
'sex': <Sex.female: 2>,
'year': 2005
}
social network formation
see: Social Distance in the United States: Sex, Race, Religion, Age, and Education Homophily among Confidants, 1985 to 2004, Jeffrey A. Smith, Miller McPherson, Lynn Smith-Lovin. University of Nebraska - Lincoln. 2014
"intelligent" agents (firms)
The “author,” under this rubric, is present only in the starting conditions pre-specified by the choice of parameter
Simulating Plot: Towards a Generative Model of Narrative Structure (Graham Sack)
System Designer (SyD)
in collaboration with Fei Liu
An open-source simulation toolkit and conceptual framework to make complex systems thinking (how did we get here/where are we now?) and the simulation of alternative worlds (where can we go?) more accessible to designers, activists, urban planners, educators, artists....
- an engine for running simulations (Python)
- multi-node support
- extensibility
- common data format for sharing/forking models
- a protocol for communicating with the engine
- to build arbitrary interfaces to build & tweak simulations
- to build arbitrary visualizations on top
- a GUI editor for building/tweaking simulations
- workshops to teach the method & tool
come down (caveats & cautions)
how well can we actually model people?
obligatory George Box quote:
all models are wrong, but some are useful
dangers of "social physics", "the view from nowhere", "big data as reality", & co...
On Exactitude in Science (Jorge Luis Borges)
Agent Zero
an attempt at creating a "first-principles" agent integrating:
rational, affective, and social components
- more accessible, intuitive tooling
- more widespread education about modeling
- training around recognizing and mitigating bias
occhiolism
n. the awareness of the smallness of your perspective, by which you couldn't possibly draw any meaningful conclusions at all, about the world or the past or the complexities of culture, because although your life is an epic and unrepeatable anecdote, it still only has a sample size of one, and may end up being the control for a much wilder experiment happening in the next room.
from the dictionary of obscure sorrows
thank you~
if SyD sounds interesting to you, we are looking for people/orgs to work with!
tweet @frnsys