If you wrote an adventure game in Prolog, you could write a client that would also solve the adventure.
Prolog Adventure Game
11–20 of 29 posts
Re: Prolog Adventure Game
#12Very nice. I gave a lab assignment like this once! It's a great way to learn Prolog. https://github.com/agiacalone/cecs-342-lab-prolog
Re: Prolog Adventure Game
#13Re: Prolog Adventure Game
#14Re: Prolog Adventure Game
#15is it generated by LLM using prompt at https://github.com/stefanrodrigues2/Prolog-Adventure-game/bl... ?
[1] https://github.com/stefanrodrigues2/Prolog-Adventure-game/bl...
Re: Prolog Adventure Game
#16Re: Prolog Adventure Game
#17Re: Prolog Adventure Game
#18It suggested adding some riddle, for example:
path(castle, up, tower) :-
at(blueprint, holding),
(solved_riddle -> true ;
write('Answer the riddle first: What walks on four legs in the morning...?'), nl,
read(Answer),
(Answer = 'human' -> assert(solved_riddle) ;
write('Wrong! Try again.'), nl, fail)).Re: Prolog Adventure Game
#19Earlier quoted context omitted.
This one? [0] [0] https://amzi.com/AdventureInProlog/
Going to tell the Preface story tomorrow at work, I guess if your reading this you now know my HN handle ;) Not sure I will do the 'game' but that into was worth clicking the link.
No worries. A great philosopher once wrote:
"There is a theory which states that if ever anyone discovers exactly what your HN handle is for and why it is here, it will instantly disappear and be replaced by an HN handle even more bizarre and inexplicable."
Re: Prolog Adventure Game
#20...now that I look at this, it's 3 years old. I wonder how much better today's LLMs would fare?
[1] https://github.com/stefanrodrigues2/Prolog-Adventure-game/bl... - no, the routine does not "wait" on Windows, you'd need to put `get_char(_)` or something before `halt`.