Tic-Tac-Toe
Play a friend or the computer. Hard mode uses minimax and never loses. Free, no sign-up, and your best score stays in this browser.
How to play
- Take turns placing X and O. Three in a row - across, down or diagonal - wins.
- Against the computer you are X. Rounds alternate who starts.
- Hard mode searches every possible game (minimax), so the best you can do is a draw.
Frequently asked questions
Can you beat the hard computer?
No. With perfect play tic-tac-toe is always a draw, and hard mode plays perfectly using the minimax algorithm.
What is minimax?
A search algorithm that tries every possible move and assumes the opponent plays their best reply, then picks the move with the best guaranteed outcome.
Built by a developer, for fun.I build web apps, automation and AI agents. These games are small, fast and run entirely in your browser.
Work with me →