Implementation Log: Royal Game of Ur
A record of implementing the ancient Mesopotamian race game 'Royal Game of Ur' on the Parlourite engine. Covers the game overview, historical context, implementation details, and decisions on ambiguous rules.
I implemented the Royal Game of Ur on the Parlourite engine. This is a record of the work, created as the game is added to the public lineup.
About the Royal Game of Ur
The Royal Game of Ur is a race game played in Mesopotamia around 2600 BCE. Boards excavated from the Royal Tombs of Ur in the 1920s are now housed in the British Museum.
On a distinctive 20-square board, each player starts with 7 pieces in hand, advances them along their path, and bears them off the board. Players roll four two-sided dice (yielding 0–4 pips) and move a piece by the total. The first to bear off all pieces wins.
The paths partially overlap, and landing on an opponent’s piece captures it, sending it back to hand. However, pieces on rosette squares (marked with flower patterns) cannot be captured. Landing on a rosette grants another turn.
Despite its antiquity, the game offers a good balance of luck and strategy. The rules are simple, yet there is room for meaningful decisions: blocking on shared squares, leveraging rosettes, and timing the bear-off.
History and Reconstruction
The original rules of this game have not survived in written form. The rules played today are reconstructions by researchers, based on clay tablet fragments and board structures.
Several reconstruction lineages exist, differing in path length and shape. This implementation follows the reconstruction based on British Museum research, in which all five rosettes grant an extra turn.
The discovery of boards in royal tombs suggests the game held significance beyond mere entertainment. In ancient Mesopotamia, dice rolls were sometimes interpreted as divine will, and game outcomes may have been tied to divination or ritual. The inclusion of boards among royal grave goods might reflect beliefs about playing in the afterlife or communicating with the gods through games.
After 4,600 years, we cannot know exactly how people felt as they gathered around these boards. Yet the wear marks on excavated pieces show they were played repeatedly. The excitement over victories and the frustration over bad rolls were probably much the same as ours today.
Implementation Details
The Royal Game of Ur presents several interesting characteristics when implemented on a general-purpose engine.
Separate Paths per Seat
Both players use the same board but follow different paths. Start and end points are separate, with only the central 8 squares shared. Each board node carries path-number attributes per seat, referenced during move calculation.
Consecutive Turns
Landing on a rosette grants the same player another roll. Turn-end conditions depend on the landing square, not simple alternation. The state machine includes a rosette check at turn end to determine the next seat.
Exact Bear-off
Bearing off requires landing exactly on the 15th step. A piece on step 14 cannot move if the roll exceeds 1. This “exact” constraint tends to create late-game deadlocks and was a focus of testing.
Dice Processing
Four two-sided dice are rolled individually and summed. By aligning the order of random number consumption, the same seed reproduces the same game state.
Verification
30 games totaling 4,712 moves were visually inspected and established as the baseline for verifying legal move sets and game-end conditions.
Unit tests confirmed the following:
- Initial setup (7 in hand, 0 on board)
- Entering and advancing
- Capture and return to hand
- Rosette protection and extra turns
- Exact 15-step bear-off
- Pass on 0 or no usable roll
- Win on 7 bear-offs (not on 6)
Mutation probe passed 8/8.
Decisions on Ambiguous Rules
The reconstructed rules do not specify certain edge cases. The following were resolved by independent judgment and recorded in internal project documentation.
- Whether the central rosette (D2) grants an extra turn varies by reconstruction. This implementation treats all five rosettes as granting extra turns
- When multiple pieces simultaneously meet bear-off conditions, the player may choose freely
- A piece cannot enter if the first step is occupied by one’s own piece
These are recorded as candidates for revision should more reliable sources emerge.
Reflections
The Royal Game of Ur is among the oldest games humanity has played. Imagining people 4,600 years ago rejoicing and lamenting over the same board reminds us of the universality of games.
As Mesopotamian city-states rose and fell, this game is thought to have spread from palaces to common homes. Similar boards later appeared in Egypt and India, suggesting transmission along trade routes. Contemplating a single game passing across civilizations underscores the enduring power of tabletop play.
The implementation proceeded relatively smoothly. Key design points were path asymmetry and rosette handling, both well served by the engine’s coordinate and attribute systems.
There is a quiet satisfaction in running an ancient game on a modern computer. In the public lineup, this title is positioned as an introductory piece, yet it remains memorable for the weight of history it carries.