Following is a demo of the friends_adventure.pl program.
Welcome to SWI-Prolog (threaded, 64 bits, version 8.2.4) SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software. Please run ?- license. for legal details. For online help and background, visit https://www.swi-prolog.org For built-in help, use ?- help(Topic). or ?- apropos(Word). % /Users/edimaekanem/Desktop/COG366Workfiles/prolog/friends_adventure.pl compiled 0.00 sec, 17 clauses ?- solve_adventure. joanne and moose went on circus adventure . lou and grizzly_bear went on train adventure . ralph and seal went on rock_band adventure . winnie and zebra went on spaceship adventure . true