Play the Royal Game of Ur, an ancient dice race, against the computer at three levels or with a friend on one screen.
Solid 0 of 7 home
Ring 0 of 7 home
Your throw (Solid)
-
Session You 0, Computer 0
Wins 0
Get all 7 of your pieces home first. Press Throw dice: four two-sided dice, and each marked one counts 1 (so a throw is 0 to 4, and 2 is the most likely). Move one piece forward by the throw. Your path runs along your own lane, up the shared middle lane, and back into your own lane. You cannot land on your own piece. Landing on an enemy piece in the middle lane sends it back to start, unless it sits on the safe rosette in the centre. Landing on any star-shaped rosette gives you another throw. To leave the board you need the exact throw. Click a piece that has a dashed outline, or the dotted square it moves to. Arrow keys move around the board, Enter or Space moves.
Easy picks any legal piece at random. Medium and Hard average over every possible throw (0 to 4 marked dice, weighted 1, 4, 6, 4, 1 out of 16) and assume the other side always picks its best reply: Medium looks one move ahead after its own, Hard looks two. They score a position by how far each side's pieces have travelled, the safe centre rosette, and the chance that a piece on the shared lane is hit by the next throw. There is a lot of luck in this game, so even the best play loses sometimes. Undo takes back your last move and everything after it, and a game that used Undo is not counted as a result. Undo is not available once a game is over.
As-is, no warranty. These apps are free under their listed license and run entirely in your browser. Use at your own risk — don't blame me if your PC catches fire, your dog runs away, or the math turns out wrong. Verify anything that actually matters. None of this is professional financial, medical, legal, or engineering advice.
Royal Game of Ur is a race game from the ancient Near East. The rules below are the reconstruction that is most often published; nobody knows exactly how it was played, so treat them as one good version. The board is three rows of eight squares, with four squares missing, so it is a block at the left, a narrow bridge, and a block at the right.
Each side has 7 pieces. The two sides are called Solid and Ring. Solid pieces are sky blue discs and Ring pieces are orange discs with a ring in the middle, so you can tell them apart without relying on colour. Solid uses the bottom lane and Ring the top lane. The middle lane is shared.
The path. Every piece travels 14 squares: four in your own lane, eight along the shared middle lane, then two more in your own lane before it leaves the board. Your own lane squares are tinted with your colour, and the shared lane is violet. Pieces start off the board in the “Waiting” box.
The dice. Press Throw dice. Four two-sided dice are thrown, and each one that comes up marked counts 1. So a throw is 0, 1, 2, 3 or 4, and the chances are 1, 4, 6, 4 and 1 out of 16: a 2 comes up three times in eight, a 0 or a 4 only once in sixteen. On a 0 you lose your turn.
Moving. Move one piece forward by the number thrown. You cannot land on one of your own pieces. If no piece can move, the turn passes by itself and the page says so. To leave the board a piece needs the exact number to land one step past its last square.
Capturing. If you land on a lone enemy piece on the shared lane, it goes back to the Waiting box. The centre rosette is the exception: a piece sitting there is safe, and nobody can land on it.
Rosettes. The star-shaped squares are rosettes. The fourth and the fourteenth square of your path are rosettes, and so is the centre of the shared lane. Landing on one gives you another throw.
Winning. The first side to bring all 7 pieces home wins.
Controls:
After a throw, pieces that can move have a dashed outline and the square each would land on has a lime dot. Click the piece or the dotted square. A waiting piece is entered by clicking the Waiting box, and a piece that can leave the board by clicking the Home box. On the keyboard, arrow keys move around the board (Home and End jump to the ends of a row), and Enter or Space moves the piece. Every square is announced with its row, column, lane, contents and whether it is a rosette or a legal move. The page address carries your settings, so you can bookmark a setup.
Each side’s pieces are stored as positions: 0 for waiting, 1 to 14 for the path, 15 for home. Squares 5 to 12 are the shared lane, and squares 4, 8 and 14 are the rosettes. A move is legal when the landing square is not one of your own pieces, is not the centre rosette with an enemy on it, and does not overshoot home. A capture happens when you land on an enemy piece on squares 5 to 12.
The test suite pins the rules in several ways:
The computer comes in three levels:
This is an expectimax search: it takes the best move at its own turns, the worst for it at the opponent’s turns, and the probability-weighted average at every throw. A position is scored by how far each side’s pieces have travelled, a bonus for holding the centre rosette, and the chance that each piece standing on the shared lane is hit by the opponent’s next throw. In the test suite, over 60 seeded games with sides alternating, Hard and Medium each beat Easy in at least 54, Hard beat Medium in at least 52 of 100, and a Hard move never searched more than 40 thousand positions and the suite fails if one takes 3 seconds, even on a busy machine. The computer waits about two thirds of a second before each throw and move so you can follow, and moves at once if you have asked for reduced motion. There is a lot of luck in this game, so even the strongest play loses sometimes.
Nothing is uploaded and there is no account. Against the computer, your win count for each difficulty is saved in your browser’s local storage, as small whole numbers inside a small JSON object, under one key. Clearing site data removes them. The session tally lives only on the page and resets when you leave it. A game in which you used Undo is not counted, so the saved figures are not inflated.
Everything runs locally in your browser.
Free to play, no ads, nothing uploaded. These games are original and are not affiliated with any other game or brand.