Tic-tac-toe (also known as noughts and crosses or Xs and Os) 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 wins the game.
I wanted to create a simple program which highlighted basic principles of OOP and programming but also let someone who was building this project understand how a simple ai algortihm works in 2 player games.
Minimax is a recursive algorithm which is used to choose an optimal move for a player assuming that the opponent is also playing optimally. As its name suggests, its goal is to minimize the maximum loss (minimize the worst case scenario).