Following is a demo of the Blocks World: Heuristic Planning program.
% Definitely needed to add conditions for completing the program for whether or not the stack was complete. ?- solve(Steps). Steps = [putOn(b3, b1), putOn(b2, b3), putOn(b5, b6), putOn(b4, b5), putOn(b7, b4), putOn(b8, b7)]. True.