Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe Minimax Algorithm

  • Overview This repository contains two Python scripts for a simple Tic-Tac-Toe game with AI using the Minimax algorithm. The minimax.py script defines a board class with methods for game mechanics and the Minimax algorithm. The runner.py script demonstrates the usage of the board class for playing Tic-Tac-Toe against the AI.

minimax.py The board class has methods for actions, game results, player determination, winner checking, terminal state detection, utility computation, and the Minimax algorithm.

runner.py This script demonstrates how to use the board class to play Tic-Tac-Toe against the AI, which makes optimal moves using the Minimax algorithm.

Usage

  • Run runner.py to play Tic-Tac-Toe against the AI.

  • The AI uses the Minimax algorithm to determine its moves, aiming for optimal gameplay.

Note: The AI assumes a perfect opponent, ensuring either a win or a draw.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages