I'm working on an experiment right now to train NPCs how to interact with
a textadventure world. My goal is to create a character that, while it
wouldn't necessarily solve any puzzles or win the game, would act
consistently within the game (i.e. would eat when it gets hungry, would
attack when attacked, etc..) The interesting twist, here, would be that
the NPC is neither random, nor is it pre-programmed to respond a given
way to a given action. Say that there is a room in which the exit to the
north is blocked by a large boulder, that the player cannot move. However,
we've seen a friendly looking troll wandering around the caves who
probably could. How does the player get the troll to help? Probably by
feeding him, and having him follow the player back to the cave, upon
which he is told "Troll, move boulder" and promptly does it.
Wonderful! I recently tried to do something similar in PROLOG, but finally
had to give in due to the limitations of my age-old compiler. Anyway, if
only a suitable language was found, I think it would be very interesting,
and probably a good thing for the player as well.
My scheme was, basically, as follows: The player needs to get through a
locked door. The player is too weak to bash it and there is no key. The
NPC troll, however, (yes, I had a troll, too) was strong enough, and was
so simply programmed that he would do anything told by someone he thought
to be a friend. To make friends with the troll, the player had to give him
something the troll thought valuable (in this case a club). There were a
few other NPCs and plot twists too.
All the NPCs (and the PC, for that matter) were loosely based on Shoham's
Agent Oriented Programming approach, but without the time aspect. Thus, my
NPCs (agents) could neither plan nor remember past events. They only had
their knowledge base which could be added to or retracted from.
/F