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:
The longer version, if you want to see some context:
[rant]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.[/rant]
Now meanwhile there are other tricky bits. For example:
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.