Skip to content

AI driven Tic-Tac-Toe game that runs on the Minimax algorithm with Alpha-Beta Pruning

Notifications You must be signed in to change notification settings

Tsu-HaoLiu/AI-tictactoe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

made-with-python made-with-pygame

Play a Tic-Tac-Toe game against an AI

AI driven Tic-Tac-Toe game that runs on the Minimax algorithm with Alpha-Beta Pruning

Description

Tic-tac-toe is a paper-and-pencil game for two players who take turns marking the spaces in a three-by-three grid with X or O. The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row is the winner. It is a solved game, with a forced draw assuming best play from both players.

In this project, you will be battling against an AI opponent! This is done by using the Minimax algorithm with Alpha-Beta Pruning to increase efficiency. With the Minimax algorithm, the Artificial Intelligent opponent will look at all possible moves and determine the most advantageous move to make.

Usage

pip3 install -r requirements.txt
python3 tictactoe.py

Releases