Nine Men's Morris is played in three distinct phases โ placing, sliding, and, once you're down to three pieces, flying anywhere on the board. This guide walks through the exact rules this site's Nine Men's Morris build enforces, including one place where it quietly breaks from the traditional rulebook, plus how its computer opponent actually decides where to move so you can beat it on purpose.
The Board and the Pieces
The Nine Men's Morris board has 24 points arranged as three nested squares connected by four spokes. Each side gets nine pieces. You place all nine, one at a time, before either side is allowed to start sliding pieces along the lines. There's no dice, no clock, and no hidden information โ every point on the board is visible to both sides at all times.
Sixteen different three-in-a-row lines, called mills, run through those 24 points: four around the outer square, four around the middle square, four around the inner square, and four running along the spokes that connect the three squares. Complete any one of them with three of your own pieces and you get to remove one of your opponent's pieces from the board.
The Three Phases: Placing, Moving, Flying
This version implements all three phases of the traditional game, not just the first two:
- Placing. Each turn you drop one piece from your stock of nine onto any empty point. This phase ends the moment your stock hits zero, tracked separately per side, so one player can start moving while the other still places.
- Moving. Once your stock is empty, you slide one piece per turn to an adjacent empty point along a line.
- Flying. The instant you're reduced to exactly three pieces on the board, that restriction disappears: you can move any one piece to any empty point, adjacent or not. This flips on automatically for both the human and the computer.
Flying only counts pieces on the board, and it can only switch on for a side that has already placed all nine of its pieces and moved on to sliding.
Forming a Mill and the Rule This Version Bends
Every time you complete a mill in Nine Men's Morris, you get to remove one enemy piece โ but not any piece. The standard rule protects pieces sitting inside a completed enemy mill, unless every single opponent piece is locked inside mills, in which case the protection lifts.
This build enforces the first half faithfully โ you can never click a piece that's part of a currently completed line. But it skips the exception: if every one of your opponent's remaining pieces is inside a mill when you complete yours, the game refuses to remove anything at all, instead of opening up the capture the way the traditional rules do. In the version on this site, stacking all of your survivors into mills makes you permanently immune to capture, not just until you're forced to break one open โ a real, exploitable difference, and it cuts both ways since the computer benefits from it too.
Winning, Losing, and the Three Ways to Draw
You win a game of Nine Men's Morris by doing either of these to your opponent:
- Reduce their pieces below three โ pieces still in hand count toward that total, so this can only really happen once placing is over and captures start piling up.
- Leave them with no legal move. If it's an opponent's turn during the moving phase and every one of their pieces is boxed in with no empty adjacent point, they lose on the spot. This block-out loss does not apply once a side reaches the flying phase, since a flying piece can always jump to any open point as long as one exists.
There are three separate ways this version can call a draw instead of a win:
| Draw condition | What triggers it |
|---|---|
| No capture for 50 half-moves | Once a side has finished placing, a shared counter ticks down every turn a mill isn't completed. Any capture resets it back to 50. |
| 10 moves in the flying phase | Once both sides are down to three pieces and flying, a second counter starts and ends the game in a draw if neither side wins within 10 more moves. |
| Same position three times | Once both sides have placed all nine pieces, if the exact board position repeats for a third time, it's a draw โ the same protection chess uses against stalling. |
Who Places First
Every new game flips a coin to decide who places the opening piece โ it is not always the human player, and it is not always the computer. If you load a fresh game and see the computer already moving, that's not a bug; it just won the coin flip.
Why the Middle-of-Side Points Are Worth Fighting For
Not every point on the 24-point board is equally useful, and the difference comes straight from how many neighbors each point has. Counting every connection in the board's own movement graph gives this exact breakdown:
| Neighbors | How many points | Where they are |
|---|---|---|
| 2 | 12 points | Every corner of all three squares |
| 3 | 8 points | The middle of each side on the outer and inner squares |
| 4 | 4 points | The middle of each side on the middle square โ where the connecting spokes cross it |
Every point on the board, regardless of how many neighbors it has, belongs to exactly two of the sixteen mills โ so mill potential doesn't explain the difference in strength. Mobility does. A piece sitting on one of those four points with four neighbors has four different ways to slide out of danger or into a threat; a piece parked on a corner with only two neighbors has half that many options and is far easier to trap during the moving phase. Holding even one of those four crossing points early tends to pay off later, when the board fills up and legal moves get scarce.
How the Computer Opponent Actually Decides Its Moves
The AI in this Nine Men's Morris build has no search depth and no lookahead โ it never simulates several moves ahead the way a minimax chess engine would. Each turn it runs a short, fixed checklist:
- Can I complete one of my own lines that already has two pieces in it, right now? If yes, it plays there, even if you're one move from completing a mill elsewhere.
- If not, is there an enemy line with two pieces and an open third spot? If yes, it blocks that spot.
- If not, it extends a partial line it already has, or falls back to a fairly arbitrary empty point.
The catch is how it checks step 2: the code scans the sixteen lines in one fixed order and stops at the first match โ it never keeps looking for a second, independent threat. Combined with step 1 always winning the tie-break, that produces two real openings: the computer takes its own mill instead of blocking you even when blocking was safer, and if you build two separate threats in the same turn, it can only see and block one.
In the moving phase, if no mill-completing or blocking move is physically reachable by an adjacent slide, the fallback is just the first empty point next to any of its own pieces, scanned in plain board order, with no judgment of square quality. And on the very first placement each side makes, the computer skips all of this and drops onto a completely random empty point, never a deliberate grab for a strong point.
Strategy: Turning the Computer's Blind Spots Into Wins
Knowing the checklist above changes how you should open and how you should attack in the midgame:
- Grab the four-neighbor points early. The computer's first placement each game is random and later placements are reactive, so you have a real window to claim two or three of the four strongest points before it catches on.
- Build two threats at once, not one. Since the danger-line check stops at the first match, set up a two-piece line on the outer or middle square at the same time as one along a spoke. The computer can only block one, and you complete the other next turn.
- Let it take a small mill if a bigger one is coming. The AI always completes its own available mill before checking whether to block you, so a small sacrifice that keeps its "complete now" option open can distract it from a bigger threat you're building elsewhere.
- Protect pieces by stacking mills, not spreading out. Because this version never lifts mill protection, clustering survivors into completed lines late in a game makes them permanently uncapturable โ a trick that doesn't work under the traditional rules.
- Watch the flying phase. The computer flies whichever piece isn't part of its target line, with no regard for what that piece was defending. Force flying while you still hold a four-neighbor point and it will happily abandon it.

None of this requires memorizing openings the way chess does โ the board is small and the computer's decision-making narrow enough that a handful of test games is usually enough to start winning consistently.
Comparing It to Other Turn-Based Strategy Games on the Site
If the appeal of Nine Men's Morris is a small, fully visible board and a fixed set of rules to outplay, two other games scratch a similar itch. Tic-Tac-Toe strips the same three-in-a-row idea down to a 3x3 grid with no movement phase, a fast way to warm up on spotting forced threats; its own strategy guide covers that in more depth. Connect Four keeps the row-building goal but adds gravity and a bigger board, covered in a separate Connect Four guide. Reversi is another board classic worth comparing for how differently it rewards controlling corners versus edges, in the site's Reversi guide.
Frequently Asked Questions
How many pieces does each player get in Nine Men's Morris?
Nine each, placed one at a time before either side is allowed to start sliding pieces around the board.
Can you remove a piece that's part of a mill?
No, not in this version, with no exception. The traditional rule allows it once every one of the opponent's pieces is inside a mill; this build never lifts that protection, so a fully "milled up" side becomes permanently safe from capture here.
What happens if I have no legal move?
You lose immediately, but only while you are sliding pieces in the moving phase. Once you're down to three pieces and flying, you can always jump to any open point, so being blocked out stops being possible.
When do pieces start flying instead of sliding?
The moment a side is reduced to exactly three pieces on the board โ not three pieces total including stock, and only once that side has finished placing all nine of its pieces.
Does the computer always let the human move first?
No. Every new game randomly decides which side places the opening piece, so roughly half the time the computer moves first.
Can a game of Nine Men's Morris end in a draw?
Yes, in three separate ways: 50 half-moves without a capture, 10 moves once both sides are flying, or the same board position occurring a third time.