Newsgroups: rec.arts.int-fiction
Path: gmd.de!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!gatech!newsxfer.itd.umich.edu!gumby!yale!yale.edu!noc.near.net!transfer.stratus.com!jjmhome!schunix!sonix
From: sonix@schunix.dmc.com (Duane Morin)
Subject: NPC brains
Message-ID: <1994Mar5.232226.17139@schunix.dmc.com>
Organization: SCHUNIX Public Access Unix for Worcester County, MA, USA
Date: Sat, 5 Mar 94 23:22:26 GMT
Lines: 59

Ok, as many may have guessed by my recent plethora of postings, I know
very little about IF state of the art.  Heck, all I really know is a bit
here and there about natural language, and some basic AI.  IF intrigues
me because it seems like as good a place as any to explore both of these
topics without worrying about "ultra cool 256color super vga graphics".
(I discovered with much wonder that a personal quest of mine, to develop
realistic personae for "virtual worlds" rather than dealing with the
graphic engine, already exists, namely "Oz."  Neat.)

Anyway.  Instead of making statements now, let me ask a question.  I 
think it would be neat to have NPCs have a sort of knowledge frame of
their own, and perhaps some motivation/goals of some sort.  Is this
standard for NPCs?  For example:

You are in a large cave.  There is a troll here.  There is a bunny rabbit
here.

The troll comes over to you and says, "Me hungry."

>Tell troll, "Rabbit is food."

The troll thinks for a moment.  The troll grabs the rabbit and eats it.

...

Now, internally, the troll character would have a "need" somehow defined
as hungry.  The statement "rabbit is food" goes into his knowledge frame
as  is(rabbit, food) or something like dat.  Having gained new knowledge,
he then processes some internal script like:
	If hungry()
  	 { find_food(); get_food(); eat_food(); }

And find_food would same something like:
 For all objects available(X)
  if is(X, food) return X;

And so on.  Sure, there'd be a bunch of different cases that the author
would have to think up.  But there could also be a pool of public knowledege
that all characters could have without having been told, which could 
possibly carry over from game to game.

Keeping it simple, one could make up several personalities:
	random dwarf - wanders around, looking for items of value.  Prefers
		gold.
	random gnome - collects shiny things
	ogre - breaks breakable things

and so on.  I think it'd be kinda fun having to grab up objects out of 
an ogres way before he smashed them.  Or, maybe even setting something 
up to lure the ogre into a room to smash a chest that I don't have a key
to.

So, someone tell me.  Do NPCs already do this?  Can they?  Will they ever
be able to?  Note, I DONT mean setting up special cases for every NPC,
I'm talking about giving them a little knowledge, and a script, and 
letting them do whatever they want.

Duane

