Hamurabi
Published:
Long before computers existed, Hammurabi ruled Babylon.
He lived almost four thousand years ago and became one of the best-known kings of ancient Mesopotamia. His name is especially associated with the Code of Hammurabi, a collection of laws inscribed on a stone monument. The laws dealt with subjects such as trade, property, debt, family life, wages, agriculture, and punishment.
What makes Hammurabi interesting is not simply that he was a powerful king. His name became connected with the idea of governing a society through rules, responsibilities, rewards, and consequences.
Thousands of years later, that same name appeared in a very different place:
a computer terminal.
The game is usually written Hamurabi, with one fewer m than the historical king.
It is strange to look at Hamurabi today and call it a computer game.
There are no graphics. No music. No animation. There is not even a map.
The computer simply gives you a few numbers and asks what you want to do.
Yet behind those numbers is an idea that would later appear in countless strategy and simulation games: you are responsible for a small world, and every decision has consequences.
Hamurabi is one of the earliest resource-management computer games. Its roots go back to The Sumerian Game, an educational simulation created in the 1960s. Doug Dyment later developed a smaller version called King of Sumeria. David H. Ahl eventually published a BASIC version, and the game became widely known as Hamurabi.
The historical connection is easy to understand.
Hammurabi had to govern a kingdom.
Hamurabi asks the player to do something similar, although in a greatly simplified form.
You have people.
You have land.
You have grain.
And you have ten years to prove that you can manage them.
At the beginning of each year, the game reports what happened during the previous one. How many people lived in the city? How much grain was harvested? Did rats eat part of the stored grain? Did the population increase? Did a plague arrive?
Then the decisions begin.
How much land should you buy?
Should you sell some land?
How much grain should be given to the population?
How many acres should be planted?
The questions look simple because they are expressed as numbers.
They are not simple.
If too little grain is given to the people, they starve.
If too much grain is used for food, there may not be enough left for planting.
If too much land is purchased, the grain reserves may become dangerously small.
And even if everything is planned carefully, the next harvest may be disappointing.
That is what makes Hamurabi interesting.
The player is not trying to find one correct move. The player is trying to make reasonable decisions with incomplete information.
In that sense, the game is closer to governing than it first appears.
A ruler cannot control the weather.
A ruler cannot guarantee a good harvest.
A ruler cannot always predict disease or population changes.
What can be controlled is the use of available resources.
A good harvest can make a risky decision look brilliant. A bad harvest can expose a kingdom that has no reserves.
The game therefore teaches something that is easy to forget when looking at modern strategy games: resources are choices.
A bushel of grain is not simply grain.
It can feed someone.
It can help produce the next harvest.
It can be saved for the future.
It can indirectly be exchanged for land.
Using it for one purpose means losing the opportunity to use it for another.
This is where the ancient king and the computer game meet in an interesting way.
Hammurabi is remembered partly because governing required rules about land, agriculture, trade, debt, and responsibility.
Hamurabi reduces a kingdom to only a few variables, but the central problem remains recognizable:
How should limited resources be distributed?
Modern games hide these relationships behind beautiful interfaces, progress bars, maps, buildings, animations, and hundreds of different resources. Hamurabi presents almost the same problem using only text and arithmetic.
There is another interesting lesson in the game: growth is not always good.
Buying more land sounds like progress. A larger population sounds like success. A bigger harvest sounds like security.
But every form of growth creates another requirement.
More land needs more people to cultivate it.
More people need more grain.
More planting requires larger reserves.
Expansion without the ability to support it can make the kingdom weaker rather than stronger.
Ancient rulers understood this problem long before computers existed.
A kingdom could conquer new land, but that land still had to be administered, defended, cultivated, and supplied.
Growth creates power.
It also creates responsibility.
This idea appears everywhere in computing and engineering as well.
A larger system needs more resources.
More users require more capacity.
More features create more complexity.
More machines create more things that can fail.
Growth changes the problem.
Hamurabi also demonstrates how little a computer game actually needs in order to create tension.
A modern game may require gigabytes of graphics and audio. Hamurabi needs only a small program, a few variables, some random numbers, and a player who cares about the result.
After entering a number, you wait for the computer to tell you what happened.
A good harvest feels like relief.
A plague feels unfair.
Starvation makes the previous year’s decisions suddenly look very different.
Nothing is animated, but a story still appears in the player’s mind.
Perhaps this is the most impressive part of the game.
The computer does not show you a kingdom.
It gives you enough information to imagine one.
Behind a line saying that people starved is an entire failed policy. Behind a successful harvest is another year of survival. Behind the final statistics is a ten-year history created mostly from arithmetic.
Hamurabi belongs to a period when computers had extremely limited memory and processing power. Those limitations forced programmers to focus on systems rather than presentation.
There was no space for thousands of textures or complicated visual effects.
The rules had to be interesting.
The numbers had to interact.
The player had to make decisions.
More than half a century later, that design still works.
Hamurabi is primitive when judged by graphics.
It is surprisingly modern when judged by ideas.
Resource management, risk, random events, economic trade-offs, population management, long-term planning, and the consequences of short-term decisions are all there.
Many later strategy and city-building games would make these systems enormously more complicated.
But the basic question remains almost unchanged:
You have limited resources and an uncertain future. What will you do this year?
Perhaps that is why the name Hammurabi fits the game so well.
The historical king is remembered thousands of years later for ruling, organizing, legislating, and managing a complex society.
The computer game gives us only grain, land, people, and a blinking cursor.
But for a few minutes, it asks us to become a ruler too.
And it reminds us of something that applies equally well to ancient kingdoms, computer systems, and ordinary life:
Good decisions are not about predicting the future perfectly.
They are about using today’s resources without destroying tomorrow’s possibilities.
