Following is a demo of the imaginary_friends.pl program.
% c:/Users/kchan2/YING/College Work/SUNY Oswego/Fall 2021/CSC 366/COG366WorkSite/prolog/imaginary_friends.pl compiled 0.00 sec, 17 clauses ?- solve. joanne and the friend moose did the circus adventure. lou and the friend grizzly_bear did the train adventure. ralph and the friend seal did the rock_band adventure. winnie and the friend zebra did the spaceship adventure. true ; false.