Understanding the limitation of actions to two nouns

I was curious if anyone who was more familiar with how inform 7 operates “under the hood” could explain a bit as to why the limitation of actions to two nouns exists within inform and how firm this limitation is. I’m not very familiar with I6 myself but am aware of some of the usages of I6 people have used within I7 to modify the behavior, does something similar exist that could be used to change this limitation or is it more or less hard set?

To give a sort of example as to what I’m working on that ran into this problem I am pretty much trying to create a way for the player to express how they feel about a person to that person as well as express how they feel about a person to someone else. In the first case one thing (the person) is needed along with two kinds of values (one to determine if the player feels positively or negatively and a second to determine the extent of that like or dislike). Even if I could boil this second part down to one kind of value this still poses a limitation when I want to communicate feelings about someone to someone else, since just the person I’m talking to, and person I’m talking about take up both of these slots.

Another sort of side limitation I’ve run into is in the first example even if I wanted to try and get around this limitation by assuming who the person being talked to is (such as saving who the player was talking to before in a global or something similar) I’ve also run into the problem that inform does not allow actions to apply to two kinds of values without any objects. This is a sort of secondary issue but I would be interested in also understanding this limitation if someone could explain it.

1 Like

The limitation comes primarily from the way that the parser is written. It is possible to work around this and specify a third parameter for a grammar.

There is an extension adapting an example from the DM4 at extensions/Third Noun.i7x at master · i7/extensions · GitHub if you are interested.

The extension has no documentation, but see the discussion at Actions using three things... - #2 by Draconis for an example of use.

For more targeted answers, it may be helpful for you to provide a sample transcript of the kind of interaction you want to enable.

3 Likes

Thanks I’ll have to mess around with this to see if it works as I hope but it seems as if it would. If not though I’ll be sure to include more specific examples and code to better illustrate what exactly I’m looking for.

1 Like

I think my main question as of now would be how to change this token to allow for non-objects to be the third part of the action. The current phrasing of the action I’m working on is

Communicating friendship is an action applying to one positive_negative and one visible thing.

Understand "I [positive_negative] [someone] [third Qualitative]" as communicating friendship.

The communicating friendship action has a Qualitative called the x.
Setting action variables for communicating friendship:
    now the x is the third noun.

But this does not work since a qualitative (a kind of value) is not an object. As I’ve mentioned I’m not too familar with I6 so I’m not sure how I would go about changing the I6 code to allow for non-objects or would a different phrase be needed for each different type of ‘thing’ that could be a third? (third noun, third kind of value etc).

As for how I want this to function for the player, I have postive_negative and qualitatives as a kind of value which translate to like and dislike and a little and a lot respectively (qualitative will eventually be a range of ten words but I’m keeping it compressed for simplicity. So the possible sentence structures would be “I like Gwen a lot”, “I dislike Bob a little” etc. Down the road this would then be made more complicated by stating indirect awareness of relations such as “I think Bob likes Gwen a lot” or “I think Gwen dislikes Bob a little”. (in both of these cases the person the player is talking to is taken for granted, which seems easy enough for me to work with right now, but this could then be further expanded to phrases such as “Tell Gwen I like Bob a lot” “Tell Bob I dislike Gwen a little” “Tell Bob I think Gwen likes Bob a lot” “Tell Gwen I think Bob dislikes Gwen a little”).

Apologies if I’m just not understand the I6 to be able to extrapolate from it what the correct generalization would be but any help in generalizing that snippet so as to be able to apply to kinds of values as well would be helpful (I think I understand how it would be extended to fourth and fifths, with just having additional snippets).

1 Like

It’s a baked-deeply-in limitation that only one of the two “things” an action can deal with can be something other than a thing as in something of kind thing. So you can deal with two things, or you can deal with a thing and a topic, or a thing and a kind of value, but not a topic and a kind of value, or two topics, or two kinds of value. And Third Noun allows adding an additional thing, not an additional anything else. And it must be the third token; you can’t have [thing] [thing] [topic].

But I think you can get most of what you want with a lot of cheatingfinagling.


Include Verbs by Zed Lopez.

To love is a verb. To hate is a verb. To understand is a verb.

A degree is a kind of value. The degrees are mildly, moderately, very much.

Opining is an action applying to one visible thing and one degree.

Understand "i love/hate [any person] [degree]" as opining.

Persuasion rule for asking people to try opining (this is the opine rule): persuasion succeeds.

[check opining: say "[the person asked].";]

Carry out an actor opining when the person asked is not the player:
  let v be a verb;
  if the player's command includes "love", now v is the verb of "love";
  else now v is the verb of "hate";
  say "[The person asked] [understand] that [we] [adapt v in story tense] [the noun] [the degree understood].";

Lab is a room.
Alice is a person in the lab. Bob is a person.

Test me with "alice, I love Bob very much / alice, I hate bob moderately".

This relies on letting “I love Bob very much” be, under the hood, a command that you’re asking Alice to perform. And then the game only knows love from hate by a crude pattern match on the player’s command.

4 Likes

Improved version that eliminates the dependence on the Verbs extension and the crude pattern match to identify the verb.

To love is a verb. To hate is a verb. To understand is a verb.

A degree is a kind of value. The degrees are mildly, moderately, very much.

Loving is an action applying to one visible thing and one degree.
Hating is an action applying to one visible thing and one degree.
Loving is an opinionated action.
Hating is an opinionated action.

Opinion-to-verb relates one action name to one verb.
The verb to opinion-verb means the opinion-to-verb relation.
The loving action opinion-verbs the verb love.
The hating action opinion-verbs the verb hate.

Understand "i love [any person] [degree]" as loving.
Understand "i hate [any person] [degree]" as hating.

Persuasion rule for asking people to try an opinionated action (this is the opine rule): persuasion succeeds.

After an actor [performs an] opinionated action when the actor is not the player:
  let v be the verb that the action name part of the current action relates to by the opinion-to-verb relation;
  say "[The person asked] [understand] that [we] [adapt v in story tense] [the noun] [the degree understood].";

Lab is a room.
Alice is a person in the lab. Bob is a person.

Test me with "alice, I love Bob very much / alice, I hate bob moderately".
4 Likes