Reversi
Flip your opponent's discs on an 8×8 board, with three AI levels, undo and move hints.
FAQ
How do you win at Reversi?
When does a side have to pass?
What do the three levels change?
How many moves does Undo take back?
How to use
- Pick a level
Easy plays random legal moves, normal follows a position weight table, and hard runs a three ply search. Changing the level starts a fresh round at once.
- Place and flip
You play black and move first. Tap an empty square so your disc traps enemy discs in a straight line, and every trapped disc flips to your color.
- Watch for passes
A side with no legal move passes automatically and the status line says so. Two passes in a row or a full board ends the round, and the higher count wins.
- Undo and hints
The toggle above shows or hides the legal move markers. One undo removes both the AI reply and your last move, handing the turn back to you.
- Keyboard and touch
Move the cursor with the arrow keys and press Enter to place. Press H for hints, U to undo and N for a new game. On touch you simply tap the board.
About this tool
Reversi is played on an eight by eight board with black and white discs. The game starts with four discs crossed in the centre, and you play black, moving first. A move places one disc in an empty square and must trap at least one enemy disc in a straight line. Every trapped disc flips to your color, and a single move can flip discs in several directions at once. The round ends when the board fills or neither side can move, and the higher count wins. Disc counts swing hard in this game, and a position that looks lost can turn around in two moves.
This version pits you against a computer opponent across three levels. Easy picks a random legal square and suits a first game. Normal plays greedily on a position weight table, where corners score highest and the squares beside corners carry penalties. Hard searches three plies ahead with alpha-beta pruning and values mobility as well as position. The HUD shows both disc counts and the move counter, and a toggle marks every legal square. Your wins, draws and losses are kept in the browser. All computation runs on the page, with no network requests.
How it works
Reversi rewards mobility rather than disc count for most of the game. Every legal move you keep is a choice, while a side forced to flip often improves the opponent's structure. Corners are the only permanently safe squares on the board, and the fight for them shapes the middlegame. The squares adjacent to corners are the worst on the board, because they usually hand over the corner. Strong players plan the endgame around parity, entering each empty region so that they take the last move inside it. Under these rules a move that gives up discs can be the strongest one available.
The AI in this version is layered by difficulty. Easy picks legal squares at random and works well as a warm up. Normal reads a weight table that scores corners at one hundred and edge squares at ten, with corner adjacents at minus twenty. Two extra points are added per flipped disc. Hard runs a three ply negamax search with alpha-beta pruning, and its evaluation mixes positional weights with the mobility of both sides. Passes are treated as moves inside the search, so forced passes near the end are priced in. A node budget keeps replies fast on modest hardware.
When to use it
- A quick round
A game of Reversi takes five to ten minutes and the rules fit in one sentence. Nothing to install and no account needed, so it opens straight into play. Winning and losing both stay light, which makes it an easy way to reset between tasks.
- First strategy lessons
Flipping gives instant feedback, and children can see discs change color on the board. The easy level misses chances now and then, so young players win real games. When the win rate climbs, the normal level is waiting, and the corner lesson comes free.
- Watch a search think
Switch to the hard level and watch it avoid the squares beside corners while claiming edges. Compare its choices with the weight table and search in the source. It reads better than pseudocode and makes the ideas concrete for a beginner.
Tips & tricks
- Flip as few discs as you can in the opening; quiet moves keep your options open.
- Corners can never be flipped once taken, so wait patiently for a shot at one.
- Treat the squares next to corners as poison; playing there usually donates the corner.
- Count the moves your opponent has and try to leave them nothing but bad flips.
Things to watch
- Greedy flipping
New players grab the move that flips the most discs and hand the edge to the opponent. Disc count is a means, not a goal. Position and remaining options decide the middlegame, and a quiet move is often worth more than a big flip.
- Feeding the corner
The squares beside corners look harmless, but playing there often gives the corner away for free. Check the empty squares near all four corners before you commit to a move. When the risk is real, place your disc somewhere quiet and let the opponent take the bait first.
- Ignoring mobility
Having more moves than the opponent feels strong, yet every one of your flips improves their structure at the same time. Trim the opponent's legal moves in the middlegame and force them into bad flips. The win rate climbs once that habit sticks, because starved opponents must open the lines you actually want.