Re:Prolog Adventure Game
by ForOldHack on Monday April 21, 2025 @10:34PM
(#43758590)
If you wrote an adventure game in Prolog, you could write a client that would also solve the adventure.
[ Parent
| on HN ]
I can imagine it's easier to write that client in Prolog than the adventure.
Re:Prolog Adventure Game
by johnisgood on Tuesday April 22, 2025 @12:11PM
(#43763749)
Or write a program that generates the adventure game!
Re:Prolog Adventure Game
by ooopdddddd on Tuesday April 22, 2025 @01:44PM
(#43764585)
That's only if you are using pure predicates.
From a quick glance, the code makes liberal use of assert, retract, and the cut operator, so you can't write a query that solves the problem automatically.