JavaScript implementation of the AI algorithm for the game Chocolate Chomp