Following is a demo of the imaginary friends 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). ?- % c:/Users/Profe/Dev/Prolog/imaginary_friends.pl compiled 0.00 sec, 17 clauses ?- solve. joanne and their imaginary friend, the moose, had an adventure involving a circus. lou and their imaginary friend, the grizzly bear, had an adventure involving a train. ralph and their imaginary friend, the seal, had an adventure involving a rock band. winnie and their imaginary friend, the zebra, had an adventure involving a spaceship. true .