Tic-Tac-Toe

Classic strategy in a clean browser board.
AI and two-player modes

Game Settings

Game Board
Current player: ❌

❌
X Player
0
🤝
Draws
0
⭕
AI Player
0

How to Play

Rules

Players take turns placing X and O on empty cells.
Create a straight line before your opponent does.
The line length adapts to the selected board size.

Features

Multiple board sizes for quick or deeper matches.
AI opponent for solo practice.
Score tracking for ongoing local play.
Game Guide

Tic-Tac-Toe Guide, Rules, and Tips

Tic-Tac-Toe is the classic game of X and O: take turns marking cells and be the first to complete a line. Besides the traditional 3×3 grid, this version offers 5×5 and 7×7 boards for longer, more strategic matches, with both an AI opponent and a two-player mode.

How to Play

  • Players alternate placing their mark (X or O) in an empty cell.
  • Complete a row, column, or diagonal of your marks to win; on larger boards the required line length adapts to the board size.
  • If every cell is filled and nobody has a line, the game is a draw.
  • In AI mode you can choose whether you or the computer moves first.

Strategy and Tips

  • On 3×3, take the center or a corner with your first move.
  • Always block your opponent’s line before extending your own unless you can win immediately.
  • Create forks: one move that threatens two lines at once guarantees a win.
  • On 5×5 and 7×7 boards, build in the middle where lines have room to grow.

Controls

MouseTouch

Click or tap an empty cell to place your mark. Pick the board size and choose Play vs AI or Two Players before starting.

Background

Three-in-a-row games date back to ancient Egypt and Rome. On a 3×3 board, perfect play from both sides always ends in a draw, which makes it a classic first example in game theory and computer science.

Frequently Asked Questions

Can Tic-Tac-Toe be won every time?

Not against a perfect opponent. On a 3×3 board, correct play by both sides always leads to a draw, so the goal is to never lose.

What board sizes are available?

You can play the classic 3×3 board, an extended 5×5 board, or a large 7×7 board.

Can two people play on one device?

Yes. Choose Two Players mode and take turns on the same screen.