Skip to content

Latest commit

 

History

History
15 lines (12 loc) · 727 Bytes

README.md

File metadata and controls

15 lines (12 loc) · 727 Bytes

Tic Tac Toe with Minimax and Alpha-Beta Pruning

This is a simple console-based Tic Tac Toe game where the player competes against the computer. The computer uses the Minimax algorithm with Alpha-Beta pruning to decide its moves optimally.

Features

  • Player can choose to go first or second.
  • The computer makes optimal moves using the Minimax algorithm with Alpha-Beta pruning.
  • The game checks for wins, draws, and invalid moves.

How to Play

  1. Run the program.
  2. Choose whether you want to play first.
  3. Enter your move as a pair of numbers representing the row and column (both between 1 and 3).
  4. The computer will then make its move.
  5. The game will continue until there is a winner or the game is drawn.