Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

  (email not shown publicly)
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Tuesday February 08, 2005
12:34 PM

AI Newsletter and playing games with Prolog

[ #23085 ]

Adrian turned me onto Dr. Dobb's AI Newsletter. It's great reading. For a bit of fun and to see how useful Prolog can be (and something that will eventually be in the examples/ directory of AI::Prolog), check out Adventure in Prolog (you'll have to scroll down past the Fortran and Inform sections.)

When writing a game, how easy is it to write code to let your character eat something in Prolog?

   respond(['You don''t have the ',Thing]).

   respond(['That ',Thing,' was good']).
   respond(['Three year olds don''t eat ',Thing]).
   respond(['You can''t eat a ',Thing]).

Not only is it easy, it even reads naturally. You see, Prolog is well suited for interactive fiction (IF) because it naturally deals with the relations between things and IF is all about the relations between things.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.