This Tic-Tac-Toe game is built with the Minimax Algorithm. The Minimax Algorithm is a decision-making algorithm used in two-player games, like Tic-Tac-Toe, to determine the best possible move for a player. You can learn more about the Minimax Algorithm here.
Try the game here: LINK