Reversi
Public domain classic
Flip the board. Outflank the computer.
At a glance
- Rules
- An 8 by 8 board starting with two discs each in the centre. You play the bright green discs and move first
- Difficulty
- Easy, Normal and Hard, each looking further ahead
- Controls
- Tap or click a square marked with a glowing dot. Esc pauses
- Passing
- Automatic when a side has no legal move
- Score
- The number of your discs on the board at the end
- Saves
- Your best score, in this browser only
- Cost
- Free, no account
How this Reversi plays
- A move must trap at least one straight line of the computer's discs, across, down or diagonal, between your new disc and one already yours. Every line it traps turns your colour at once, in all eight directions.
- Glowing dots mark every legal square on your turn. A square that traps nothing is not a move.
- When one side has no legal move, the turn passes back automatically and a note says who passed.
- When neither side can move, the discs are counted. More discs wins and equal counts are a draw. Your score is your own disc count.
- Discs take about a third of a second to turn over, and taps during that moment are ignored.
How the computer plays
- Easy judges only the board its own move leaves. Normal also looks at your best reply. Hard looks four moves past its own.
- It values squares from a fixed table: 120 for a corner, -45 for the square diagonally next to a corner, -25 for the edge squares next to a corner, and 20 for the edge squares two along from a corner. It adds 3 for every legal move it has more than you.
- Once 11 or fewer squares are empty it stops using the table and counts discs instead. A line that ends the game is judged by the final disc count.
- There is no randomness, and it waits about 0.65 seconds before each move.
In the rule test the three levels were given the same 40 positions. Easy and Normal picked different squares in 16, and Normal and Hard in 17. Against random legal moves, Easy won 15 of 20 games, Normal 20 of 20 and Hard all 5 it played.
Tips that follow from the rules
- Corners never flip. A disc can only be turned when it sits between two discs in a line, and a corner has no square beyond it, so a corner disc is yours for good.
- Know which squares it dislikes. The computer's table gives the three squares touching each corner negative values, so it counts holding one of them as a cost, for itself and for you.
- It does not chase discs early. Until the last few squares, the computer weighs its table and how many moves each side has, not how many discs each side holds.
- The last 11 squares are about the count. That is when the computer switches to counting discs, and from then on it plays for the final count.
For a game where pieces are captured and removed, try Checkers.
Known limits
- No undo.
- No keyboard play: use a mouse or a touch screen.
- Picking a new difficulty during a game deals a fresh board. Play Again keeps the level you chose.
- On a 390 by 844 screen the board squares are 41 pixels across, and the cookie banner sits over the Play button until it is answered.
- With a 1280 by 720 window, the game frame (848 pixels tall) is taller than the view, so scroll or use Fullscreen.
- A switch to another tab pauses play.
- If storage is blocked, your best score is not remembered.
How it was built and checked
- AI tool
- Codex
- First committed
- 2026-10-14, in a batch of 10 classic games
- Size
- One HTML file of 158 lines, no game libraries
- Rounds of changes
- 1 at build, from the build record. Changed once since, on 2026-11-11: Easy and Normal searched to the same depth and so played identically, so Easy now stops at its own move
- Checked at build
- A syntax check and two targeted rule checks: the 4 opening moves and the discs flipped by one of them. The build report lists browser rendering, touch devices and how hard the computer feels as not verified
- Checked since
- 2026-11-11: a new rule test (8,209 checks covering the start, flips in all eight directions, passing, wins, losses and draws, the three levels on 40 positions, 45 games against random play, and taps through the real pointer code), and an automated browser check of the local build at 1280 by 720 and 390 by 844. Each time it started a game, tapped a glowing square, waited for the reply, switched to Hard with the difficulty box and played six moves, set up a last move, won by tapping it, and started again
- Played on a phone
- 2026-11-11, a full game on a real phone before this page went live
Embed Reversi on your site
Free to embed. Please keep the credit link.
<div style="position:relative;padding-top:75%;max-width:640px"><iframe src="https://aivibecodedgames.com/games/reversi/" title="Reversi (free browser game)" style="position:absolute;inset:0;width:100%;height:100%;border:0" loading="lazy" allow="fullscreen" allowfullscreen></iframe></div> <p><a href="https://aivibecodedgames.com/play/reversi/">Play Reversi free</a> on AI Vibe Coded Games</p>
How it was vibe coded
ToolCodex
Rounds of changes: 1
First committed2026-10-14
The opening prompt
Make Reversi on an 8x8 board against a computer. Standard start position, legal-move highlights, flipping animation, automatic pass when a side has no move, game ends when neither can move, show final count. Computer uses minimax with a positional weight table, Easy and Hard toggle. Do not call it Othello anywhere.
What we learned
- The prompt asked for an Easy and Hard toggle. The build also offered Normal but gave it the same search depth as Easy, so two of the three settings played identically. A rule test that has each level choose on the same positions would have shown it.
Game controls
- Tap or click a highlighted square to place a disc
The game brief includes touch controls for phones.
Open the game on its own