Artificial stupidity
Once again, we can end the project here. We now have a 2-player turn-based strategy game with a computer opponent. The human player can win and, with a little luck (and some rotten playing on the human's part), the computer player can win.
Try playing a few rounds of the worst Tic Tac Toe of your life. The computer player can win, but it's almost a challenge to play so badly that you lose to your artificially "intelligent" opponent.
Randomly choosing an empty Square isn't going to cut it. We need to make the computer opponent smarter. To do that, we have to sit down and study Tic Tac Toe until we understand what makes it ... ahem ... tick. We need to be experts at how to play, and win, Tic Tac Toe. The computer scientists who programmed Big Blue to defeat Kasparov had to go through the same process with a considerably more complicated game, studying the intricacies of chess so they could teach a computer how to strategize.
Have a go hero – solve Tic Tac Toe
Tic Tac Toe is...