/tic-tac-toe-ai

Primary LanguagePythonMIT LicenseMIT

🎮 Tic Tac Toe AI 🤖

Welcome to the Tic Tac Toe AI project! This project utilizes the Minimax algorithm to create a challenging artificial intelligence for the classic Tic Tac Toe game.

🚀 Features

  • Minimax Algorithm: Implements the Minimax algorithm to determine the best move.
  • Player vs AI: Allows a human player to play against the AI.
  • Interactive Gameplay: Provides a simple and interactive command-line interface for gameplay.

🛠️ Setup

Prerequisites

  • Python (3.8 or higher)

Installation

  1. Clone this repository:
    git clone https://github.com/kedyjs/tic-tac-toe-ai

🎮 How to Play

  • The game is played on a grid that's 3 squares by 3 squares.
  • You are X, and the AI is O. Players take turns putting their marks in empty squares.
  • The first player to get 3 of their marks in a row (up, down, across, or diagonally) is the winner.
  • When all 9 squares are full, the game is over.

📖 Algorithm

This project uses the Minimax Algorithm which is a decision-making algorithm, used in two-player games like Tic Tac Toe. It computes the minimax decision from the current state, which will be used to determine the AI's move.