Following is a demo of the blocks_heuristic.pl program.
Explaination of my heuristic is in the source code as comments.
% c:/users/kchan2/ying/college work/suny oswego/fall 2021/csc 366/challenge_3/blocks_heuristic compiled 0.02 sec, 0 clauses ?- solve(Steps). Steps = [putOn(b3, b1), putOn(b2, b3), putOn(b5, b6), putOn(b4, b5), putOn(b7, b4), putOn(b8, b7)] .