This is a great little extension that turns NPCs into Terminator-like goal seeking machines. The nice thing about it is that it's *reactive*, that is, when the environment changes the NPC adapts its goal path accordingly.
A year ago, I'd gotten so far as to get NPCs that would walk around a map along a goal-seeking route. I was pretty pleased with myself for that one, but also it was clear that the approach I'd used would not be expandable to non-spatial problems. And anyway it didn't know how to deal with stairs or such.
NPCs need to deal with practical matters, so I'm looking at RAP. Which is really nice.
However, I notice two problems:
NPCs can easily get stuck in loops, because they don't acknowledge failure. If you snatch an item away from an NPC just before he takes it, he just keeps trying to take it without realizing it's no longer there:
Quote:
Bathroom
A bathroom. Northwest to Kitchen.
There's a small cupboard.
Bob is standing here.
Bob opens the cupboard, revealing a bronze key.
>take key
Taken.
Bob cannot see that.
>z
Time passes...
Bob cannot see that.
and poor Bob just keeps looping
The longer version, if you want to see some context:
RAP TESTBED
Reactive Agent Planner ver. 1.2 testbed
Copyright (C) 1998 by Nate Cull
Tads-3 port and revision/extension (t3RAP) Copyright (c) 2002-2004 by Steve Breslin
Living Room
Living room. South to bedroom. North to kitchen.
Bob and Rupert are standing here.
>tell bob, put ball on table
You see no tell bob here.
>bob, put ball on table
Bob leaves to the north.
>n
Kitchen
Kitchen. South to living room. Southeast to Bathroom.
You see a kitchen table (on which is a big box) here.
Bob is standing here.
Bob leaves to the southeast.
>se
Bathroom
A bathroom. Northwest to Kitchen.
There's a small cupboard.
Bob is standing here.
Bob opens the cupboard, revealing a bronze key.
>take key
Taken.
Bob cannot see that.
>z
Time passes...
Bob cannot see that.
>z
Time passes...
Bob cannot see that.
>z
Time passes...
Bob cannot see that.
>w
You can’t go that way. The only obvious exit leads northwest, back to the kitchen.
Bob cannot see that.
>nw
Kitchen
Kitchen. South to living room. Southeast to Bathroom.
You see a kitchen table (on which is a big box) here.
>z
Time passes...
>s
Living Room
Living room. South to bedroom. North to kitchen.
Rupert is standing here.
>give key to rupert
Rupert does not appear interested.
>z
Time passes...
>z
Time passes...
>z
Time passes...
>z
Time passes...
>drop key
Dropped.
>z
Time passes...
Bob enters from the north.
>take key
Taken.
Bob cannot see that.
>z
Time passes...
Bob cannot see that.
>z
Time passes...
Bob cannot see that.
Now meanwhile there are other tricky bits. For example:
Quote:
>bob, go to rupert
Please try: go to (room).
Bob cannot see that.
>bob, kiss rupert
Rupert probably wouldn’t like that.
Bob cannot see that.
>bob, take rupert
Rupert probably wouldn’t like that.
>bob, put rupert on table
Rupert probably wouldn’t like that.
>drop key
Dropped.
Rupert probably wouldn’t like that.
>z
Time passes...
Rupert probably wouldn’t like that.
>z
Time passes...
Rupert probably wouldn’t like that.
>z
Time passes...
Rupert probably wouldn’t like that.
>bob, stop
The word “stop” is not necessary in this story.
(If this was an accidental misspelling, you can correct it by typing OOPS followed by the corrected word now. Any time the story points out an unknown word, you can correct a misspelling using OOPS as your next command.)
>bob, take key
Bob takes the bronze key.
>z
Time passes...
>z
Time passes...
>look
Living Room
Living room. South to bedroom. North to kitchen.
Rupert and Bob are standing here.
Ok, so the adoption of a new goal kills entirely an old goal (fine).
But clearly, failure has to be dealt with, in that:
a) The NPC has to be able to acknowledge failure as an outcome and stop doing the same ineffective thing over & over, and
b) Error reporting has to be adjusted so that it makes some kind of sense from the point of view of someone outside the head of the actor who attempted the action.
Also there are a few things that are supposed to be working that I haven't seen work. NPCs don't give or take objects like they're supposed to. It seems from the behavior that the problem here is that NPCs can't see player inventory, which defeats their ability to take items from you (and also to give them to you? -- perhaps because the "container" doesn't exist to their eyes?)
Is anyone here conversant with RAP? Any ideas?
Conrad.