1991 game with simulated annealing ai
Rodent's Revenge is a puzzle video game, created in 1991 by Christopher Lee Fraley. It was distributed as part of the Microsoft Entertainment Pack. The player takes on the role of a mouse, with the objective being to trap cats by pushing blocks around, whilst avoiding obstacles.
Simulated annealing is the AI technique used to enhance the Cat's ability to find the user Mouse. The concept is used to avoid crashing into walls when finding the minimum distance ( local optimum ) and find the global optimum of the mouse's location
Annealing or the slow reduction of temperature to remove internal stresses of test tubes is the fundamental process this technique is based on. Initial high temperatures are introduced then slowly decreased, reducing entropy or randomness of the variable as time goes on. But why introduce randomness in the first place? The randomness of the hot to cool process allows all faults in the glass to fill in the cracks. Metaphorically, simulated annealing is similar: slowly cool down to allow an initial variety of guesses and reach a globally optimum solution rather than a local one.
The probability of choosing the random solution is based on an unintuitive formula of e^((bestsolution−randomsolution)/currenttemperature). As we can see, the worse the random solution, the less likely we are to pick it though it is still possible. The temperature, which decreases over time according to the cooling rate ( thus called annealing), reduces the randomness as well.
In context of the game, the Cat is given all available spaces to choose from randomly to reach the mouse. When not choosing the random space, the distance-minimizing move is chosen. This distance is calculated by Manhattan distance (x,y distance) rather than Euclidean distance to improve accuracy. The initial high temperature is set and begins decreasing per move. Initially the cats are looking sporadically for the mouse, searching every crevice of the map; a few moves down the road when the mouse is surrounded, the low temperature allows for the cats to converge upon the mouse.