Skip to content

NgKhaiPhu/TicTacToe-with-AI-player

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

TicTacToe with AI player

This is my submission for lab assignment 2 of "Introduction to AI" class. This repository contains a perfect TicTacToe player that uses minimax alpha-beta pruning algorithm to make the optimal move every turn. A heuristic evaluation function is implemented in order to shorten up computational time.

Features

  • An undefeatable Tictactoe player that will always win or tie the game
  • A simple, clickable TicTacToe board built with pygame
  • 2 game modes: 3x3 and 5x5

Usage

Simply run the main script and follow the prompts to make your moves.

Requirements

  • pygame
  • numpy