Play tic-tac-toe against an AI. Easy mode picks random moves; hard mode uses minimax and is unbeatable — best you can do is a tie.
Hard mode uses the minimax algorithm — every possible future is considered, so the AI never loses. Try to force a tie!