1998Q3/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Re: (fwd) Re: command parsers: a modest proposa -->
<!--X-From-R13: Dvpuneq Pnegyr <76703.3042Npbzchfreir.pbz> -->
<!--X-Date: Thu, 9 Jul 1998 09:22:38 &#45;0700 -->
<!--X-Message-Id: 199807091222_MC2&#45;52A1&#45;7FDB#compuserve,com -->
<!--X-Content-Type: text/plain -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Re: (fwd) Re: command parsers: a modest proposa</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:76703.3042#compuserve,com">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
      text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">

  <font size="+4" color="#804040">
    <strong><em>MUD-Dev<br>mailing list archive</em></strong>
  </font>
      
<br>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00110.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00112.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00107.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00127.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00111">Author</A>
&nbsp;|&nbsp;<A HREF="#00111">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00111">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Re: (fwd) Re: command parsers: a modest proposa</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Subject</em>: [MUD-Dev] Re: (fwd) Re: command parsers: a modest proposa</LI>
<LI><em>From</em>: Richard Bartle &lt;<A HREF="mailto:76703.3042#compuserve,com">76703.3042#compuserve,com</A>&gt;</LI>
<LI><em>Date</em>: Thu, 9 Jul 1998 12:18:21 -0400</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
I've combined all my replies on this into one message, so people who have
no interest in the subject only have one to delete, not four.
 
Michael.Willey#abnamro,com wrote:
 &gt;I would disagree with that - As a player, I'd rather have the game
 &gt;abort a command than perform an unwanted command.
        Unfortunately, players have different ideas as to what is "unwanted".
If the game takes a reasonably systematic approach so that players can
predict what will happen when they issue a command, they can begin to
exploit it; at that point, it becomes a "wanted" command. The problems arise
if, in learning what a command does, dangerous situations can arise as a
result of intuition misalignment: what a newbie thinks a command "ought to
do" and what it actually does. If you were routinely losing objects or
points or whatever from believing that X would happen when actually Y
happens, that would dispirit you. In the case of DROP ROCK, though, the
side-effects of either dropping 1 or dropping all of them aren't usually
going to be damaging; players will understand what the parser is doing after
only a few uses of the command, and will modify their future uses
accordingly.
        Of course, the proof of the pudding is in the eating: although some
players probably would prefer to have to say DROP [A ] THE ] 1 ] EVERYTHING
I HAVE WHICH IS A] ROCK, in general they're happy to go along with how the
parser handles it. In 10 or more years of doing it the way I've described,
players have had no problems. I'm not saying they would necessarily have had
problems any other way, either, of course; what I am saying is that the way
I do it does work in practice.
 
Ross Nicoll &lt;rnicoll#calmar-mud,com&gt; wrote:
 &gt;Fine, until someone wants to drop more than one mouse (well, would you want
 &gt;to be wandering around with a load of mice? :) ).
        You mean you don't have a way to say "MICE is the plural of MOUSE"?
It ought to be trivially easy.
 
 &gt;You could have fun with gloves, too; unless you have right glove and left
 &gt;glove objects, you're likely to have a "pair of gloves" object.
        I don't have gloves in MUD2, but I have some shoes. There is indeed
a "left shoe" and a "right shoe", which can be separated; together they are
a "pair of shoes". You can DROP PAIR OF SHOES or DROP SHOES if you want to,
of course; in fact, DROP PAIR will work on its own (although it would drop
any othe robjects which were part of a pair, too).
 
 &gt;There's also the possibility of a plural that has an extra "es" instead of
 &gt;just "s" on the end, but I can't think of an word to use as an example.
        Er, so what? Generating plurals on the fly is OK - the rules of
English are fairly inclusive - but you ought to be able to override the
default, surely? It's just a vocabulary entry which points at the plural
form of an object, like a synonym.
 
Adam Wiggins &lt;adam#angel,com&gt; wrote:
 &gt;Are you aruging that there is a gain somewhere by using this method, or
 &gt;just that the actual implementation is irrelevant since it's the same to
 &gt;the player and doesn't signifigantly affect performance either way?
        From the player's point of view, you should be able to implement a
filter-while-searching algorithm such that it looks the same to them as a
filter-after-searching algorithm. After all, it's just as case of
pre-processing the parse tree prior to interpret it. 
        There is gain over simple pre-filtering parsers, though, in that if
you can bind nouns to sets of objects then you can manipulate those sets
prior to filtering. This shows up well with superlatives: DROP THE 3
HEAVIEST ROCKS OR STONES can take all the nearby rocks, take all the nearby
stones, form the union of the two sets, create an ordered set based on
weight, then return the set consisting of the first three elements. Now
you could implement that on a per-object basis, but it's not simple.
Building up per-object filters for things like DROP ALL OPEN BOXES WHICH
ARE NOT GOLD can get quite complicated. Not impossible, obviously, but
not how I'd do it.
 
 &gt;&gt;  &gt;In "drop rock", it seems MUD2 would drop all rocks.
 &gt;&gt;         That's right, it would.
 &gt;Egads!  How does one manipulate a single item?
        DROP 1 ROCK or DROP A ROCK would do. If you wanted a particular
rock, you'd either use some unique adjective combination (DROP LICHEN-COVERED
ROCK) or superlative (DROP THE SMALLEST ROCK) or, if there was no way to
discriminate by descriptions, you'd drop it by its individual name, DROP
ROCK12.
 
 &gt;% i
 &gt;You are carrying a bow and ten arrows.
 &gt;% nock arrow
 &gt;You attempt to nock ten arrows at once, but end up just dropping them all
 &gt;over the place.
        Well I execute my commands in series, not in parallel, so what would
happen is the first arrow would be nocked, and the rest would generate
error messages about the bow already being nocked. However, I don't print
such error messages if at least one command was successful, so all the
user would see is "You nock the arrow in the bow.". If they bow had an
arrow nocked when you tried the initial command, none would work so you
would get an error message (but not 10 copies of it).
 
 &gt;If "drop rock" drops all rocks, how do I drop only one, or two?  "drop one
 &gt;rock"?  This seems somewhat counterintuative.
        You'd DROP 1 ROCK or DROP 2 ROCKs.
        I don't find this counter-intuitive at all. If, in real life, you
had a handful of rocks and I wanted you to drop two of them, what I'd tell
you to do is DROP TWO ROCKS. I wouldn't tell you to DROP ROCK then tell you
to DROP ROCK again. I wouldn't even tell you to DROP A ROCK then DROP A
ROCK again: I'd just say DROP TWO ROCKS. What's counter-intuitive about it?
 
 &gt;&gt;  &gt;   - drop all of them
 &gt;&gt;  &gt;   - complain about ambiguity
 &gt;&gt;  &gt;   - drop some "random" rock
 &gt;&gt;  &gt;   - allow the user to choose
 &gt;I'd say that this choice is very specific to a given person.
        Well, it's more specific to the MUD than to the individual: in a
non-game context, complaining about ambiguity might be a valuable thing to
do (EFL teaching MUDs might do it, for example).
        Ideally, of course, which option is taken should be a decision which
the player ought to be able to set, and the programmer should write four
separate parsing routines. The issue then becomes what to make the default
for newbies.
 
 &gt;Personally I find the third option the best, mostly because it's what is
 &gt;found on most muds I've played.  In some cases it drops the top item, in
 &gt;some cases the last, but either way you get what you ask for, which is one
 &gt;rock.
        No, you didn't ask for one rock. GET ONE ROCK would ask for one
rock. GET ROCK genuinely is ambiguous.
 
 &gt;In most cases, if you have a big pile of something that all answers
 &gt;to the same keyword, they are all the same anyways and you don't care
 &gt;which one you get (in the case of the arrows, above, for example).
        My players use GET TREASURE so often it's abbreviatable to a single
command, GT. If they enter a room with 3 pieces of treasure, they just want
it all; they don't want to type G ALL T or G T... (the dots repeat commands
in MUD2). If there was some they didn't want, they'd either name the other
stuff specifically or exclude the one they didn't want as in G T X AMULET.
 
 &gt;Commonly this is handled as:
 &gt;% get rock
 &gt;You get a rock.
        Well, like I said, it's up to you how you do it. I happen to prefer
this to get all the rocks, but it's not like it's a biggie. I'm quite happy
for everyone else's MUDs to take a one-at-a-time approach.
 
 &gt;% get ten rocks
 &gt;You get ten rocks.
 &gt;% get all rocks
 &gt;You get twenty rocks.
        MUD2 does this the same way.
 
 &gt;% drop third rock
 &gt;You drop the third rock.
        I don't handle this in MUD2, partly because your inventory is not
necessarily displayed the way it's actually stored, so I'd have to work out
what people THOUGHT was their third rock prior to dropping it.
 
 &gt;This becomes more and more useful as more adjectives come in: if you're
 &gt;sorting through a huge pile of swords, all of which have slightly varying
 &gt;names like "a long thin blade made of silver" or "a long thin blade made
 &gt;of silver and etched with runes" or "a thin, single-edge blade" and you
 &gt;accidentaly grab the wrong one, you can always assume that "drop blade" or
 &gt;"drop sword" will rectify your mistake, instead of re-typing all the
 &gt;adjectives or recalling them from a command history (which is not always
 &gt;availible, anyways).
        Of course, you could just use pronouns...
 
 &gt;% look
 &gt;You are in a room containing yourself, Bubba the Troll, and a hundreds of
 &gt;swords.
 &gt;%
 &gt;Bubba drops his sword.
 &gt;% get sword
 &gt;You get the sword.
        GET IT
        You pick up the sword.
 
 &gt;ACK!  Surely you must have a method or specifying just one?
        Yes, you type KILL A RAT, or KILL THE BIGGEST RAT or KILL THE
MOST INJURED RAT or whatever. If you've switched on object-naming, you can
KILL RAT7 if you really want.
 
 &gt;Some folks on the list prefer the pronoun notation:
        I prefer it because sometime you can't tell whether a verb is
meant to be transitive or not.
        DROP SWORD
        You drop the sword.
        LOOK
        The sword is long and sharp and covered in blood.
        NO YOU DUMB MACHINE I MEANT LOOK, YOU KNOW, LIKE LOOK AROUND!
        Of course, you won't get this problem quite as much if you have a
system where verbs have to be specific to objects, so LOOK wouldn't work on
a sword, only EXAMINE would.
 
Chris Gray &lt;cg#ami-cg,GraySage.Edmonton.AB.CA&gt; wrote:
 
 &gt;OK. To clarify, however, I should say that what I meant for the fourth
 &gt;choice is that the user could set the policy for themselves, choosing
 &gt;once among the other alternatives.
        Oh, I thought you meant enumerating the possible objects and getting
them to select which one. In that case, this is another option which should
be available.
 
 &gt;Hmm. I could get used to that! (My current scenario happens to have
 &gt;a room that comes equipped with a lot of rats, which aren't really
 &gt;dangerous. Typing only one command to attack all of them would be handy!)
        KILL ALL RATS should work?
 
 &gt;Sounds similar again. My server is now in C (initially in my own
 &gt;language called "Draco"), and supports an internal language which the
 &gt;scenario is written in. The server supplies a bunch of "builtin"
 &gt;functions to help in parsing, however.
        I have a MUDDLE-to-C compiler written, which takes my MUDDLE
world definition and translates it into native C. I haven't got around to
writing the run-time system yet, though.
 
 &gt;&gt; &gt;Are there in fact possibilities of adding to the vocabulary at run time?
 &gt;&gt;        Yes, there are.
 &gt;How does that work? Can normal players do it, or is it only available
 &gt;to administrators?
        Well there's a SYN command, short for SYNONYM:
        Flrxptl has just arrived.
        SYN FLRXPTL AS "JOE"
        JOE HI! HOW's TRICKS?
        FLRXPTL TELLS YOU "SO-SO..."
        I also allow the creation of objects under certain controlled
circumstances, and these will have names which are added to the vocabulary.
 
 &gt;Do you have any kind of human algorithm, etc. that allowed you to decide
 &gt;what abbreviations to use? Similar for handing misspellings?
        Well writing anything which isn't understood to a log file catches
most of them.
 
 &gt;I can add/remove any kind of vocabulary at run-time, simply because the
 &gt;dictionary stuff is all created and manipulated by "builtin" functions
 &gt;which any player who has a "wizard" character can access.
        Yes, I can do that. A dictionary is just a mapping between words
(modulated by their parts of speech) and objects in the database (where
"object" includes things like functions and commands, as well as normal
pick-it-up objects).
 
                Richard


</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<ul compact><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><A NAME="00127" HREF="msg00127.html">[MUD-Dev] Re: (fwd) Re: command parsers: a modest proposa</A></strong>
<ul compact><li><em>From:</em> "Adam J. Thornton" &lt;adam#phoenix,Princeton.EDU&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00110.html">[MUD-Dev] Re: An Introduction</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00112.html">[MUD-Dev] Re: An Introduction</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00107.html">[MUD-Dev] Re: (fwd) Re: command parsers: a modest proposa</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00127.html">[MUD-Dev] Re: (fwd) Re: command parsers: a modest proposa</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00111"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00111"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><strong><A NAME="00082" HREF="msg00082.html">[MUD-Dev] Re: (fwd) Re: command parsers: a modest proposa</A></strong>, 
Michael.Willey <a href="mailto:Michael.Willey#abnamro,com">Michael.Willey#abnamro,com</a>, Wed 08 Jul 1998, 16:15 GMT
<UL>
<LI><strong><A NAME="00084" HREF="msg00084.html">[MUD-Dev] Re: (fwd) Re: command parsers: a modest proposa</A></strong>, 
Ross Nicoll <a href="mailto:rnicoll#calmar-mud,com">rnicoll#calmar-mud,com</a>, Wed 08 Jul 1998, 17:35 GMT
</LI>
<LI><strong><A NAME="00086" HREF="msg00086.html">[MUD-Dev] Re: (fwd) Re: command parsers: a modest proposa</A></strong>, 
Adam Wiggins <a href="mailto:adam#angel,com">adam#angel,com</a>, Wed 08 Jul 1998, 18:13 GMT
<UL>
<LI><strong><A NAME="00107" HREF="msg00107.html">[MUD-Dev] Re: (fwd) Re: command parsers: a modest proposa</A></strong>, 
Ling <a href="mailto:K.L.Lo-94#student,lboro.ac.uk">K.L.Lo-94#student,lboro.ac.uk</a>, Thu 09 Jul 1998, 13:44 GMT
</LI>
</UL>
</LI>
</UL>
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00111" HREF="msg00111.html">[MUD-Dev] Re: (fwd) Re: command parsers: a modest proposa</A></strong>, 
Richard Bartle <a href="mailto:76703.3042#compuserve,com">76703.3042#compuserve,com</a>, Thu 09 Jul 1998, 16:22 GMT
<UL>
<LI><strong><A NAME="00127" HREF="msg00127.html">[MUD-Dev] Re: (fwd) Re: command parsers: a modest proposa</A></strong>, 
Adam J. Thornton <a href="mailto:adam#phoenix,Princeton.EDU">adam#phoenix,Princeton.EDU</a>, Thu 09 Jul 1998, 20:38 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00135" HREF="msg00135.html">[MUD-Dev] Re: (fwd) Re: command parsers: a modest proposa</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Fri 10 Jul 1998, 01:58 GMT
</LI>
<LI><strong><A NAME="00146" HREF="msg00146.html">[MUD-Dev] Re: (fwd) Re: command parsers: a modest proposa</A></strong>, 
Richard Bartle <a href="mailto:76703.3042#compuserve,com">76703.3042#compuserve,com</a>, Fri 10 Jul 1998, 11:12 GMT
</LI>
<LI><strong><A NAME="00174" HREF="msg00174.html">[MUD-Dev] Re: (fwd) Re: command parsers: a modest proposa</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sat 11 Jul 1998, 22:35 GMT
</LI>
</UL>
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>