The Mouse & Cheese ProgramThe mouse starts in the upper right corner of a 65 by 22 pen filled randomly with blocks. To move from his position, the mouse determines that it cannot go up or left (because of the walls) so it determines the next best move, which for this mouse is down. After the mouse moves, it re-evaluates its position, and decides on the next move that is best.
Most programming in AI is done using Lisp or Prologue. For this program however, since the example is basic, the documentation is in C++. The comments in the source code explain each procedure.