Tic Tac Toe
I wanted to recreate a TI85 calculator program I wrote in high school using javascript. This version is compatible with mobile phones, you can play against a friend or computer.
Computer strategy
Basic Tactics
First, take a winning move if it exists. Second, block the opponent if they can win next move. When the computer looks ahead, it prefers center, then corners, then edges.
Default Difficulty
Uses game tree to search outcomes with minimax and prunes dead ends. If you play a perfect game, computer always forces a draw.
Grade Schooler Difficulty
Same win and block checks, then a simple preference list with a bit of randomness (no minimax).