Skip to content

Simple search algorithm to find the best possible play at a game of tictactoe

Notifications You must be signed in to change notification settings

LuisDelmo/MiniMax_TicTactoe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe AI with Minimax by Delmond

This is a Tic-Tac-Toe AI developed as part of the CS50 AI course, implementing the Minimax algorithm for optimal gameplay.

Features

  • Unbeatable AI: Implements the Minimax algorithm to ensure optimal decisions in any given game state.
  • Interactive Gameplay: Allows you to play against the AI, experiencing dynamic, real-time decision-making.
  • Pygame: Built to with the pygame library.

Getting Started

Prerequisites

  • Python 3.x is required to run this AI.
  • Basic familiarity with terminal commands and navigating directories.

Installation

  1. Clone the repository:
    git clone https://github.com/LuisDelmo/MiniMax_TicTactoe.git
    cd tictactoe-minimax-ai
    
  2. Run the game:
    python tictactoe.py
    

How to Play

  • The game prompts you to make a move by a click on the screen.
  • Once your move is made, the AI will respond with its calculated move.

Minimax Algorithm

  • The Minimax algorithm is a decision rule for minimizing the possible loss while maximizing the potential gain. This AI evaluates each possible game state and picks moves that lead to a guaranteed win or draw.

About

Simple search algorithm to find the best possible play at a game of tictactoe

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages