Following is a demo of the maze_mything program.
Welcome to SWI-Prolog (threaded, 64 bits, version 7.6.4) SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software. Please run ?- license. for legal details. For online help and background, visit http://www.swi-prolog.org For built-in help, use ?- help(Topic). or ?- apropos(Word). ?- solve(X, Y). The forward path is: [[2,1],[2,2],[3,2],[3,3],[3,4]]. The backward path is: [[2,6],[2,5],[3,5],[[3,4]]]. The intersection point is: [3,4]. The path from start to end is: [[2,1],[2,2],[3,2],[3,3],[3,4]][[3,5],[2,5],[2,6]] X = [[2, 1], [2, 2], [3, 2], [3, 3], [3, 4]], Y = [[2, 6], [2, 5], [3, 5], [[3, 4]]] .