X-Newsreader: Geminisoft Pimmy 3.2 Eng - www.geminisoft.com
From: "John Colagioia" <JColagioia@csi.com>
Newsgroups: rec.arts.int-fiction
Subject: Re: Another worm for the NLP can...
Date: Tue, 09 Jul 2002 09:18:03 -0400
References: <Xns924645FEF5002joaomendesnetcabopt@194.65.14.150>
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: ool-182f30fa.dyn.optonline.net
X-Original-NNTP-Posting-Host: ool-182f30fa.dyn.optonline.net
Message-ID: <3d2ae2a2@excalibur.gbmtech.net>
X-Trace: excalibur.gbmtech.net 1026220706 ool-182f30fa.dyn.optonline.net (9 Jul 2002 09:18:26 -0400)
Organization: ProNet USA Inc.
Lines: 40
X-Authenticated-User: jnc
Path: news.duke.edu!newsgate.duke.edu!solaris.cc.vt.edu!news.vt.edu!image.surnet.ru!surnet.ru!newsfeed.media.kyoto-u.ac.jp!newsfeed.mesh.ad.jp!uunet!osa.uu.net!sea.uu.net!ash.uu.net!excalibur.gbmtech.net
Xref: news.duke.edu rec.arts.int-fiction:106016

Joao Mendes <public.email@anywhere.invalid> wrote:
[...]
>I'm talking about Prolog.

Quick rant, because I have places to be...

While, yes, you can write adventure games in Prolog, and
you'll even have some textual support for it:
        http://www.amzi.com/AdventureInProlog/advfrtop.htm
there are a couple of key problems.

First, and I don't want to offend anybody's sensibilities,
Prolog is kind of vile.  It is to rule-based programming
what C++ is to object-oriented programming.  It carries
lots of dogma, and acts too much like C or BASIC when it
would really matter (cuts, anybody?).  If you're planning
to take this route, consider a more modern language, like
Mercury or HOPE, which I hear has overcome many of the
major "disabilities" of Prolog.

Second, rule-based engines are typically slow, because
the runtime engine basically performs a depth-first
search on all possibilities, choosing the "closest
match" (except for Prolog, which optimizes, and then
lets you worry about things like the fact that
reordering your rules might cause a failure to match).

Finally, because of the rule-based nature of the
system, it's pretty hard to do anything *other* than
parsing.  In particular, you really don't have anything
like persistent data (objects, for example), so lots of
convoluted code is required to maintain the simplest
bit of your game universe.  If you don't believe this,
take chapter 7 of the aforementioned book as a good
example.  See if you can figure out how to add a
description to each room (that is only written the
first time you enter, or when the user types the
equivalent of "look")...

[...]
