Terror Games

Can computer games be devised to model the thinking and predict the actions of allies, enemies and even terrorists? Some in the U.S. government think so. Are they playing God?

Illustration by Aaron Piland

Illustration by Aaron Piland

Imagine the handsome playboy Franco standing at the door of a girl named Viola as he rings the bell, hoping that tonight he'll get lucky. The door opens, Franco leans over to kiss
Viola, and, indeed, she welcomes him in. He all but springs through the doorway, his little pixilated legs moving as fast
as they can carry him.

Watching this scene unfold on your computer, you feel the way you imagine God -- the one who set men and women at play in a world of free will, chance and billion-dollar-
grossing computer games -- might have felt. As a Sims player, you prod Franco and Viola toward their romantic intersection. Yet you can't help ascribing a certain amount of independent thought to the computerized bachelor and his ilk -- you and some 20 million other Sims players who have created an estimated 300 million characters on their PCs since the launch of the world's most successful computer game. (The new game, the Sims 2, will no doubt lead to a digital population explosion, especially because it introduces sim babies, who share the characteristics of both digital parents.)
It's all code work, of course, this illusion of creation and free will, a brilliant but rather simple trick that exploits the player's own desires to conjure a world. In the Sims game, says creator Will Wright, much of the story actually unfolds in the players' imaginations. Sims characters speak in a shorthand of pictures and pidgin language that prompts players to unconsciously fill in the missing details in character interaction, to ascribe emotions, motivations and worldviews to pixels. "Like a Japanese garden, this approach gives the impression that the model is a lot more elaborate than it is," says Wright, "but so much is actually unstated and completed by the players' personal experiences and aesthetics." Note the word "model," for that's what the Sims is: a model of the world, however simplistic.

Yet how powerful these computer games are, how strong the human desire to create and observe simulations of human drama.

Now imagine that it isn't the playboy Franco waiting at the door. It's Osama bin Laden.

"This is Pakistan," says Ian Lustick, a political science professor at the University of Pennsylvania, as he points to a grid on a computer screen filled with thousands of colored squares. Each square represents a hypothetical group of people who possess one of 30 political identities that may be found within that country's unstable social structure. Lustick's computer model is a very serious game of what we might call sim politics, in which the squares take the place of the Sims' cutely
animated figures. Here the Pakistani bureaucrats are purple and mostly clustered in urban areas, including the capital, Islamabad, in the northeast; the military are yellow; the radical Muslims, khaki green. Pakistan's nuclear weapons are invisible, but in the event that one or more are detonated the colored squares at their locations become pocked with polka dots. What interests Lustick is how the behavior of the various political interest groups affects the fate of the weapons.

Lustick presses a key and the grid goes into motion on
the screen. Some squares blink and then change color, while others hold to their original hue. People are changing sides,
lining up with those they trust or perhaps those they fear -- changing their colors -- in front of our eyes. At first, color patterns conjoin lazily, with no discernible order. Patches of similar colors emerge, and split apart. Then, dramatically, polka-dotted squares -- the contamination from nuclear explosions -- appear and begin to spread ominously on the map until they encircle the other squares. Virtual nuclear conflict.

This, according to Lustick's model, is what might transpire in Pakistan over many months as the country transitions from a military government to a civilian democracy, a change the United States has at least nominally encouraged as a matter of policy. In the simulation described here, factional uncertainty and infighting among bureaucrats lead to a bungling of the transition; protection of nuclear facilities degrades; nukes trained on potential enemies are turned inward as the bombs end up in the hands of special interests.

"At least 50 percent of the time in our simulations a changeover from military to civilian rule would trigger war and nuclear explosions," says Lustick. "As we see it, it's not Muslim fundamentalism that Pakistan has to worry about, but the civilian handoff." (Although, in light of the two assassination attempts on President Musharraf's life in late 2003, it's currently an enormous challenge simply to maintain the strongarm status quo, let alone manage a democratization.)

Virtual Pakistan is part of an emerging programming discipline called agent-based modeling, whose most enthusiastic proponents include Lustick, who was responsible for the Middle East while briefly a State Department analyst from 1979 to 1980 and who has written many highly regarded books on conflict in the region. Lustick has run hundreds of simulations of the infinite ways in which big trouble can happen, not only in virtual Pakistan but in an extraordinarily complex simulated Middle East nation that resembles Egypt or Jordan but isn't. Lustick shares these models with policymakers at the Pentagon and intelligence agencies, who watch his work keenly.

The Pentagon needs 21st-century analytical tools to replace the outmoded war games of yore, which, despite improvements in computer power, are still one-dimensional, culturally blinkered and of small use in devising strategies for so-called asymmetric warfare in a world of Afghanistans, Iraqs,
al Qaedas, smart bombs, Predators and the threat of bioterror. And so it has earmarked well over $100 million to determine whether the agent-based models produced by Lustick and
others can advance the strategic game.

It is no slam dunk, of course. Consider Will Wright's explanation of the Sims -- that the reality we ascribe to sim life is mostly a construct of our imaginations. Much more complexity is being claimed for agent-based models, and, of course, much more goes into the programming of sim politics. But it's far from certain that models of nuanced cultural and political systems -- foreign systems, embodiments of the other -- can be built. Lustick's Pakistan is a construct of his own devising and his experience in the Middle East. He has programmed the personalities and behaviors of the characters and forces in the model, basing them on his experiences, research and, presumably, biases. Critics outside the Pentagon argue that Lustick and others have produced simplistic simulations of individuals and cultures about which they have insufficient information.

Even proponents of agent-based modeling concede the enormous challenge. "These virtual political models should be a big part of the future of military simulation," says Col. George Stone, deputy director of the Army Model & Simulation Office. "But before we get there, we really have to understand human behavior better."

One challenge is the speed with which things change in the real world -- which is faster than any programmer can absorb. "If you look at what is going on in Iraq, we constantly have to learn the tactics of the enemy and alter our strategy to respond," says Stone. "But by then, the enemy has a new twist that we must react to. The question we must answer is, Can we ever know enough to program such uncertainty?"

In an agent-based model, each character, or agent, is assigned a set of simple behavior rules, which are based on the beliefs and goals that have been ascribed to that character. The agent stands in for one
or hundreds or thousands like him in a region or country; the world in which the agent operates is sometimes known as an "artificial life environment." The idea is to create a sufficiently varied group of agents with a sufficiently broad set of traits that adequately simulate the behavior, thoughts and interests of the population at large. In the agent-based models of interest to the U.S. military, psychological profiles for each agent are built from research, field data and interviews with experts who study the motives and
allegiances of factions within a political reality. In simulating conditions in Afghanistan, for example, an agent might be programmed to be the Afghan father of a son who was killed by a U.S. bomb. Like a real person, this sim Afghan is complex: not only a tragically stricken father but a devout Muslim, a local village council member and a dissatisfied former follower of a moderate mullah. He has, in a sense, multiple identities -- aggrieved father, peaceful village leader, potential recruit for a more radical mullah -- and the part of his personality that he "activates" or presents to the world depends on a rich stew of factors: with whom he associates, how others reward his various identities, and the political or social events that shape his world.

The notion here is that decisions and actions form identities, and identities influence other identities. An agent's decision to maintain a current identity or activate an alternative one -- stay home or join a Taliban faction, for example -- unfolds after it bumps into agents in its immediate neighborhood, agents whose own characteristics have been activated as the simulation evolves.

"The trick in this type of programming is to construct a basic framework for each character, to program who they are fundamentally, and then set them in motion," says Michael Zyda, director of the Naval Postgraduate School's Modeling, Virtual Environments and Simulation Institute (Moves). "Interesting things will emerge. The characters interact and generate whole sets of future, often unexpected, scenarios."

GI Agent, a model designed by a member of Zyda's team at Moves, illustrates how unanticipated results can emerge. A blue army faces off against a red army. The variables are not only psychological but physical: Each soldier is programmed for proficiency with weapons, type of arms carried, physical strength, and personality traits, such as a tendency to be self-reliant or overly self-protective, and a willingness to take on the enemy.

In one experiment, GI Agent designer Cap. Joel Pawloski and his programmer colleagues wanted to find the most effective way to sprinkle nine snipers throughout a blue army company made up of nine 10-soldier squadrons. In the first scenario, the programmers grouped all nine snipers together into a separate, tenth squadron. The results were dismal: The blue army was successful only about half the time.

But when the programmers instead inserted one sniper into each of the company's nine squadrons, the blue army was victorious 96 percent of the time. Why? The sniper within each squadron served as the advance guard, disabling key enemy positions at the start of a maneuver and thereby protecting the soldiers around him. Communication also improved, because the snipers, equipped with superior technology, were able to see farther than their comrades and so
conveyed more useful intelligence to company commanders.

"As in real life," says Zyda, "some agents hold more cards than others, and when they are at their greatest strength, they can overwhelm or at least neutralize agents around them."

Agent-based modeling is a child of complexity theory, which holds that the organization of complex systems hinges on the interplay of seemingly haphazard individual events. Complicated patterns -- how ants behave collectively, how terrorists choose targets -- emerge from what appears to be randomness. Bottom-up analysis begins with the small events, the unseen interactions of agents that influence the whole
system, and seeks to connect the local to, in political terms, the regional, national and international. It's not all about bad guys; there are broad applications: Complexity theorists say, for example, that traffic flow on a freeway can only be
predicted with models that simulate the behavior of the thousands of drivers on the road: their hard-braking, tailgating, rubbernecking, road rage.

"The behavior of a group or system is not preorganized and predetermined; it emerges from the collective interactions of all of its individuals," says Eric Bonabeau, chairman and chief scientific officer at Icosystem Corp. in Cambridge, Massachusetts, which designs agent-based models for companies. "Solutions presented by agent-based models are emergent and unanticipated." Answers arise to questions that weren't even asked.

Studying the tinderbox of racism yielded the first agent-based model of note. Developed in the late 1960s by distinguished Harvard professor of economics Thomas Schelling, the model was a manual, noncomputerized affair, almost a board game of the Reversi stripe. Schelling was curious about how segregated neighborhoods were formed. He had an inkling that more than absolute racism -- "there is no way I will live anywhere near a person not of my color" -- was responsible for the stark color divides between neighborhoods. Schelling made a grid with coins -- some representing blacks, others whites -- distributed randomly. He posited a simple rule: Each coin is happy if at least one-third of its neighbors are its own kind, the idea being that a person would tolerate living in a neighborhood in which only one-third -- but not fewer -- of nearby residents were the same color.
By any American standard, probably any standard in the world, such a neighborhood would be considered integrated.

As Schelling moved "unhappy" coins around the board
to meet the minimum requirements of neighborhood composition, however, a surprising thing happened. Integrated
grids quickly gave way to stark segregation. With a simple
agent-based model, containing only one variable, Schelling had demonstrated a powerful point: The jockeying for a modest, one might say ideal, level of integration led to a clustering that was far from ideal. Schelling's response to his research became a central tenet of complexity theory. "The interplay of individual choices . . . is a complex system with collective results that bear no close relation to the individual intent," he wrote in a 1969 paper. The model's outcome has since been tested in larger computerized simulations. Nice ideas about social change can be defeated by the small factors that produce rigid, countervailing patterns and forces.

In 1984 the Santa Fe Institute (SFI) was formed to examine how the actions of individual animate or inanimate objects combine to influence and create complex systems. Among the groundbreaking research to come out of SFI was the work of Christopher Langton, known as the founder of the field of artificial life. Langton developed a simulation program called Swarm that was inspired by the collective behavior of social animals like bees and birds. Swarm has proven highly versatile; it's been used to model nuclear fission chain reactions, rain forest ecosystems, and investor's stock-picking strategies.

Sims creator Will Wright was a frequent visitor
to SFI in the early '90s when he was developing his first games, including SimAnt, which replicated the problem-solving activities in an ant colony. "I realized at SFI how small our understanding of the world is," says Wright. "We can comprehend some aspects of cell chemistry, but we're virtually ignorant of how psychology emerges from cells -- from the rudiments of personality and behavior. In the interactions of agents, we get at least the first look at this process."

No surprise that business, always eager to understand the behavior of the inscrutable consumer, has glommed on to agent-based modeling to gain
a competitive advantage. Decisions as mundane as where to place wine in a supermarket have been based on models created from data gleaned from video surveillance of shopping patterns as customers bounced and jockeyed in
a British store. Medical research finds benefits in modeling as well: A 2002 model of bioterror attacks used historical data about the incidence of smallpox to develop a vaccination model that cut deaths 87 percent in a hundred different sim smallpox scenarios.
"It doesn't take much computing power to simulate things that the human mind has trouble understanding without simulation," says Robert Axelrod, a University of Michigan political scientist who has used agent-based models to parse human interactions for more than two decades.

The Defense Department's interest in agent-based modeling was stoked by the need to find an alternative to traditional war games, which are based on probability studies and statistical analysis and make no claim to understanding human thought. When the enemy was the Soviet Union, these old war games were perhaps enough. U.S. intelligence data enabled researchers to guess Soviet actions and U.S. counteractions to a reasonable degree of certainty ("Nikita will do this, we'll do that"), while military strategists used these games to assess war zone tactics. There was, in the horrible, symmetrical notion of mutual assured destruction, an assumption of stability and predictability between the two big powers, if not their regional proxies. But with an asymmetric terrorist threat, the old war games don't work; consider what 19 hijackers accomplished on September 11, hijackers who in convoluted ways may have been a
by-product of the United States' arming of mujahideen in Afghanistan in the 1980s as the Soviet Union approached collapse. New threats emerge from factions and regions that the United States has little historical understanding of, and it is here that the advocates
of agent-based models say sim
politics may hold some promise.

The Pentagon has anted up $100 million to develop OneSAF, a massive war game with agent-based "cognitive modules" that will be used to help U.S. forces better anticipate terrorist actions. Critical to the success of OneSAF, which is expected to enter field-testing next year, will be the programming of terrorist personalities. The need for sim Qaeda agents is taking modelers down strange paths. The team at Moves is trying to model
the behavior and thinking of
terrorists by creating a series of computer characters to populate a model code-named Iago, after Shakespeare's arch villain.

"Iago is the ber-saboteur," says John Hiles, a Moves director who joined the faculty of the Naval Postgraduate School a decade ago after being introduced to agent-based modeling as a Sims developer. "He destroyed an entire play, the entire world around him."

The ambitious goal of the Iago programmers is to illuminate what Hiles calls the backstage operations of thought. Characters are "patterned after actual bad guys who are behind bars, some of them terrorists and all of them extremely dangerous," and coded with crime-blotter backgrounds and nasty personal histories: A typical Iago
villain might log experience of abuse as a child, skills with weapons taught by an uncle, a record of petty robberies, paranoia, and a belief that the world is a limited place with no avenues for growth. How does a person like this, in an unstable part of the world, seduced by messages of violence and revenge, act?
"We want to watch, step by step, their thought processes," says Hiles.

The Iago work is in its very early stages, but Hiles says he and his colleagues have created agents that evince cognitive blending, combining old knowledge and new information, responding in new ways, having learned new things. Zyda is optimistic that before long Hiles and his team will produce a squad of intelligent, malevolent agents who will be useful in the running of complex terrorist scenarios.

Meanwhile, the creator of virtual Pakistan -- the place where the nukes keep falling into the wrong hands when government drops the civilian-transition ball -- argues that villains, or at least ugly events, naturally emerge from a well-built computer model, without the coding efforts of a virtual Shakespeare. Ian Lustick has produced a fantastically complex agent-based model that he calls Middle East Polity, or MEP.

Picture a Middle Eastern Arab state run by a semi-authoritarian regime that has a relatively
friendly relationship with the United States. Egypt, Jordan or Saudi Arabia come to mind, along with a few others. MEP contains nearly 2,500 agents of Lustick's devising, and it has a porous boundary that can expose these agents to more than 8,500 other agents operating in the region. It's a complex world of secular authoritarians, Pan-Arabists, moderates, fundamentalists and more, mixed in with radical Israeli settlers, Palestinians, terrorist sympathizers and pro-Americans.

Putting his virtual Arab country through its what-if paces, Lustick has been a prolific writer of reports that explore the policy options for the United States in the Middle East. Lustick's model investigates how best to keep a virtual Middle Eastern country stable during
periods marked by varying levels of violence and disruption -- whether U.S. diplomacy or U.S.-backed clampdowns by local leaders would be more effective. In the simulations, a tipping point emerged: When violent clashes between Israelis and Palestinians in neighboring Israel intensified, local public support for the stable if repressive government dissolved. Lustick's simulations suggest that while repression will somewhat quell unrest, it will be more effective when accompanied by U.S. diplomacy. In this combustible environment, then, the U.S. presence can play the role of gas or water.

"There's a good lesson for policymakers: It's not the presence of the U.S. that is a problem for many people in the Arab region, it's the type of presence we bring," says Lustick.

To some critics, the notion that sim politics can predict emergent events is pure programmer hubris. It presumes that cultural elements foreign to most Americans can be reduced to code, and individuals and groups reduced to agents. It assumes that models can produce outcomes accurate enough for policymakers to rely on. "Why should I believe that the identities programmed into the agents are correct in the first place, or, even if they are, that there will be a sudden and predictable identity transformation because they come
in contact with dissimilar agents?"
asks James Fearon, a political science professor at Stanford University and specialist in global conflicts. Fearon believes simulations can be useful to model events such as the spread of a disease but that applying them to complex political situations can be misleading. "There is a tremendous amount of unproven information being projected onto the models and the agents and, thus, questionable information coming out of them."

Sims creator Wright cites the irreducible complexity of the complex: It's impossible to anticipate all the potentially system-altering random actions and events at the bottom of a system, throwing those that happen nearer the top into question. "Chaos puts a fundamental limit on the powers of our models," says Wright. "As you scale up to larger and larger systems, you can probably model large trends -- such as, given these overall societal conditions, how many times out of 1,000 will there be a coup in the United States. But what the Iraqi resistance will do over the next month is based on thousands of tiny local factors that seem to always be in flux and to be too granular to be modeled."

It's fine -- not to mention great business -- for Sims players to have "the impression the model is a lot more elaborate than it is," but sim politics requires the opposite approach. "That wouldn't be acceptable in a sim war game, where real life and death are at stake, because players in the military don't necessarily have enough information to fill in what's left out," says Wright.

Lustick defends his approach by citing the rigor of his research. Much like any intelligence officer, he draws data from a range of sources -- micro, macro and meta. He uses local newspaper reports, ethnographic and political studies, even novels about the country written by natives. After encoding the identities of agents, programmers run tests to see if a model can replicate a condition that already exists. "Virtual Pakistan was ready," Lustick says, "when I could ask questions such as ?What proportion of Pushtuns who live in the cities are also part of the commercial elite?'
and get accurate answers that correspond with data that I did not use to produce the landscape."

But perhaps it's the critics who are simply attributing too much significance to the models. The models, says Michael Zyda of Moves, are never certain. "Agent-based models only produce potential outcomes, not definite predictions. It's up to the policymakers to use empirical information and their own guts to decide which outcome they believe in the most. Policy is nothing without analysis."

The goal for those who try to model the complexity of conflict is not a computerized crystal ball. It's more like an oddsmaker, a laptop geopolitical handicapper, something to shed a bit of light on the great endgame. What's happening here is simply a new wrinkle in the old habit of playing games in service of America's adventures in a dangerous world. The old board game Risk meets the Sims via Pentagon funding, and a virtual bin Laden comes knocking on a virtual door. n

Jeffrey Rothfeder is PopSci's consulting editor. He's working on his sixth book, about the Louisiana clan that built a financial empire from a family recipe for Tabasco sauce.