Tic Tac Toe
Play Tic Tac Toe against an AI opponent online. Choose difficulty levels and track your wins. Classic strategy game for all ages.
Copied
Copy failed. Select the result and copy it manually.
Play, method and practical limits
Make a line of three equal marks to win. One-player mode controls X against O; two-player mode alternates marks on this device.
Limits and problems
Easy chooses randomly, medium mixes random choices and minimax, and hard uses minimax. Perfect play can end in a draw.
Occupied cells and ended boards ignore moves. Restarting or switching mode cancels the old AI turn, even if another O turn is waiting.
Game data
Session scores use sessionStorage under tttScores. If it is unavailable, the current board and scores remain usable in memory.
About Tic Tac Toe
Play Tic-Tac-Toe against the computer or a friend. Classic X and O game with multiple difficulty levels. Features score tracking and clean, responsive design.
Use Cases
Pro Tips
- Taking the center square first is often advantageous
- Watch for opportunities to block your opponent
- Corners are strategically valuable positions
- With perfect play, the game always ends in a draw
How to use
Choose to play vs Computer or vs Friend
Click on a square to place your mark
Get three in a row horizontally, vertically, or diagonally to win
The game tracks wins, losses, and draws
Choose one or two players, difficulty and which mark goes first. Select an empty cell to move.
Use New game to replace the board. Reset scores clears the tallies; each finished board counts once.
Frequently Asked Questions
On hard/impossible mode, the AI plays perfectly - you can only draw or lose.
Select "Two Players" mode and take turns on the same device.
Yes, wins, losses, and draws are tracked during your session.
Yes, you can choose who goes first before starting the game.
No. The choice selects the first mark. In one-player mode you still play X; O is the AI.