In high school, my Artificial Intelligence course gave me an assignment: a two-player game around one chess piece, the knight, on a 4×4 board. One player is human, the other is the computer, and nobody may step on a square that either player has already visited. The computer had to choose its moves with the minimax algorithm. I first worked out all possible moves by hand, then built a working version and developed it in Ruby.