[MUD-Dev] Magnetic Scrolls' magical parser

Ling K.L.Lo-94 at student.lut.ac.uk
Fri May 2 14:34:44 New Zealand Standard Time 1997


Hiya folks,

I'm kinda back again...

On Mon, 28 Apr 1997, Adam Wiggins wrote:

> On the other hand, NLP has come of interest to me of late as we've tried
> to make NPCs respond to communications from players.  Most muds have
> a simple keyword thing, ie:
> 
> You say, 'Could you cast fly on me, please?'
> >
> The mage guildmaster says, 'Get out of here!  Quit wasting our time and go
> buy a horse or something!'

Could use a regexp function on lines to trigger.  I feel regexp is too
complex for something as simple as that though.

> We've done some basic stuff with trying to break the sentence into major
> parts, which allows the mob scripts to easily determine insults, inquiries,
> statements, etc.  Still all very basic; I'm wondering if any of you have
> played with this at all?

Lemme see if I can get this right, DartMUD:

 * Break the sentance down into more strings (ie: fullstops, exclamation
   marks, etc, maybe commas).

 * Take first word and see if it is a verb stored in the hash tables.

 * If not, discard, repeat with second word, etc

 * If there's a match, grab the rules related to the verb and try and fit
   the rest of the sentance into the rule.  So give would have the rule:

      VERB OBJECT BEING

   Or sell would have:

      VERB BEING OBJECT  (eg: sell me your finest sword)
      VERB OBJECT        (eg: sell sword)

   Getting a bit muddled here (I'm in between fixing ultrasonics).

 * Also, there is a hash table of all the objects and a hash table of
   all the descriptions.  So sword is pretty obvious, 'finest' would
   be translated to best sword (either ornate, expensive, or lethal).

Um, that didn't make sense to me either.  Anyway, it doubles up as a
command parsing solution.  It's quite cute coz you can add stuff like 'hi'
for a verb.  Hmm, how about, instead of directly controlling the
character, players sort of talk to the characters and tell them what to
do?

  > hi
  Hello!
  > walk over to that girl on the bar, wet your lips and smile seductively
  I walk over to the bar, wet my lips and stutter "MY NAME'S CHAID!"

'K, not that chatty, how about:

  > walk to girl, wet lips and smile

Back to some DSPs.  Ciao

  |    Ling				"Mental slavery,
_O_O_  Freshwater fish since 1976	 set my spirit free"




More information about the MUD-Dev mailing list