Author Topic: Object disambiguation & inference  (Read 3735 times)

0 Members and 1 Guest are viewing this topic.

Offline gumby

Object disambiguation & inference
« on: December 04, 2010, 10:54:07 AM »
Scenario 1:  There are multiple keys in the room/inventory.  When player types 'look at key', it would be nice for the game spit back 'Which key do you mean, the blue key or the red key?'.  I guess this could be handled with 3 said() statements, one for each of the specific objects, then a 'default' response at the end.  Bringing me to this...

Scenario 2:  There are two keys, but only one is in the room.  When player types 'look at key', it should just work, player should NOT have to qualify the statement with an adjective.

Once again, I'm thinking about pre-processing the said string & performing inference/disambiguation up front.  Any thoughts?

EDIT:
Scenario 3:  User inputs 'swing sword'  or 'attack with sword' & the game should be able to infer who is to be attacked (if there is only one animate/antagonist in the room, otherwise it asks for disambiguation)
« Last Edit: December 04, 2010, 11:04:40 AM by gumby »


In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline Collector

Re: Object disambiguation & inference
« Reply #1 on: December 04, 2010, 03:45:25 PM »
Could something be done with an array that gets populated when the room loads? If the array holds only one non null value the script would assume that no disambiguation is needed.
KQII Remake Pic

Offline gumby

Re: Object disambiguation & inference
« Reply #2 on: December 04, 2010, 05:21:54 PM »
Could something be done with an array that gets populated when the room loads? If the array holds only one non null value the script would assume that no disambiguation is needed.
Yeah, probably not when the room loads, but at parsing user input (I'm thinking that an object could be introduced/removed while in the a single room).  Keep track of possibly ambiguous objects (an array should be fine, if memory becomes an issue we could store them in a text resource - but how many ambiguous objects could there be in a game?) & if one is referenced at parse time, deal with it then.
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.064 seconds with 22 queries.