The Error Function in Maze Learning