/tic-tac-toe

Implementation of Tic-Tac-Toe with PyGame.

Primary LanguagePython

TIC-TAC-TOE

This is a Python implementation of the classic game Tic-Tac-Toe using PyGame. The AI uses the Minimax algorithm to search for the optimal next move within a search space that includes all possible outcomes subsequent to the current state of the game, except for the first move (if AI plays as X). Since Tic-Tac-Toe is a solved game (always ends in a draw if both players play optimally), if the AI has the first turn, it will place in one of the corners as it has been shown to be the optimal first move. To play the game, run game.py.