Nine Men's Morris Best Move Calculator
Set up any Nine Men’s Morris position — placing, moving or flying — and this solver finds the best move, ranks every legal alternative, and shows what the position is actually worth in mills, potential mills and, above all, mobility.
Built by Brian Hamilton
Place some stones, set how many are still to be placed, then press Find best move.
You do not win by making mills
Almost every beginner plays Nine Men’s Morris as a race to build three in a row. Mills matter, but they are the means, not the end. There are two ways to lose this game: being reduced to two stones, or having no legal move at all. The second one decides more games than most players realise, and it is invisible if you are only counting stones.
Feed that position to the calculator and it returns a decided result immediately: White has zero legal moves, so the game is over regardless of the fact that Black is only one stone ahead. This is why the tool reports mobility as prominently as it reports stone count. When your mobility falls toward zero you are losing, however healthy your stone count looks.
The practical version: in the placing phase, do not just build mills — take the points that will give your stones somewhere to go later. A stone on a four-way junction has twice the freedom of one in a corner, and the calculator scores it accordingly.
The double mill, and why it ends games
The strongest formation in the game is two mills sharing a single sliding stone. Move it one way and the first mill closes; move it back and the second closes. Every single turn you complete a mill, and every single turn your opponent loses a stone.
The calculator picks this out immediately. From the position above it ranks
d6-d7 first of eleven legal moves at every depth it searches, and following
the line through shows why: Black plays d6-d7xf4, White’s best reply is
a1-d1, and Black simply slides back with d7-d6xd1 — closing
a second mill and taking a second stone. White has gone from six stones to four without
ever getting a turn that improves anything.
This is the pattern to build toward, and the pattern to prevent. If you can occupy either of the two shuttle points before your opponent sets it up, the whole mechanism collapses. The calculator will find these formations several moves out, which is usually where they are still stoppable.
A caveat the tool will show you. A double mill is not automatically winning. If your opponent already holds a mill of their own, or if taking their stones drops them to three — where they may fly to any empty point — the calculator will sometimes prefer a quiet move instead. That is worth knowing rather than hiding: grinding an opponent down to three stones hands them the freest movement in the game.
The board, and how moves are written
Only 24 points are playable, on three concentric squares joined at the midpoints of their
sides. Points are named by column a–g and row
1–7, so a7 is the top-left corner and
g1 the bottom-right.
Moves are written the way the calculator reports them:
d6— place a stone on d6 (placing phase).d6-d7— slide the stone on d6 to d7.d6-d7xa4— slide d6 to d7, closing a mill, and take the enemy stone on a4.
Which stone you are allowed to take
When you close a mill you remove one enemy stone, but not any enemy stone. A stone that is part of a completed mill is protected for as long as your opponent has any stone outside one. Only when every enemy stone sits in a mill does that protection lapse.
The calculator applies this automatically, which is why closing a mill often produces several entries in the ranked list — one per stone you are permitted to take. They frequently score very differently, and choosing the wrong one is a common way to throw away a won position.
What the calculator counts
| Factor | Per unit | Notes |
|---|---|---|
| Stone advantage | 120 | Stones on the board plus stones still in hand. |
| Completed mills | 60 | Each three-in-a-row currently closed. |
| Potential mills | 25 | Two of three with the third point still empty. |
| Mobility | 8 | Per available move — counted only once both players have finished placing. |
| Junctions | 4 | Per connection. A four-way point scores 16, a corner 8. |
| Win or loss | 10,000 | Reduced below three stones, or no legal move. |
Mobility is deliberately switched off during the placing phase, because while stones are still being placed every empty point is available to both players and the number says nothing useful. It switches on the moment the last stone is placed — which is often the moment a position that looked comfortable turns out not to be.
How this calculator works
It is the engine from the playable game, given more time and asked to show every option rather than pick one.
- Search: minimax with alpha–beta pruning across all three phases, including the switch to flying when a player drops to three stones.
- Move ordering: mill-closing moves are examined first, since they are the most forcing and cause the most cutoffs.
- Iterative deepening against a time budget, keeping the deepest search that actually finished. Fast, Standard and Deep allow roughly 1, 3 and 7 seconds.
- Faster wins rank higher: a forced win carries the remaining depth in its score, so a win in two moves outranks the same win in six.
Where it is weak
- The placing phase is the hardest part for it. With up to 24 points available and a removal choice on top, the tree is very wide, so it cannot search as deep there as it can in the endgame. Treat opening suggestions as reasonable rather than authoritative.
- Nine Men’s Morris is a solved game — with perfect play by both sides it is a draw. This calculator does not consult that solution; it searches and evaluates like any other engine, so it can be out-argued by a database.
- No repetition detection. It judges the position in front of it and has no record of how you got there, so it cannot spot a threefold repetition or claim a draw.
- “Best” means best under the table above, to the depth reached — which is why the depth is shown with every result.
- Flying is generously rewarded. A player down to three stones can reach any empty point, which the mobility term scores highly. That is arguably too kind to the losing side, and it is why the calculator occasionally declines to take a third stone.
Rule variants this uses
Nine Men’s Morris has more rule variation between traditions than most classic games. This calculator uses the most widely played set:
- Flying is allowed. A player reduced to exactly three stones may move any stone to any empty point. Some traditions omit this, which makes the game much harder for the losing side.
- Mills are protected unless every enemy stone is in one.
- Being unable to move loses. Some house rules treat it as a draw or pass the turn instead; here it is a loss, which is standard.
- Closing two mills at once still removes only one stone.
The game is also known as Mills, Merels, Merrills, Nine Man Morris and Mühle in German. The twelve-stone variant, which adds the four diagonals, is a different game and is not covered here.
Play a full game
To play a game out rather than analyse one position, the free Nine Men’s Morris game uses this same engine at three difficulty levels or pass-and-play. There are matching analysers for Checkers and Reversi, and you may also like Gomoku and Dots and Boxes, or the rest of the free online puzzle games.