Nine Men's Morris Strategy: Beating the AI Game After Game
Updated October 2026
Nine Men's Morris is one of the oldest board games still played, and its rules fit on a postcard: place nine pieces, slide them along lines, and capture whenever you line up three. The depth comes from timing. A single move can create a capture next turn, a defensive block, and a trap for later, all at once. On ujem you play the blue side against a computer that grows stronger with every win, and your score is how many games you can win in a row. This guide covers the exact rules as this version applies them, how the computer thinks at each level, and the plans that win.
The board and the rules as implemented
The board has 24 points arranged on three nested squares, joined by four short lines through the middle of each side. There are 16 possible mills: the three points along each side of each square, plus the four connecting lines that run from the outer square to the inner one. You are blue and always move first, and each side starts with nine pieces in hand.
Placing. Players alternate putting one piece on any empty point. The message above the board counts how many you still have in hand. After nine turns each, both hands are empty and the game switches to moving.
Moving. Tap one of your pieces to select it (a gold ring appears) and green dots mark every point it can slide to along a line. Tap a dot to move, tap the selected piece again to cancel, or tap another of your pieces to switch. A side reduced to exactly three pieces may fly: any of its pieces can jump to any empty point. That applies to the computer as well as to you.
Capturing. A mill counts only when the piece you just placed or moved completes it. You then pick one enemy piece to remove; pulsing rings show the legal choices. Pieces that sit in a complete enemy mill are protected, unless every enemy piece is in a mill, in which case any can go. Moving a piece out of a mill and back in later forms that mill again and earns a fresh capture.
Winning. Once the placing stage is over, a side with fewer than three pieces loses, and so does a side that has no legal move on its turn. If 60 turns in a row (counting both players) pass with no capture, the game is a draw. A draw does not extend your streak: the card offers only a new game, which resets it to zero.
How the computer plays at each streak
The computer changes its approach as your streak grows. Knowing the tiers tells you how careful you need to be.
- Streak 0 and 1: it considers only its own next move, scoring each by material, completed mills, open two-in-a-row lines and how central its pieces are, with a large bonus for any move that closes a mill. It also plays a completely random move 40 percent of the time in your first game and 28 percent in the second.
- Streak 2 to 4: it searches three moves deep, counting both sides, within a quarter-second budget. Random moves drop to 16 percent for streaks 2 and 3 and 7 percent at streak 4.
- Streak 5 and beyond: it searches up to five moves deep with a longer budget of 0.7 seconds, so you will see it pause before replying. At streak 5 it still makes 7 percent random moves; from streak 6 on it makes none, and it does not get any stronger after that.
The search has a time limit, so on a slower phone it simply reads less deeply in the same time. The early games are the place to win comfortably and practise plans; the real contest starts around the third win.
Placing stage: build shapes, not just pieces
During placement the board fills quickly, and most games are decided by the shapes you leave for the moving stage. Three ideas matter most.
Value the junctions. The four middle points of the middle square each touch four lines, the middle points of the outer and inner squares touch three, and the twelve corners touch only two. A piece on a four-way point sits on two possible mills and can later slide in four directions. Early placements there give you more future mills and more room to move.
Make forks. A fork is a placement that creates two separate two-in-a-row lines with open third points. The opponent can block only one per turn, so the other closes. Watch especially for points where one of your lines along a square meets one of your lines on a connecting spoke.
Answer every open two. Whenever the computer has two pieces on a line with the third point empty, it threatens a mill next turn. Block it unless you can close a mill of your own first: capturing beats defending, because your removal can break up its threat and you keep the initiative. The best block is a piece that also extends one of your own lines.
Moving stage: mobility and the swinging mill
Once pieces slide, mobility becomes material. A side with no legal move loses on the spot, so count how many free neighbouring points each side has, not just how many pieces. Keeping one or two empty points next to your groups gives you breathing room and options to re-form mills.
The most powerful structure is a pair of mills that share a single swinging piece, or a mill with an empty point beside it that the same piece can step to and back. Each time the piece steps out and back in, a mill re-forms and you capture again. The computer at higher tiers will try to block the empty point, so build the shape while it is busy answering another threat. Keep pieces in your completed mills when you can: they are immune from capture unless all your pieces are in mills.
When you remove a piece, choose with purpose. Good targets are the piece blocking your swinging mill, one half of an enemy open two, or the only piece guarding a gap you want to use. Removing a random edge piece often wastes the capture.
The three-piece endgame
When a side drops to three pieces it may fly anywhere, which suddenly makes it dangerous: a flying player can complete a mill on any open line. If the computer is down to three, close down open lines before going for the last capture, and leave it as few two-in-a-row chances as possible. If you are down to three, use flying to block its lines and to build a two-way threat it cannot cover. Remember the 60-turn draw rule: a draw ends your streak just like a loss, so when you are ahead, keep creating capture threats instead of shuffling.
Common mistakes against this computer
- Racing for corners. Corners join only two lines; they are the easiest pieces to trap later.
- Ignoring an open two because you have one too. If its mill closes first, the removal it makes may target your own threat.
- Crowding into one square. Packed pieces block each other in the moving stage.
Your best streak is saved on your device, and any streak above zero can be sent to the Hall of Fame from the end-of-game card.
▶ Play Nine Men's Morris Form mills, capture, and build a win streak.