/tictactoe

Minimax algorithm

Primary LanguageJavaScriptMIT LicenseMIT

TicTacToe

A simple implementation of Minimax algorithm for getting the best possible move in Tic Tac Toe.

View Demo at

TicTacToe

Description

From Wikipedia:MiniMax

Minimax (sometimes MinMax or MM[1]) is a decision rule used in decision theory, game theory, statistics and philosophy for minimizing the possible loss for a worst case (maximum loss) scenario. Originally formulated for two-player zero-sum game theory, covering both the cases where players take alternate moves and those where they make simultaneous moves, it has also been extended to more complex games and to general decision making in the presence of uncertainty.

XKCD

Relevant XKCD article -> Tic-Tac-Toe