This post is a draft of an article submitted for publication elsewhere. Comments and critiques are very welcome, whether posted below or sent by email (email@example.com). For the complete text please email me at firstname.lastname@example.org.
The NetLogo models of mine can be found in one place on my profile page at ModelingCommons.org.
Agent-Based Modeling and Historical SimulationMichael Gavin, University of South Carolina
This essay will discuss agent-based modeling (ABM) and its potential as a technique for studying history, including literary history. When applied to historical problems, scholars first notice social simulation’s unusual ontological commitments: a computer model of social life creates a simulated world and then subjects that world to analysis. On the surface, computational modeling has many of the trappings of science, but at their core simulations seem like elaborate fictions: the epistemological opposite of science or history. Historical simulation thus straddles two very different scholarly practices. On the one hand are the generally accepted practices of empirical research, which look to the archive for evidence and then generalize based on that evidence. On the other hand is the new and in many ways idiosyncratic practice of simulation, which thinks in the opposite direction. ABM begins with a theory about a real system and then create a functional replica of that system. When confronted with agent-based models, historians often respond with a knee-jerk (and in many ways justified) skepticism about the applicability and usefulness of artificial worlds. How can a computer simulation tell us anything about the past? The difficulty of this question should not be understated. Nonetheless, I will propose that these forms of intellectual inquiry can productively coincide, and I’ll map out a research program for historians curious about the possibilities opened by this new technique.
This essay has three distinct goals. The first is simply to introduce agent-based modeling as a computational practice to an audience of digital humanists, for whom it remains largely unfamiliar despite signs of increasing interest. Second, to introduce one possible application for social simulation by comparing it to conventional, print-based models of the history of book publishing. Third, and most importantly, I’ll sketch out a theory and preliminary method for incorporating social simulation into an on-going program of humanities research.
I: Playing with complexity
Agent-based modeling, sometimes called individual-based modeling, is a comparatively new method of computational analysis. Unlike equilibrium-based modeling, which uses differential equations to track relationships among statistically generated aggregate phenomena—like the effect of interest rates on GDP, for example—ABM simulates a field of interacting entities (agents) whose simple individual behaviors collectively cause larger emergent phenomena. In the same regard, ABM differs significantly from other kinds of computational analysis prevalent in the digital humanities. Unlike text mining, topic modeling, and social-network analysis, which apply quantitative analysis to already existing text corpora or databases, ABM creates a simulated environment and measures the interactions of individual agents within that environment. According to Steven F. Railsback and Volker Grimm, ABMs are “models where individuals or agents are described as unique and autonomous entities that usually interact with each other and their environment locally.”
In this way, agent-based modeling is closely associated with complex-systems theory, and models are designed to simulate adaptation and emergence. In the fields of ecology, economics, and political science, ABM has been used to show how the behaviors of individual entities—microbes, consumers, and voters—emerge into new collective wholes. John Miller and Scott Page describe complex systems: “The remarkable thing about social worlds is how quickly [individual] connections and change can lead to complexity. Social agents must predict and react to the actions and predictions of other agents. The various connections inherent in social systems exacerbate these actions as agents become closely coupled to one another. The result of such a system is that agent interactions become highly nonlinear, the system becomes difficult to decompose, and complexity ensues.” At the center of complexity thus rests an underlying simplicity: the great heterogeneous mass of culture in which we live becomes reconfigured as an emergent effect of the smaller, describable choices individuals tend to make. The intellectual pay-off of social simulation comes when scholars identify and replicate this surprising disjunction. As Joshua Epstein and Robert Axtell argue, “it is not the emergent macroscopic object per se that is surprising, but the generative sufficiency of the simple local rules.” In this formulation, to study complex systems is to wield the procedural operation of computers like Occam’s Razor—by showing that simple procedures are sufficient to cause complex phenomena within artificial societies, one raises at least the possibility that such procedures are “all that is really happening” in actual systems.
Humanists will be hesitant to accept this value of this (and should be, I think), and I will return to the notion of “generative sufficiency” later. For now I mean only to point out the way complex-systems theory elevates the local and the simple at the level of interpretation: to know about the world under this paradigm is to generate computer simulations that look in their larger patterns more or less like reality but which at the level of code are dictated by artificially simple underlying processes.
A number of out-of-the-box software systems are available for scholars looking to incorporate agent-based simulations into their research. Railsback and Grimm recommend NetLogo, a free and open-source program authored by Uri Wilensky at Northwestern University in 1999. (The current version, NetLogo 5.0.5, was released in December 2013). NetLogo is a descendent of the Logo programming language, which was first designed in the 1960s and became popular in primary and secondary education. Like its ancestor, NetLogo creates sprites called “turtles” and moves them according to unit operations called “procedures.” The turtles circulate in an open field of “patches,” small squares which can be assigned variables that change over time. Like Logo, NetLogo can generate beautiful and intricate visual displays from comparatively simple commands. (See Figure 1.)
This ability to visualize the behaviors of many turtles as they execute their individually determined procedures is what makes the Logo family of programming languages particularly suited for agent-based simulations. According to its website, NetLogo “makes it possible to explore the connection between the micro-level behavior of individuals and the macro-level patterns that emerge from their interaction.” The tool is pedagogical and “lets students open simulations and ‘play’ with them, exploring their behavior under various conditions,” while also providing an “authoring environment” for researchers across the disciplines. The shared focus on pedagogy and research also overlaps closely with the intellectual mandate of studying complexity: to visualize already familiar patterns and to identify deliberately simplified rules at their core.
When applied to real-world phenomena, NetLogo allows researchers to create abstract representations of complex social and physical systems. It is particularly useful, for example, in fields like biology and economics, which emphasize the effects of individual behaviors on collective patterns. For example, Craig Reynold’s classic “boids” simulation, developed in the 1980s at the Santa Fe Institute, replicates complex flocking behavior in birds and fish with a very short code that executes only a three simple procedures. (See Figure 2.) Models of ecosystems allow researchers to test how changes in the dynamics among predators and prey affect the system as a whole.
Of all the genres of computational expression common across the digital humanities, agent-based models might share most in common with video games. Like games, models simulate rule-bound behaviors and generate outcomes based on those rules. Ian Bogost has described games’ intellectual function: “Games represent how real and imagined systems work, and they invite players to interact with those systems and form judgments about them.” In this sense, games involve what Noah Wardrip-Fruin has called “expressive processing.” He explains: “When I play a simulation game, author-crafted processes determine the operations of the virtual economy. There is authorial expression in what these rules make possible.” Like designing games, modeling is a form of authorial expression that uses procedural code. The designer uses software to craft an artificial society, and for many researchers (or, I should say, for me and those I happen to know) growing simulated people is uncanny and challenging but also extraordinarily fun. If you want to have a good time as a researcher, create the rules that make a population gather into clumps — call them cities — then watch in horror as your people are wiped out by a changing variable — call it syphilis. ABM’s relation to gaming is thus not merely formal: the two are closely homologous modes of intellectual and affective engagement with the world.
ABM differs from gaming in two key respects, however. First, it does not usually depend on direct human interaction, at least not in the same sense of games in which players move through a navigable space toward a definite goal. There is no boss to fight at the end of a social simulation. You do not play an agent-based model. Instead, you play with a model, tinkering with its procedures and changing its variables to test how the code influences agent behavior. I sometimes describe social simulation this way: Imagine a Sims game in which the player writes all the behaviors, controls all the variables, and the sets the system to run on autopilot thousands of times, keeping statistics of everything it does. This suggests the second key difference between ABMs and games. With researcher-generated simulations, the researcher is in control of the processes and can adjust their constraints according to her or his interests. A fundamental characteristic of social simulations is that designers can alter the parameters of the model’s function and thereby generate different, often unexpected patterns of emergence. “While, of course, a model can never go beyond the bounds of its initial framework,” Miller and Page write, “this does not imply that it cannot go beyond the bounds of our initial understanding.” In this way, a simulated social environment is something analogous to an experimental laboratory where hypotheses can be tested, confirmed, or rejected.
Call it a tool. Call it a toy. With agent-based modeling you get to play with your own thought experiments. Like building a model airplane, modeling complex systems involves building as a form of play and play as a form of knowing.
II: Models: epistemology and ontology
NOTE: End of abstract. For complete text, email email@example.com.