Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Amogh-Prabhu/AI-in-TicTacToe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

The Unbeatable TicTacToe

Tic Tac Toe

๐Ÿ“„ Description

A TicTacToe game built in python using tkinter package for GUI. The AI bot in the game is implemented using the Minimax AI Algorithm. The AI searches through all the possibilities (forming a game tree) to find an optimal action. The Minimax Algorithm makes this game unbeatable!

๐Ÿ‘จโ€๐Ÿ’ป MiniMax Algorithm

The MiniMax algorithm is a recursive algorithm used in decision-making and game theory. It delivers an optimal move for the player, considering that the competitor is also playing optimally. This algorithm is widely used for game playing in Artificial Intelligence, such as chess, tic-tac-toe, and myriad double players games.

In this algorithm two players play the game, one is called MAX and other is called MIN. Both players try to increase the chances of its wining by assuming that the opponent player plays optimally. The terminal nodes of the game tree, where the game ends, are assigned an utility value, +1 if MAX wins, -1 if MIN wins, 0 if there is a draw.

The minimax algorithm performs a depth-first search algorithm for the exploration of the complete game tree. The minimax algorithm proceeds all the way down to the terminal node of the tree, then backtrack the tree as the recursion.


Minimax Game Tree


๐ŸŽฎ Game Play

Draw match Bot Wins You Win

๐Ÿ”— References

About

An AI bot that plays Tic-Tac-Toe.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages