Play free Reversi against the computer at three levels, or with a friend on the same screen. Legal moves are shown and passes happen automatically.
Solid 2
Ring 2
Your move (Solid)
Session You 0, Computer 0, Draws 0
Best win -
Wins 0
Place a disc so that at least one straight line of the other colour sits between it and one of your own discs; those discs flip. Small dots mark legal squares. Arrow keys move around the board, Enter or Space places a disc. If you cannot move, you pass automatically.
Easy picks any legal move at random. Medium takes a corner when one is available and otherwise the move that flips the most discs, with no look-ahead. Hard searches five moves ahead with alpha-beta pruning, scoring boards by square value (corners high, the squares next to corners low), how many corners each side holds, and how many moves each side has. It is a fixed search with no learning, so a careful player can beat it. Undo takes back your last move and the reply, 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.
Two colours of disc share an 8 x 8 board. Solid moves first. On your turn you place a disc on an empty square so that at least one straight line of the other colour sits between the new disc and one of your own. Every disc in those lines flips to your colour. Lines can run along a row, a column or either diagonal, and one move can flip several lines at once. Small dots mark the squares where you can play. If you have no legal move you pass, and the page tells you when that happens. The game ends when neither player can move, and the player with more discs on the board wins.
The board is a deep violet with a faint sky-coloured grid. The two sides are called Solid and Ring: Solid discs are sky blue, Ring discs are amber, and the colours are not the only cue, because Solid discs are plain and Ring discs have a ring in the middle. The last move has a tinted square, and the discs it flipped are briefly highlighted (as a static outline if your system asks for reduced motion).
Controls:
On the keyboard, arrow keys move around the board (Home and End jump to the ends of a row) and Enter or Space places a disc. Each square is announced with its row, column, contents and whether it is a legal move.
The page address carries your opponent, difficulty and side, so you can bookmark a setup.
The engine is a few hundred lines with no dependencies. For every square it precomputes the eight lines that run away from it to the edge. A move is legal when, along any of those lines, a run of the other colour is closed by one of your own discs. The same lookup gives the discs to flip.
The test suite pins the engine in several ways:
The computer comes in three levels:
The search is checked against a plain minimax with no pruning, which gives the same value, and, on a few positions with six squares left, a depth-8 search was matched against the exact best final margin. The Hard level itself searches five moves. Moves that tie for best are chosen between at random. In the test suite, over 10 seeded games with colours alternating, Hard won at least 9 against Easy and at least 9 against Medium, and the suite fails if a depth-5 move takes 1.5 seconds. The computer waits about 0.4 seconds before replying so you can follow its move, and replies at once if you have asked for reduced motion.
Nothing is uploaded and there is no account. Against the computer, your best winning margin and your win count for each difficulty are 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 (your wins, the computer’s, draws) lives only on the page and resets when you leave it.
Only finished games count. A game in which you used Undo is not counted against the computer, so the saved figures are not inflated.
Everything runs locally in your browser.
For informational purposes only. Not financial, medical, or legal advice. You are solely responsible for how you use these tools.