Implemented the minimax algorithm for a tic-tac-toe game. Run the program by typing "python minimax.py" in the command line.
Shown below is the game in action. The computer is O and the player is X. The computer always goes first.
Here is a position where the computer beats the player. Because of the minimax algorithm, the computer will always play the best move. I challenge you to try and beat the AI, I can guarantee than you won't be able to. The best you can hope for is a tie.