Trained AI
How to use 5 in a row AI
The board is fixed at 9 columns by 7 rows. Red always moves first.
Choose the AI side
Enable AI for Red, Yellow, both players, or neither player. Yellow is enabled by default.
Place a move
Click anywhere in a column. The piece falls into the lowest available row in that column.
Let the AI reply
When the next side is controlled by AI, it plays automatically. Use Play AI Move for a one-off AI move at any turn.
Correct the position
Undo takes back the latest turn. With one AI side enabled, it normally removes the human move and the AI reply together.
Winning
The first side to connect five pieces horizontally, vertically, or diagonally wins.
Saved positions
Turn on Use saved AI moves to replay moves this browser has already received for the same position and strength. Clear saved moves deletes them.
Where the AI runs
Moves and win predictions come from the trained AI on an online server. If the server can't be reached, a slower in-browser copy of the AI is downloaded and used instead.