I7 - Answering Someone About Something

So I hacked something up that didn’t require delving into Parser Letter H, involving a couple of undocumented features at least one of which is probably a bug, but it’s exhibiting some odd behavior which I wonder if one of the more savvy people can explain. Though I expect the reaction of savvy people will be more like “My god what have you done?” following by burning my code and sprinkling holy water on the computer.

[code]Attic is a room. Bob is a man in Attic. A stuffed owl, a stuffed chair, a curio, and a crate of papers are in Attic.

Instead of answering Bob that when the topic understood matches “[thing]”:
convert to request of Bob to perform the taking action with the noun and nothing.

Unsuccessful attempt by Bob taking:
say “[The person asked] can’t take [the noun] because of [the reason the action failed].”

Persuasion rule: persuasion succeeds.[/code]

OK, so what’s going on here? Well, as Genstein points out, when you match a topic against something with a bracketed text substitution in quotes, the thing that matches the bracketed text substitution gets stored as the noun. Which can be a pain if you want to use the original noun, and in fact is filed as a bug, but here we want to be able to recover that thing so it’s good that it’s stored in the noun. (Incidentally, if you say “[something]” instead of “[thing]” it won’t compile.)

Now, it might seem that the thing to do when this matches is “try Bob taking the noun.” But if we do this, and Bob can’t take the noun, then the unsuccessful attempt rules won’t fire, because as section 12.5 of the documentation explains, unsuccessful attempt rules only fire when someone asks someone to do something. (Also, we’d be bypassing the persuasion rules, which you might not want to do.) But there’s a “convert to request” feature in the Standard Rules, used to change “ask bob for curio” into the equivalent of “bob, give me curio,” which we can use so we’re actually requesting that Bob take the noun. The phrase is defined with two nouns, so we have to include “nothing” as the second noun.

So far so good, maybe. Here’s the problem:

I have no idea why this is happening (as you can see, it works as it should if you include “get”), but disambiguation seems not to work. It may be less trouble to hack Parser Letter H than to get it to work, but I thought I’d toss this out to see if someone had an idea.

(Also, this is my 2000th post woo.)