 |
 |
 |
 |
 |
| Author |
Message |
raz
Joined: 13 May 2005 Posts: 11
|
Posted: Wed Aug 10, 2005 9:32 pm Post subject: Naming objects |
|
|
Consider this problem. There is a bottle in a room, but the builder foolishly wrote the object's long description to make the user think that the bottle had another name than it has. The user goes into frustration like this:
| Quote: |
You see a flask.
>GET THE FLASK
You do not see that here.
>GET THE FLASK ON THE FLOOR
You do not see that here.
>GET THE DAMN FLASK
etc. |
Anyway, here is my idea to alleviate this:
Object names would be stored in a tree-like fashion. Take this for example:
| Code: |
weapon
|
|
----------------------
| |
hammer sword
|
------------------
| |
long sword short sword
|
The names higher on the tree a "more general" while the names lower on the tree are "more specalized".
Each object would be assigned a name in the tree. Typically, the object would have one of the most specalized names (but it is not necessary). When the MUD looks for an object the user targetted, it would search each object's most specalized name as well as all of its "super" names. A match of any of the object's names would put it in a list of potentially matching candidates. If there is more than one candidate, the user is told that his command was ambiguous.
Anyway, what do you guys think of this? Would it solve the problem well? |
|
| Back to top |
|
 |
|
 |
 |
 |
 |
 |
 |
 |
 |
| Author |
Message |
Grem
Joined: 15 May 2005 Posts: 36 Location: Maryland
|
Posted: Wed Aug 10, 2005 9:49 pm Post subject: RE: |
|
|
Either that, or you could change your parsing system to something feasible and remove the 'Name' stat completely.
The 'name' stat has always been valueless in MUDs, what the hell is the point of it when you can simply parse the short description of the object?
'get flask' should work, the builder shouldnt have to specify a mystical 'name' when the short description is clearly the object's name. Come on man, step out of these terrible generalizations! |
|
| Back to top |
|
 |
|
 |
 |
 |
 |
 |
 |
 |
 |
| Author |
Message |
Kjartan
Joined: 13 May 2005 Posts: 110
|
Posted: Wed Aug 10, 2005 11:57 pm Post subject: |
|
|
It would also be nice if the parser realized "the flask" means "the flask you just told me about" or, if there is one, "the flask I was just talking about". "A flask" means that if you have multiple flasks, just pick one. I guess "flask" means "the flask" unless there's no match, in which case it means "a flask"... not sure about that one. At that point we have left english and wandered into mud-pidgin.
I'm not sure that the names tree is useful beyond one or at most two levels - while someone who said "weapon" could presumably be talking about the sword, in practice nobody would ever call it "weapon" when the game had clearly said "sword".
If you are going to parse the shorts, which does seem like a good idea, you need a good list of words that don't count. Articles, prepositions, etc. Also it seems like there's a problem if I have "the corpse of bob" and "the sword of bob", when I say "drop bob" I clearly mean the corpse but from the parsed shorts it's ambiguous. I guess that won't come up much.
Oh, another wish-list parser item: if I'm trying to drink something and I say "drink green", there is no ambiguity between a green potion and a green cloak because I sure didn't mean the cloak. |
|
| Back to top |
|
 |
|
 |
 |
 |
 |
 |
 |
 |
 |
| Author |
Message |
Daemo
Joined: 13 May 2005 Posts: 5 Location: Melbourne, Australia
|
Posted: Thu Aug 11, 2005 12:11 am Post subject: Re: RE: |
|
|
| Grem wrote: | | The 'name' stat has always been valueless in MUDs, what the hell is the point of it when you can simply parse the short description of the object? |
the name value is also used to ADD extra things you can call the object/mob.
eg. 'you see a filthy man sitting on the gutter'
his short desc is 'a filthy man' but the name value could be 'filthy man bum derro drunk'
so you can then type 'kick drunk' and it will kick the filthy man
lets say you are in the room where the holy grail is hidden.
you see lots of cups,
'an ordinary cup' can also be called 'challice cpu ordinary grail holy special' |
|
| Back to top |
|
 |
|
 |
 |
 |
 |
 |
 |
 |
 |
| Author |
Message |
Molly O'Hara
Joined: 11 May 2005 Posts: 99 Location: Sweden
|
Posted: Thu Aug 11, 2005 6:38 am Post subject: |
|
|
Why make a big code issue out of bad building?
If the alias list of the object had been flask bottle as it should have been, there would have been no problem.
If there were not so many imcompetent builders around, things would be much easier for the players. |
|
| Back to top |
|
 |
|
 |
 |
 |
 |
 |
 |
 |
 |
| Author |
Message |
Tyche
Joined: 13 May 2005 Posts: 176 Location: Ohio, USA
|
Posted: Thu Aug 11, 2005 7:01 am Post subject: Re: Naming objects |
|
|
You can accomplish it fairly easy in ColdC since such a tree of objects already exist. Something like...
| Code: |
new object $thing: $root;
var $thing keywords = [];
public method .keyword_list {
var kwords;
kwords = .keywords();
for a in (ancestors()) {
kwords += a.keyword_list;
}
return kwords;
}
|
Every object descendent from $thing would inherit the above method which returns an array of the objects keywords plus all it's ancestors keywords. |
|
| Back to top |
|
 |
|
 |
 |
 |
 |
 |
 |
 |
 |
| Author |
Message |
Tyche
Joined: 13 May 2005 Posts: 176 Location: Ohio, USA
|
Posted: Thu Aug 11, 2005 7:08 am Post subject: |
|
|
| Kjartan wrote: | It would also be nice if the parser realized "the flask" means "the flask you just told me about" or, if there is one, "the flask I was just talking about".
|
That's fairly easy to do. You just store the last item or person referenced in the player's environment.
object = $torch;
him = $player_john
her = $player_jane
it = $big_orc
Then you can do things like...
> say to jane "Hi"
You say to Jane, "Hi"
> say to her "How's it going?"
You ask Jane, "How's it going?"
The challenge is in self referential commands like...
> get the sword from the sack and sharpen it.
Sharpen what? The sack or the sword?  |
|
| Back to top |
|
 |
|
 |
 |
 |
 |
 |
 |
 |
 |
| Author |
Message |
KaVir

Joined: 11 May 2005 Posts: 565 Location: Munich
|
Posted: Thu Aug 11, 2005 7:27 am Post subject: |
|
|
| Grem wrote: | | The 'name' stat has always been valueless in MUDs, what the hell is the point of it when you can simply parse the short description of the object? |
Because then you can't use 'get sword' to pick up a longsword, or 'kill guard' to kill a cityguard - plus you end up parsing a lot of junk such as 'a' or 'the' (or placing extra checks to try and get rid of them all). It's much easier to just keep track of keywords separately.
Raz's solution seems reasonable, as long as the tree entries are kept generic - you wouldn't want to inherit keywords for material types, for example. A couple of other things to consider:
Plural keywords: Could you use 'knives' as a keyword for picking up multiple instances of a knife?
Keyword Priorities: Is it worth assigning different priorities to each keyword? If I type 'look' and see 'a scimitar' followed by 'a broken sword', should 'get sword' pick up the former or the latter? I had one or two players complaining that they had trouble organising their kris, stilettos and daggers, because all used the keyword 'dagger'.
Last edited by KaVir on Thu Aug 11, 2005 7:31 am; edited 1 time in total |
|
| Back to top |
|
 |
|
 |
 |
 |
 |
 |
 |
 |
 |
| Author |
Message |
KaVir

Joined: 11 May 2005 Posts: 565 Location: Munich
|
Posted: Thu Aug 11, 2005 7:31 am Post subject: |
|
|
| Tyche wrote: | The challenge is in self referential commands like...
> get the sword from the sack and sharpen it.
Sharpen what? The sack or the sword? |
My old mud had a parser a bit like that, and I ran into the exact same problem - 'get the bread from my backpack and eat it' resulted in attempting to eat the backpack. It was okay if I mixed plural and singular item types though...you could 'get the trousers from my backpack and wear them', for example.
However perhaps Kjartan's idea about relating actions to items could solve the problem. For example the mud could check 'it' against all possible objects refered to, to see which is the most suitable. You can sharpen a sword but not a sack, so assume 'it' refers to the sword. Equally you can eat bread but not a backpack, so assume 'it' refers to the bread. You could even take it a step further and assign different items different priorities for different actions, relative to the person performing the command - so 'get the worm from the apple and eat it' could have different results depending on whether the person performing the command was a human or a birdman. |
|
| Back to top |
|
 |
|
 |
 |
 |
 |
 |
 |
 |
 |
| Author |
Message |
Lindahl
Joined: 29 May 2005 Posts: 56
|
Posted: Thu Aug 11, 2005 2:46 pm Post subject: |
|
|
| Tyche wrote: | The challenge is in self referential commands like...
> get the sword from the sack and sharpen it.
Sharpen what? The sack or the sword? |
Isn't it as simple as applying the action to the direct object as opposed to the prepositional object? Seems kinda obvious to me how a parser could exhibit the right behavior in this instance... or is there a counter-example to this approach? |
|
| Back to top |
|
 |
|
 |
 |
 |
 |
 |
 |
 |
 |
| Author |
Message |
shasarak

Joined: 29 Jun 2005 Posts: 134 Location: Emily's Shop
|
Posted: Thu Aug 11, 2005 5:09 pm Post subject: |
|
|
| Lindahl wrote: | | Tyche wrote: | The challenge is in self referential commands like...
> get the sword from the sack and sharpen it.
Sharpen what? The sack or the sword? |
Isn't it as simple as applying the action to the direct object as opposed to the prepositional object? |
No.
"Remove stone from cherry then eat it". It's probably the cherry you want to eat, not the stone. But, if it happened to be a magical seed inside a mundane cherry, maybe not.
There are all sorts of problems with fancy parsers. Consider "put the key in the hat on the treestump". That could mean that there's a hat sitting on a treestump into which you wish to place a key, or it could mean that there's a key already in a hat, and that you wish to remove it from the hat and place it on the treestump instead. For a parser to be able to handle that kind of instruction it needs to check context - is there a hat on a treestump? Is there a hat with a key in it? Etc. |
|
| Back to top |
|
 |
|
 |
 |
 |
 |
 |
 |
 |
 |
| Author |
Message |
Tyche
Joined: 13 May 2005 Posts: 176 Location: Ohio, USA
|
Posted: Thu Aug 11, 2005 6:00 pm Post subject: |
|
|
| Lindahl wrote: | | Tyche wrote: | The challenge is in self referential commands like...
> get the sword from the sack and sharpen it.
Sharpen what? The sack or the sword? |
Isn't it as simple as applying the action to the direct object as opposed to the prepositional object? Seems kinda obvious to me how a parser could exhibit the right behavior in this instance... or is there a counter-example to this approach? |
Sure using the same example...
> get the sword from the sack and close it.
Or more ambiguously...
> get the sword from sack and drop it. |
|
| Back to top |
|
 |
|
 |
 |
 |
 |
 |
 |
 |
 |
| Author |
Message |
Lindahl
Joined: 29 May 2005 Posts: 56
|
Posted: Fri Aug 12, 2005 11:20 am Post subject: |
|
|
| Tyche wrote: | | Lindahl wrote: | | Tyche wrote: | The challenge is in self referential commands like...
> get the sword from the sack and sharpen it.
Sharpen what? The sack or the sword? |
Isn't it as simple as applying the action to the direct object as opposed to the prepositional object? Seems kinda obvious to me how a parser could exhibit the right behavior in this instance... or is there a counter-example to this approach? |
Sure using the same example...
> get the sword from the sack and close it.
Or more ambiguously...
> get the sword from sack and drop it. |
I knew there was a counter-example, just couldn't come up with it for some reason, thanks. |
|
| Back to top |
|
 |
|
 |
 |
 |
 |
 |
 |
 |
 |
| Author |
Message |
Vopisk
Joined: 22 Aug 2005 Posts: 99 Location: Golden Valley, Arizona, USA
|
Posted: Mon Aug 22, 2005 10:35 pm Post subject: |
|
|
| Lindahl wrote: | | Tyche wrote: | | Lindahl wrote: | | Tyche wrote: | The challenge is in self referential commands like...
> get the sword from the sack and sharpen it.
Sharpen what? The sack or the sword? |
Isn't it as simple as applying the action to the direct object as opposed to the prepositional object? Seems kinda obvious to me how a parser could exhibit the right behavior in this instance... or is there a counter-example to this approach? |
Sure using the same example...
> get the sword from the sack and close it.
Or more ambiguously...
> get the sword from sack and drop it. |
I knew there was a counter-example, just couldn't come up with it for some reason, thanks. |
This isn't really a counter-example, sorry Tyche. In a situation with a parser like this, the player would just be given the onerous task of using proper english... take the proffered example of "Get the sword from sack and drop it"... First and foremost, we know that we are getting something, what are we getting? The sword of course! And where are we to pull this sword from you ask? Well we're getting it "From sack" which means that our target destination is a sack, now, since the sack is the target destination and the sword is the target object of our parsed inquiry, we know that if we're dropping anything it should be the sword. The and functions just like the semi-colon ( in most standard mud clients in that it parsers apart different commands, so in essence you are telling the game that you want to get the sword from the sack, and then send a seperate command to drop the item you just targetted. Therefore, this problem isn't really so much of a problem and typing it or sack don't make that much of a difference.
For example:
"Get sword from sack and drop it"
"Get sword from sack and drop sack"
"Get sword from sack and drop sword"... What did I save in typing? A micro-second?
"Get sword from sack; drop sword" ... I think that was actually faster...
"Get sword from sack; drop sack" ... Faster as well...
I think everyone gets my point, the idea is to make the system more natural-language friendly, so that you don't have as much need for so many essoteric commands, which of course some systems employ. For example there are system where if you are speaking to one person then you can continue (with the use of a slightly alternate/variant command) to speak to that person until a different target is specified, using the original form of the command if you wanted to address the entire room (per se) if we're referring to "say" commands.
Anyway, that's my two cents...
Vopisk |
|
| Back to top |
|
 |
|
 |
 |
 |
 |
 |
 |
 |
 |
| Author |
Message |
Alister
Joined: 13 May 2005 Posts: 62 Location: Alberta, Canada
|
Posted: Mon Aug 22, 2005 11:32 pm Post subject: |
|
|
| Vopisk wrote: |
in essence you are telling the game that you want to get the sword from the sack, and then send a seperate command to drop the item you just targetted.
|
What if you have just realized that a grey ooze has taken up residence in your sack, and you would like to salvage your prized sword before you get as far away from the sack as you possibly can? The best candidate for "it" has suddenly shifted.
Unfortunately, "natural language" is rife with ambiguities that only context can disambiguate. Indeed, it's probably one of the reasons language is so powerful. This isn't all that special, really. Most of our senses suffer similar "plights". Take vision, for instance. The world before us is in 3D, but has to be projected onto the 2D retina before we experience it as a 3D sight. Many possible 3D images can map to the same 2D image. But why do we only ever experience one of these 3D images when we use sight? We have a priori knowledge about how lighting, size, and distance change the appearance of things, and use this to constrain our guess as to what the 3D scene before us actually looks like. The same goes for language comprehension: many regular, syntactically legal utterances we hear daily are very ambiguous. Yet, assuming they are not a raving lunatic or have wernicke's aphasia, we can usually figure out what someone is saying with no problems because we can draw upon context. |
|
| Back to top |
|
 |
|
 |
 |
 |
 |
 |
 |
 |
 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
 |
 |
 |
 |
|
 |