Skip to content

xbdirisxk/tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

tic-tac-toe game

this is two player game (You vs robot).

the robot in this game is using an algorithm called Minimax, which making it unbeatable player.

Minimax is a recursive algorithm which is used in decision-making and Game theory. It provides an optimal move for the player assuming that opponent is also playing optimally.

  • In minmax algorithm two players play the game, one is called MAX and other is called MIN.
  • Both the players fight it as the opponent player gets the minimum benefit while they get the maximum benefit.
  • Both Players of the game are opponent of each other, where MAX will select the maximized value and MIN will select the minimized value.
  • 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 example

.
.
.

For More:

Wikipidia article

JavaTpoint: minimax algorithm in Artificial Intelligence

GeeksforGeeks: three parts on how to apply the algorithm in the tic-tac-toe game

About

tic-tac-toe game with minimax algorithm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published