Modelling Reality Through Games

In the (underrated) musical Chess by Björn Ulvaeus, Benny Andersson and Tim Rice, the cast explains how the game of Chess came to be:

Not much is known of early days of chess beyond a fairly vague report

That fifteen hundred years ago two princes fought

Tough brothers for a Hindu throne

The mother cried, for no one really likes their offspring fighting to the death

She begged to stop the slaughter with her every breath

But sure enough one brother died

Sad beyond belief, she told her winning son

“You have caused such grief, I can’t forgive this evil thing you’ve done!”

He tried to explain how things had really been

But he tried in vain

No words of his could mollify the queen

And so he asked the wisest men he knew

The way to lessen her distress

They told him he’d be pretty certain to impress

By using model soldiers on a checkered board

To show it was his brother’s fault —

They thus invented chess

This is a rather elaborate fiction, at least as far as I’m aware. There were no such duelling princes, and the idea that a mother would be consoled by a bunch of ivory pieces on a grid is laughable. What is true, and what is relevant to our discussion here, is that the game of chess did most likely originate in India, and it was likely used to some degree or another in the study of military strategy.

Chaturanga, the game that is considered to have evolved into chess, used six distinct types of pieces, as does modern chess: the Rajah (king), the Mantri (counsellor), Ratha (chariot), Gaja (elephant, Ashra (horse) and Padati (footsoldier). Their movement on the game board approximates their movement on the battlefield:

  • The Ratha moves like a rook in chess, in straight horizontal or vertical lines, mimicking a charging chariot.
Rook icon created by LAFS from Noun Project (CC-BY).

Rook icon created by LAFS from Noun Project (CC-BY).

  • The Ashra moves like the modern chess knight, a slower heavy cavalry unit that is more adept at close quarters combat than the lighter chariot.
Knight icon created by LAFS from Noun Project (CC-BY).

Knight icon created by LAFS from Noun Project (CC-BY).

  • The Gaja’s moves are less well-defined. The great fount of knowledge that is Wikipedia describes three variants:
Elephant icon created by Icon Fair from Noun Project (CC-BY).

Elephant icon created by Icon Fair from Noun Project (CC-BY).

Conceptually, any of these movements would fit the role of a war elephant perfectly: slow movement that is adept at wreaking havoc up and down enemy lines. (The modern chess bishop, with diagonal movement limited only by obstructions in its path, is a Renaissance European invention.)

  • The Padati, the lowly footsoldier, can only move forward one step at a time, just like on the battlefield. They cannot retreat. I’m not sure why they capture diagonally — if there was a specific reason for it, it has long since been lost to the sands of time. To make up for the Padati’s handicapped movement, there are lots of them — eight, to be exact — and they start on the board in a horizontal line.
Pawn icon created by LAFS from Noun Project (CC-BY).

Pawn icon created by LAFS from Noun Project (CC-BY).

What’s striking about this configuration is that this line of pawns mimics infantry movement in unexpected ways. Pawns are individually weak but in aggregate are used to form a strong defensive line. The middle pawns often advance to form a salient, claiming control of territory in the middle of the board, but can sometimes become isolated from the rest of the line. Two lines of pawns often face off in what is effectively a deadlock, unless a player can make a diagonal capture (mimicking flanking) or bring in one of the “heavy” units to bear on the line of pawns.

Of course, this comparison has its limits. Infantry does often form the frontline, but rarely does infantry enter the battlefield first. That role goes to reconnaissance units and light cavalry. Since chess is a perfect information game, there is no need for reconnaissance, but this limits its utility as a tool for exploring real-world military strategy. Additionally, in combat, long-range units engage before close-range units, but chess’s capture system models only close-range combat.

All models are inaccurate, some models are useful

Of course, none of this should reflect negatively on chess. Whatever its origins, it has long ceased to be a model for military strategy. What interests me is the abstraction of chess. In trying to create a high-level model of military strategy, many aspects of warfare had to be abstracted away. First of all, the terrain: a chess board does not model the advantages and disadvantages provided by different types of terrain. Secondly, the game does not account for asymmetry of manpower, matériel, or other force multipliers such as training or technology: both sides start with the same number and type of pieces. Thirdly, the game does not account for any asymmetry of information: you always know exactly where your opponent’s pieces are at any given time. This isolates the importance of battlefield tactics.

For a game, this is ideal, because this means that the differentiator between two players is the quality of their tactical and strategic play, and nothing else. As a model of battle, however, this limits the utility of chess.

Games as models of reality

With the rise and dominance of video games, the potential of games as models has gotten a lot more interesting. In particular, simulation, base-building and strategy games are often designed to be semi-realistic models of something that exists — or could exist — in the real world: SimTower is a model of elevator traffic, Cities: Skylines is a model of urban traffic, and SimPark (a sorely underrated game) is a model of the ecology of a park habitat. Some strategy games are models of hypothetical or counterfactual situations: Frostpunk is about surviving a volcanic winter in the year 1886, Surviving Mars is a model of a future colonisation of Mars, and Jurassic World Evolution is a model of a series of dinosaur zoos.

What’s interesting about these types of model-building is that they tend to be based on complex systems.

You may have heard of the Cynefin framework, which divides problem-solving situations into four types: simple, complicated, complex and chaotic. The chaotic condition doesn’t interest us here, as it’s typically not modellable. The best breakdown of the remaining three conditions I’ve seen comes from a paper on healthcare reform by Sholom Glouberman and Brenda Zimmerman:

From Glouberman and Zimmerman (2002)

From Glouberman and Zimmerman (2002)

The Cynefin framework is designed to explain problem-solving circumstances or conditions, but that’s just the flip side of working on a system. A rocket is a complicated system and building one is a complicated problem. A child is a complex system and raising one is a complex probleem. A habitat’s ecology is a complex system and managing one is a complex problem. Urban traffic is a complex system and managing it is a complex problem. International diplomacy is a complex system and navigating it is a complex problem.

Games with the highest replay value are often built on complex systems, with many interrelated variables that are not strictly solvable through maths alone. This gives the player complex problems to solve that are never quite the same on each playthrough.

(An aside: if a computer is a logic machine built on maths and maths alone, it’s worth asking if any computer games are truly complex, as opposed to merely complicated: given an infinite amount of time and computing resources, couldn’t an optimal solution to any game be found? Well, yes — that is what speedrunners try to do. The most complex games have an element of randomness to them, but computers can’t really generate “true” randomness, which is also why random number generator (RNG) manipulation is even a thing. So, if you want to a total pedant: such computer games are, strictly speaking, systems that are so complicated they are, for all practical purposes, complex systems.)

Emergent patterns in complex systems: Cities: Skylines

A distinguishing feature of complex systems of any kind is that they will produce emergent patterns. Consider the pawn on a chessboard. The rules of pawn movement are simple: One square forward at a time. Two squares forward, if you wish, on any given pawn’s first move. Capture one square diagonally. And yet, within the game of chess, this simple movement gives rise to a whole range of theories and strategies revolving around pawn structure.

What some of the best games do is to create a model with similarly simple rules that create emergent patterns. Look at a city-simulation game like Cities: Skylines. You lay out roads, zone residential, commercial and industrial districts, place amenities such as schools and hospitals, and implement a public transport network. The game simulates up to one million individual citizens’ movements: people wake up, go to work, go to the shops, go home. At work, they take deliveries or make them. Students go to school and, in the mid-afternoon, hang out in town or go to their friends’ homes. Tourists go from airport to hotel to tourist attraction.

(click on any of the following images to enlarge)

A city I built: the main city in the north-east, with two separate “centres”, a large industrial zone in the west, and the tourist district in the south-east.

City rhythms emerge out of up to one million individual modelled movements. Here, citizen Ashleigh Dixon is going to Club de la Crème, and she’s on foot for this part of her journey.

At Ashleigh’s workplace, Aero Designs, a company van (with a donut on top) is leaving the industrial zone to deliver goods to Busy Corner Shop.

Outside the Busy Corner Shop, a public bus is running its route. This one is almost full.

This tourist has gotten hold of a bicycle, and he’s cycling to the Expo.

A tourist is walking to the Stadium.

Another tourist walking to the Stadium. There must be an event happening there.

There’s no way to see if there’s an event at the stadium, but you can see that it draws both residents and tourists.

A truck brings forestry products to the cargo train station near the industrial park for export…

… while another trucks moves forestry imports from the cargo train terminal to The Lumber Mill.

Imports can also travel the entire distance by truck. (If your city has coal or oil power plants but no coal or oil, they will have to be imported — and if the truck can’t get there in time, the plant stops running.)

Of course, exports can travel out of the city entirely by truck, too.

This commuter blimp is empty in the middle of the day…

… while this one, plying the route from the city to the tourist district, is full.

This tourist is leaving the city. Once he reaches the airport, he will despawn (I think).

Municipal facilities also generate their own traffic. Here, a fully-loaded garbage truck makes its way to the incineration plant.

Municipal services also employ people, adding to the realism of the simulation and the patterns that emerge from it.

By modelling individual movements, the game creates an emergent picture of traffic patterns in the city. People move en masse from residential to commercial and industrial districts, and then they go home en masse. Industrial districts generate traffic to commercial districts, as well as to and from other cities in the form of exports and imports. The sum of individual movements produces consistent patterns, and the joy of the game is to figure out how to make the adjustments that modify or constrain that emergent pattern.

In the case of Cities: Skylines, the key to managing your city’s traffic turns out to be isolating your industrial districts. Residential and commercial districts can mix, but industrial districts must be separate and have their own routes into and out of the city. (The fact that this is exactly how actual cities tend to be laid out is not a coincidence.)

Another Example: SimTower

An older and clunkier example of simple rules producing emergent patterns, perhaps, is SimTower. In SimTower, you’re tasked with building a tower that turns a profit and keeps all its tenants happy. Low rent makes people happy. Long elevator wait times make them unhappy. Having to travel far to get to a food or retail outlet makes them unhappy. People will use escalators where available, but never more than seven; people will use stairs where available, but never more than four. People will only change modes of transport once.

What these rules create is an emergent pattern of play that encourages players to keep their office tenants separate from the residential and hospitality tenants in order to manage traffic. Here’s an excerpt of a post from r/SimTower titled Optimal Tower Design:

Office workers should never be using regular elevators to get anywhere. Office worker population density is too high. They must be forced to take the stairs (disable elevator access to their floors!)

David Wolever reached a similar conclusion. Here’s a passing comment from his post detailing how he beat the game:

… You will need to make sure that the lazy sims working in the offices don’t use these elevators.

These two players have very different styles of play, but they converged on a principle of play that is not immediately suggested by the rules. Furthermore, this happens to be the solution that real towers employ to manage traffic: separating the modes of transport used by office tenants from other tenants.

Optimal tower design: elevators do not run to offices.

Optimal tower design: elevators do not run to offices.

You might argue that no real-life tower would prevent office workers from using the elevators. This is obviously true, and points to limitations in even well-designed complex models: any model is an abstraction, and will abstract away important information to some degree or another. In this case, SimTower’s model assumes that all units of a floor are accessible from any other unit of the same floor. There is no way to create segregated office blocks or areas with a shared retail area. (Project Highrise, a more recent tower simulation game, allows this.) This leads to players artificially separating them by forcing office workers to use the stairs while residents get to use the elevators.

The educational value of games

If game models are flawed, what value do they provide? What can they really tell us about the thing they are modelling?

That’s what I want to look at next, with a thorough examination of Civilization VI and the gameplay that emerges from it.