I have an issue where when a pronoun is invoked, it seems that understanding the difference between left and right can be messed up. The code is under the rant. The offending output is this:
kitchen
You can see Sally, Bob and a Bucket-shaped android here.
>look her arm
What do you want to look: 1) Sally's left arm or 2) Sally's right arm?
>left
You see nothing special about Sally's right arm.
>
I am plain stumped on this one.
Edit: this may be a further clue…
>look her arm
What do you want to look: 1) Sally's left arm or 2) Sally's right arm?
>1
You can't see any such thing.
>
How can it not be in scope, but still end up in the asking which do you mean list? Also, it is there with Trace 6 on… and up until the very end, the parser is saying “Sally’s left arm…?” and then right at the very end decides on the right arm or nothing!
[rant]I tried to provide a stripped down version of my application for the question… but believe me, this IS the stripped down version. I removed thousands of other lines to have this “core functionality” version to share. This doesn’t include all the custom actions and reporting, assembly libraries, etc.
The parts that are probably relevant are down in Chapter 1 - Filtering Command by Pronoun and Book 3 - Arms segments, but I have no idea why it’s doing this.
[code]
Volume 1 - Settings
Use MAX_OBJECTS of 10000.
Use maximum things understood at once of at least 500.
Use MAX_PROP_TABLE_SIZE of 10000000.
Use MAX_STATIC_DATA of 10000000.
Use MAX_SYMBOLS of 1000000.
Use SYMBOLS_CHUNK_SIZE of 100000.
Use ALLOC_CHUNK_SIZE of 64000.
Use MAX_ARRAYS of 1000000.
Use MAX_NUM_STATIC_STRINGS of 1000000.
Use MAX_EXPRESSION_NODES of 1024.
Use MAX_CLASSES of 3000.
Use MAX_VERBS of 1000.
Use DICT_WORD_SIZE of 30.
Use dynamic memory allocation of at least 16384.
Use maximum text length of at least 3000.
Use american dialect.
To consider (x - a nothing based rule):
follow x;
To decide which object is the cleaned holder of (x - a thing):
if the holder of x is nothing:
decide on x;
otherwise:
decide on the holder of x;
When play begins:
repeat with x running through things:
if the holder of x is not a room and the holder of x is not an enterable container:
now x is unscopable;
if x is incorporated by something (called y):
now the original incorporater of x is y;
repeat with z running through directions:
now z is unscopable;
Include (-
Replace PrintInferredCommand;
[ PrintInferredCommand; ];
-) before “Parser.i6t”.
Volume 2 - Managing Scope
Book 1 - Scopability by Brady Garvin
Include Scopability by Brady Garvin.
Book 2 - Scoping Directions
A direction can be scopable or unscopable.
Understand “n/north/s/south/e/east/w/west/nw/northwest/ne/northeast/sw/southwest/se/southeast/u/up/d/down/in/inside/out/outside” as “[direction]”.
After reading a command (this is the put directions back in scope if actually being used rule):
if the player’s command includes “go” or the player’s command includes “[direction]”:
repeat with x running through directions:
now x is scopable;
Book 3 - The Relevant List
A thing can be reset unscopable. A thing can be special scope.
Definition: a thing is reset unscopable if the holder of it is not the holder of the player and it is not special scope.
Asking which is initially false;
Before asking which do you mean (this is the determine if asking which do you mean sequence rule):
now asking which is true;
Definition: a thing is relevant if it is in the location or the cleaned holder of it is in the location or it is special scope.
Relevant list is a list of objects that varies.
Before reading a command (this is the populate relevant list rule):
truncate relevant list to 0 entries;
repeat with y running through relevant things:
add y to relevant list, if absent;
Last every turn (this is the reset unscopability rule):
repeat with x running through relevant list:
if x is reset unscopable:
now x is unscopable;
repeat with y running through directions:
now y is unscopable;
now asking which is false;
Volume 3 - Disambiguation
Book 1 - Disambiguation Control by Jon Ingold
Include Disambiguation Control by Jon Ingold.
Use disambiguation list length of at least 100.
Chapter 1 - No Initial Expectations (in place of Chapter - Initial Expectations in Disambiguation Control by Jon Ingold
[Default assumptions are not the reason we want this extension. “The match list” being exposed to I7 is the most important thing thus far.]
Book 2 - Numbered Disambiguation Choices by Aaron Reed
Include Numbered Disambiguation Choices by Aaron Reed.
The Numbered Disambiguation Choices don’t use number rule is not listed in any rulebook.
The Numbered Disambiguation Choices preface disambiguation objects with numbers rule is not listed in any rulebook.
A thing can be numbered_disambiguation_proper_cleaned.
Before asking which do you mean:
repeat with x running through the match list:
if x is not proper-named:
now x is numbered_disambiguation_proper_cleaned;
now x is proper-named;
After asking which do you mean:
now every thing that is numbered_disambiguation_proper_cleaned is not proper-named;
now every thing that is numbered_disambiguation_proper_cleaned is not numbered_disambiguation_proper_cleaned;
First before printing the name of something (called macguffin) while asking which do you mean (this is the New Numbered Disambiguation Choices preface disambiguation objects with numbers rule):
if macguffin is not listed in match list:
do nothing;
otherwise:
if disambiguation-busy is false:
now disambiguation-busy is true;
repeat with x running through match list:
if x is macguffin:
add macguffin to the list of disambiguables, if absent;
now the disambiguation id of macguffin is the number of entries in list of disambiguables;
say “[before disambiguation number text][the number of entries in list of disambiguables][after disambiguation number text]”;
Book 3 - Disambiguating Homographic Prop_Objects
[Sometimes prop_objects will end up being grouped together because the player doesn’t know any better due to the conditionals attached to understand phrases. However, beneath the surface of what the player knows, the objects are actually not identical. This section makes sure the player always has the ability to select one of the grouped items instead of having the parser simply pick the first one.]
A thing has a text called group_id.
Understand the group_id property as describing a thing.
When play begins:
Let N be 1;
repeat with x running through things:
now the group_id of x is “group_id_[N]”;
increment N;
Book 4 - Abandoning After Asking Which Do You Mean
This is the extended disambiguation printing rule:
if the message-id-requested is:
– 1: say "Please be more specific - " (A);
– 2: say "Whom [regarding the player][do] [we] want[actor-or-player] to [print-or-construct]: " (B);
– 3: say "What [regarding the player][do] [we] want[actor-or-player] to [print-or-construct]: " ©;
– 4: say “Whom [regarding the player][do] [we] want[actor-or-player] to [print-or-construct]?[paragraph break]” (D);
– 5: say “What [regarding the player][do] [we] want[actor-or-player] to [print-or-construct]?[paragraph break]” (E);
– 6: say "whom [regarding the player][do] [we] want[actor-or-player] to [print-or-construct]: " (F);
– 7: say "what [regarding the player][do] [we] want[actor-or-player] to [print-or-construct]: " (G);
– 8: say “whom [regarding the player][do] [we] want[actor-or-player] to [print-or-construct]?[paragraph break]” (H);
– 9: say “what [regarding the player][do] [we] want[actor-or-player] to [print-or-construct]?[paragraph break]” (I);
– 10: say “?[line break]” (J);
– 11: say “?[paragraph break]” (K);
– 12: say “[We] [can] only have one item here. Which exactly?” (L);
– 20: say “take things from” (M);
– 21: say “put things in” (N);
– 22: say “put things on” (O);
The extended disambiguation printing rule substitutes for the disambiguation printing rule.
Book 5 - Abandoning While Asking Which Do You Mean
Rule for asking which do you mean while the player’s command includes “no”:
say “Decisions, decisions… none of these will do for now.”;
follow the put temporarily descoped for pronouns things back in scope rule;
Volume 4 - Possession and Ownership
Book 1 - Parsing Possessives
First after reading a command (this is the after manage possessives in the players command rule):
if the player’s command includes “your”:
replace the matched text with “theirs”;
if the player’s command includes “my”:
replace the matched text with “your”;
let N be text;
let N be the player’s command;
replace the regular expression “(\w)[’]s” in N with “\1 [’]s”;
replace the regular expression “s’” in N with “s [’]s\1”;
change the text of the player’s command to N;
Understand “your” as a thing when the player is the holder of the item described. Understand “theirs” as a thing when the person asked is the holder of the item described.
Volume 5 - Categories vs Kinds
Book 1 - Categories, Subcategories, and Specific Types
A category is a kind of value. Generic category is a category. A thing has a category.
A subcategory is a kind of value. Generic subcategory is a subcategory. A thing has a subcategory.
A specific type is a kind of value. Generic type is a specific type. A thing has a specific type.
Volume 6 - Gender and Age
Book 1 - Age
A perceived age is a kind of value. Perceived age are perceived infant, perceived child, perceived young, perceived adult, perceive old. A person has a perceived age. A person is usually perceived adult.
Book 2 - Gender
Chapter 1 - Filtering Commands by Pronoun
A thing can be temporarily descoped for pronouns.
This is the put temporarily descoped for pronouns things back in scope rule:
now everything that is temporarily descoped for pronouns is scopable;
Last after reading a command while the player’s command includes “her”:
repeat with x running through relevant things that are held by a person:
if the holder of x is not female:
now x is temporarily descoped for pronouns;
now x is not scopable;
Understand “her” as a thing when the item described is female.
Understand “her [thing]” as a thing when a female person holds the item described and the cleaned holder of the item described is not the player and the cleaned holder of the item described is not the person asked.
Understand “her [thing]” as a thing when a female person wears the item described and the cleaned holder of the item described is not the player and the cleaned holder of the item described is not the person asked.
Last after reading a command while the player’s command includes “his”:
repeat with x running through relevant things that are held by a person:
if the holder of x is not male or the holder of x is neuter:
now x is temporarily descoped for pronouns;
now x is not scopable;
Understand “him” as a thing when the item described is male and the item described is not neuter.
Understand “his [things]” as a thing when a male person holds the item described and the cleaned holder of the item described is not the player and the cleaned holder of the item described is not the person asked.
Understand “his [things]” as a thing when a male person wears the item described and the cleaned holder of the item described is not the player and the cleaned holder of the item described is not the person asked.
Last after reading a command while the player’s command includes “its”:
repeat with x running through relevant things that are held by a person:
if the holder of x is not neuter:
now x is temporarily descoped for pronouns;
now x is not scopable;
Understand “it” as a thing when the item described is neuter.
Understand “its [things]” as a thing when a male person holds the item described and the cleaned holder of the item described is not the player and the cleaned holder of the item described is not the person asked.
Understand “hits [things]” as a thing when a male person wears the item described and the cleaned holder of the item described is not the player and the cleaned holder of the item described is not the person asked.
Volume 7 - Body Parts
Book 1 - Body Parts Main
A body part is a kind of thing. body part category is a category. A body part is usually body part category.
A thing has a thing called original incorporater.
Before printing the name of a body part (called x):
if the original incorporater of x is not proper-named:
now the original incorporater of x is proper-named;
say "[regarding the original incorporater of x][possessive] ";
now the original incorporater of x is not proper-named;
otherwise:
say "[regarding the original incorporater of x][possessive] ";
Book 3 - Arms
Arm subcategory is a subcategory.
Some arms are a kind of body part. Some arms are usually arm subcategory.
Understand “arm/arms” as “[arm]”. Understand “[arm]” as a thing when the item described is arm subcategory.
Understand “[something related by reversed incorporation] 's [arm]” as a thing when the item described is arm subcategory.
After reading a command while the player’s command includes “[arm]” (this is the scope arms rule):
repeat with x running through relevant list:
if x is arm subcategory:
now x is scopable;
Left arm type is a specific type.
A left arm is a kind of arms. A left arm is usually left arm type. 1 left arm is usually a part of every person. Understand “left” as a thing when the item described is left arm type.
Rule for printing the name of a left arm:
say “left arm”;
Rule for printing the plural name of a left arm:
say “left arms”;
Right arm type is a specific type.
A right arm is a kind of arms. A right arm is usually right arm type. 1 right arm is usually a part of every person. Understand “right” as a a thing when the item described is right arm type.
Rule for printing the name of a right arm:
say “right arm”;
Rule for printing the plural name of a right arm:
say “right arms”;
Volume 10 - The Test Game
The kitchen is a room.
The player is in the kitchen.
Sally is a female person in the kitchen.
Bob is a male person in the kitchen.
Bucket-shaped android is a neuter person in the kitchen. Bucket-shaped android is not proper-named.
[/code][/rant]