Following is a demo of the maze_heuristic program.
(Following the left wall heuristic) ?- solveLeft(X). X = [[2, 1], [2, 2], [3, 2], [3, 3], [4, 3], [5, 3], [5, 2], [5|...], [...|...]|...] [write] X = [[2, 1], [2, 2], [3, 2], [3, 3], [4, 3], [5, 3], [5, 2], [5, 3], [5, 4], [5, 5], [5, 4], [5, 3], [4, 3], [3, 3], [3, 4], [3, 5], [2, 5], [2, 6]] . (Biased towards moving towards the exit) ?- solveClose(X). X = [[2, 1], [2, 2], [3, 2], [3, 3], [3, 4], [3, 5], [2, 5], [2, 6]] . (Movements literally picked randomly) ?- solveRandom(X). X = [[2, 1], [2, 2], [2, 1], [2, 2], [3, 2], [2, 2], [2, 1], [2, 2], [2, 1], [2, 2], [2, 1], [2, 2], [3, 2], [2, 2], [2, 1], [2, 2], [3, 2], [2, 2], [3, 2], [2, 2], [2, 1], [2, 2], [3, 2], [3, 3], [3, 4], [3, 3], [3, 2], [2, 2], [2, 1], [2, 2], [2, 1], [2, 2], [2, 1], [2, 2], [3, 2], [3, 3], [3, 4], [3, 3], [3, 4], [3, 3], [3, 4], [3, 5], [2, 5], [3, 5], [3, 4], [3, 3], [4, 3], [3, 3], [3, 4], [3, 3], [3, 2], [3, 3], [3, 2], [2, 2], [3, 2], [3, 3], [3, 4], [3, 5], [3, 4], [3, 3], [3, 4], [3, 3], [4, 3], [5, 3], [5, 4], [5, 3], [4, 3], [5, 3], [5, 4], [5, 5], [5, 4], [5, 3], [4, 3], [3, 3], [4, 3], [5, 3], [5, 4], [5, 3], [5, 4], [5, 5], [5, 4], [5, 3], [5, 2], [5, 3], [5, 4], [5, 3], [5, 2], [5, 3], [4, 3], [5, 3], [5, 4], [5, 3], [5, 4], [5, 3], [4, 3], [3, 3], [4, 3], [3, 3], [4, 3], [5, 3], [5, 4], [5, 3], [5, 2], [5, 3], [5, 4], [5, 5], [5, 4], [5, 5], [5, 4], [5, 5], [5, 4], [5, 3], [5, 4], [5, 3], [5, 2], [5, 3], [5, 4], [5, 5], [5, 4], [5, 5], [5, 4], [5, 3], [5, 4], [5, 5], [5, 4], [5, 5], [5, 4], [5, 3], [5, 4], [5, 5], [5, 4], [5, 3], [5, 2], [5, 3], [4, 3], [5, 3], [4, 3], [3, 3], [3, 4], [3, 5], [2, 5], [3, 5], [3, 4], [3, 3], [3, 4], [3, 5], [3, 4], [3, 3], [4, 3], [3, 3], [4, 3], [5, 3], [4, 3], [5, 3], [4, 3], [5, 3], [5, 2], [5, 3], [5, 4], [5, 5], [5, 4], [5, 3], [5, 4], [5, 3], [4, 3], [3, 3], [4, 3], [5, 3], [5, 2], [5, 3], [5, 4], [5, 3], [5, 4], [5, 5], [5, 4], [5, 3], [5, 2], [5, 3], [5, 2], [5, 3], [4, 3], [5, 3], [4, 3], [5, 3], [5, 4], [5, 5], [5, 4], [5, 5], [5, 4], [5, 5], [5, 4], [5, 3], [4, 3], [5, 3], [5, 4], [5, 5], [5, 4], [5, 3], [4, 3], [3, 3], [3, 2], [2, 2], [2, 1], [2, 2], [3, 2], [3, 3], [4, 3], [5, 3], [4, 3], [5, 3], [4, 3], [3, 3], [4, 3], [5, 3], [4, 3], [5, 3], [5, 2], [5, 3], [5, 2], [5, 3], [5, 2], [5, 3], [5, 4], [5, 5], [5, 4], [5, 5], [5, 4], [5, 3], [4, 3], [3, 3], [3, 2], [3, 3], [3, 4], [3, 5], [3, 4], [3, 5], [2, 5], [2, 6]] .