Tic-Tac-Toe, a MINIMAX Demo
A brief look of how the MINIMAX algorithm works in a Tic-Tac-Toe game. In the first level, the enemy uses random choice as its strategy. In the second level, they switch to using the MINIMAX algorithm with a depth of 2. Note how the enemy thinks before they make a move in level 2.
Something key to notice is how hard the enemy is to beat even with a MINIMAX depth of 2, which would be very shallow foresight in any other game but is already powerful here.