-
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. westaby.net/tic-tac-toe Computer strategy Basic TacticsFirst, 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 DifficultyUses game tree to search outcomes with minimax and prunes dead ends. If you play a perfect game, computer always forces a draw. Grade Schooler DifficultySame win and block checks, then a simple preference list with a bit of randomness (no minimax).