Tic-tac-toe is a paper-and-pencil game for two players, X and O, who take turns marking the spaces in a 3×3 grid. The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row is the winner.
This algorithm is used in decision making and game theory. It is widely used in two player turn-based games such as Tic-Tac-Toe.
start playerX playerO
potential players: user, easy, medium, hard
exit
(1, 3) (2, 3) (3, 3)
(1, 2) (2, 2) (3, 2)
(1, 1) (2, 1) (3, 1)