Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problems with Eric Eve's Conversation Rules extension.

21 views
Skip to first unread message

chipjack

unread,
Nov 20, 2010, 9:53:41 PM11/20/10
to
I'm considering using the Conversation Rules extension in a project,
but I can't seem to get the example from the documentation to work.
Maybe someone could point me in the right direction?

I'm using Inform 7, version 6F95, and the following versions of the
extensions loaded by the example (as output by the in-game 'version'
command):

Conversation Rules version 7 by Eric Eve
Conversation Framework version 8 by Eric Eve
List Control version 3 by Eric Eve
Epistemology version 6 by Eric Eve

The game source text itself was pasted in by clicking the link in the
documentation. After messing with the game for a while, I encountered
this:


The Tribune's Report
An Interactive Fiction
Release 1 / Serial number 101120 / Inform 7 build 6F95 (I6/v6.31 lib
6/12N) SD

Great Hall
The strong morning sunlight filters in through the unglazed windows
overlooking the Upper City and the Temple compound.

The governor is standing at the centre of the hall, frowning in
thought.

>greet governor
"Good morning, your excellency," you greet him. "I don't know what's
good about it, tribune," Pilate grunts in reply.

(You could ask him about himself or Caiaphas, or tell him about
Jesus.)

>tell him about Jesus
"I've just come from the Temple, sir," you report, "there was some
scruffy Galilean called Jesus causing a disturbance there. The priests
seemed quite upset by it all!" "Did you arrest this Jesus fellow
then?" Pilate demands.
(You could say yes or no.)

>no
"No, sir, I'm afraid he managed to slip away, you confess. "Damn!"
Pilate swears, "We'll have to see if Caiaphas can track him down for
us."

>tell him about Jerusalem

*** Run-time problem P20: Attempt to look up a non-existent column in
the table 'Table of Pilate's Default Inform Responses'.


It'd be awfully helpful if Inform would tell you what column in the
table it was expecting to find, but didn't. After some headscratching,
I noticed that the "responses" column in "Table of Pilate's Default
Inform Responses" was named "response" everywhere else, and changing
that made the runtime error go away. After some further
experimentation, I got this:

The Tribune's Report
An Interactive Fiction
Release 1 / Serial number 101120 / Inform 7 build 6F95 (I6/v6.31 lib
6/12N) SD

Great Hall
The strong morning sunlight filters in through the unglazed windows
overlooking the Upper City and the Temple compound.

The governor is standing at the centre of the hall, frowning in
thought.

>greet governor
"Good morning, your excellency," you greet him. "I don't know what's
good about it, tribune," Pilate grunts in reply.

(You could ask him about himself or Caiaphas, or tell him about
Jesus.)

>ask him about himself
"How are you today, sir?" you enquire politely. "Terrible," he grunts,
"I slept badly, dreamed nastily, and woke up with a mouth tasting like
a whore's armpit."

>epistat jerusalem
Jerusalem - unseen / unfamiliar / unknown.

>ask him about himself
"Do you like it in Judaea?" you ask. "Caesarea's okay," he replies,
"But Jerusalem is too hot, too crowded, and too dangerous."

>epistat jerusalem
Jerusalem - unseen / familiar / known.

>topics
(You could ask him about himself, Caiaphas or Jerusalem, or tell him
about Jesus.)

>ask him about Jerusalem
The governor seems momentarily lost in thought, and apparently fails
to hear your question.

>


...in which the correct response for "Jerusalem" is not printed, even
though the subject has now become known to the player. I don't know
why.

Jerusalem is defined in the source text as:

Jerusalem is a thing.


Changing it to:

Jerusalem is a woman.


seems to avoid whatever the problem might be, but I really don't think
that's an adequate solution. This is the output this rather wistful
definition produces, which is what I'd expected to see all along:


The Tribune's Report
An Interactive Fiction
Release 1 / Serial number 101120 / Inform 7 build 6F95 (I6/v6.31 lib
6/12N) SD

Great Hall
The strong morning sunlight filters in through the unglazed windows
overlooking the Upper City and the Temple compound.

The governor is standing at the centre of the hall, frowning in
thought.

>greet governor
"Good morning, your excellency," you greet him. "I don't know what's
good about it, tribune," Pilate grunts in reply.

(You could ask him about himself or Caiaphas, or tell him about
Jesus.)

>ask him about himself
"How are you today, sir?" you enquire politely. "Terrible," he grunts,
"I slept badly, dreamed nastily, and woke up with a mouth tasting like
a whore's armpit."

>epistat jerusalem
Jerusalem - unseen / unfamiliar / unknown.

>ask him about himself
"Do you like it in Judaea?" you ask. "Caesarea's okay," he replies,
"But Jerusalem is too hot, too crowded, and too dangerous."

>epistat jerusalem
Jerusalem - unseen / familiar / known.

>topics
(You could ask him about himself, Caiaphas or Jerusalem, or tell him
about Jesus.)

>ask him about jerusalem
"What did you mean by Jerusalem being too dangerous?" you wonder,
"Surely there's nothing our two cohorts of auxiliaries can't deal
with?" Pilate lets out a heavy sigh, "Nothing except a crowd of
volatile Jews celebrating their Passover -- with all the undercurrents
for revolutionary sentiment that implies."

>


I'd love to figure this out, but I'm quite stumped. The whole you-
can't-talk-about-things-your-character-doesn't-know-about-yet concept
is really the selling point for me with this extension, and I love the
rules & tables based approach taken here, as it fits my style of
programming much better than any of the other conversation approaches
available. Anyone know what I'm missing?

Thanks!

Chip

chipjack

unread,
Nov 21, 2010, 1:07:24 AM11/21/10
to
After playing with this for a bit, it seems that I can run through the
Table of Pilate's Answers row by row, comparing the subject entry to
my second noun, and the object called Jerusalem is in fact in there.
But when given the criteria "the second noun is a subject listed in
the quizzing table of the noun", Inform doesn't think this is the
case, so the rule that should print the response I'm expecting is not
considered applicable, and is therefore skipped.

The other objects listed in that column are people (specifically men),
so maybe it's some sort of type-mismatch issue? I don't know. There's
something wrong with the (thing) is (column) listed in (table)
construct though, and that doesn't appear to be part of the standard
library, but rather is something the ni compiler generates.

I have no idea how to fix that. I'm curious of someone with a better
understanding of the recent changes made in 6F95 has a clue here?

Thanks,
Chip

mwigdahl

unread,
Nov 22, 2010, 9:34:41 AM11/22/10
to

Seeing your code would help. Could you post an excerpt that
replicates your problem?

Matt

chipjack

unread,
Nov 22, 2010, 11:04:13 PM11/22/10
to
This is the example in it's entirety. It isn't that long. All comments
are mine, indicating changes I've made to either make it work, or
trying to make it work, or trying to make it more testable. I tried
duplicating the problem in a separate, smaller game, but simply adding
(object) to the column I was having trouble with fixed the type
mismatch problem. That doesn't seem to help here.

Thanks,
Chip

[ source ]

"The Tribune's Report"

Part 1 - Conversation Model

Include Conversation Rules by Eric Eve.

Instead of asking someone about something:
consider the unknown quizzing rule of the noun.

Instead of telling someone about something:
consider the unknown informing rule of the noun.

Part 2 - Scenario

Chapter 1 - The Location

The Great Hall is a Room. "The strong morning sunlight filters in


through the unglazed windows overlooking the Upper City and the Temple
compound."

Some unglazed windows are scenery in the Great Hall.

Chapter 2 - Pilate

Section 1 - The Man

Pontius Pilate is a man in the Great Hall. "The governor is standing
at the centre of the hall, frowning in thought." The description is
"He's a stout, balding man, dressed in the tunic of the equestrian
order." The quizzing table is the Table of Pilate's Answers. The
informing table is the Table of Pilate's Remarks. The unknown quizzing
rule is the Pilate's default-quiz-response rule. The unknown informing
rule is the Pilate's default-inform-response rule.

Understand "man" or "governor" or "prefect" or "procurator" or "roman"
or "stout" or "balding" as Pontius Pilate.

Section 2 - Greeting

After saying hello to Pontius Pilate:
say "'Good morning, your excellency,' you greet him.


'I don't know what's good about it, tribune,' Pilate grunts in

reply.";
if the greeting type is explicit, consider the standard list suggested
topics rule.

Section 3 - Conversation Topics

[ added (object) to the subject column, as an attempt to fix the
problem ]


Table of Pilate's Answers

subject response rule response table suggest
Pilate a rule Table of Pilate Self 3
Caiaphas caiaphas rule -- 1
jerusalem jerusalem rule -- 1
emperor -- Table of Caesar -1

[ added (object) to the subject column, as an attempt to fix the
problem ]
Table of Pilate's Remarks
subject (object) response rule response table suggest
jesus a rule Table of Jesus 2

Table of Pilate Self
response
"'How are you today, sir?' you enquire politely.


'Terrible,' he grunts, 'I slept badly, dreamed nastily, and woke up

with a mouth tasting like a whore's armpit.'"
"'Do you like it in Judaea?' you ask.


'Caesarea's okay,' he replies, 'But Jerusalem is too hot, too

crowded, and too dangerous[reveal jerusalem].'"
"'But things aren't going too badly for you here, are they sir?' you
ask.
'No, not too badly,' he agrees, 'At least I still seem to be in
favour with the Emperor[quiz emperor to 2].'"

This is the caiaphas rule:
say "'How is the High Priest these days?' you ask.
'As devious as ever,' Pilate tells you."

This is the jerusalem rule:
say "'What did you mean by Jerusalem being too dangerous?' you wonder,


'Surely there's nothing our two cohorts of auxiliaries can't deal
with?'
Pilate lets out a heavy sigh, 'Nothing except a crowd of volatile
Jews celebrating their Passover -- with all the undercurrents for

revolutionary sentiment that implies.'"

Table of Jesus
response
"'I've just come from the Temple, sir,' you report, 'there was some


scruffy Galilean called Jesus causing a disturbance there. The priests
seemed quite upset by it all!'

'Did you arrest this Jesus fellow then?' Pilate demands.[convnode
arrest-node][run paragraph on]"
"'This Jesus fellow seems to be some sort of prophet,' you tell him.
'Prophet!' Pilate almost spits the word, 'They're almost as bad as
brigands round here, tribune, you mark my words! Charlatans the lot of
them -- whipping up the people with false hopes of liberation. If this
Jesus fellow is a prophet we should have him executed -- a crucifixion
or two at the height of the festival should show these Jews who's in
charge round here!'"

Table of Caesar
response
"'How is the Emperor?' you enquire, 'Is he still on Capri?'
'Last I heard,' Pilate nods."
"'And the Emperor's health?' you ask.
Pilate gives a little shudder, 'It is not always healthy to discuss
Caesar's health, tribune.' he warns you."

This is the Pilate's default-quiz-response rule:
show the next response from the Table of Pilate's Default Quiz
Responses.

This is the Pilate's default-inform-response rule:
show the next response from the Table of Pilate's Default Inform
Responses.

[added DEFAULT to each message below, to make them stand out better]
Table of Pilate's Default Quiz Responses
response
"DEFAULT The governor seems momentarily lost in thought, and


apparently fails to hear your question."

"DEFAULT 'We'll discuss that some other time, tribune,' Pilate tells
you."
"DEFAULT The prefect mutters something under his breath, which you
fail to catch."
"DEFAULT Pilate looks annoyed by your question, for some reason, and
declines to answer."

[ changed "responses" column to "response" to prevent run-time error ]


Table of Pilate's Default Inform Responses

response
"Pilate listens to what you have to say with feigned interest."
"'Indeed,' the governor remarks."
"Pilate frowns in evident impatience at your irrelevant remarks."

Table of Table Types (continued)
tabname index tabtype
Table of Pilate Self 0 stop-list
Table of Jesus 0 stop-list
Table of Pilate's Default Quiz Responses 0 shuffled-list
Table of Pilate's Default Inform Responses 0 shuffled-list
Table of Caesar 0 stop-list

Section 4 - Objects referred to

Caiaphas is a familiar man.
Understand "high" or "priest" as Caiaphas.

Jesus is a familiar man. Understand "of nazareth" or "galilean" or
"joshua" or "yeshua" as Jesus.

Jerusalem is a thing.

The Emperor is a familiar man. Understand "caesar" or "tiberius" or
"princeps" as the Emperor.

Section 5 - Conversation Node

The arrest rules is a rulebook.

The arrest-node is a Conversation Node. The suggestions are "say yes
or no". The node rule is the arrest rules.

An arrest rule when saying no:
say "'No, sir, I'm afraid he managed to slip away, you confess.


'Damn!' Pilate swears, 'We'll have to see if Caiaphas can track him

down for us.'[convnode null-node]";
rule succeeds.

An arrest rule when saying yes:
say "'Yes, sir -- or at least we tried to, but the temple police got
in our way and the wretched fellow managed to escape.'
'Damn!' Pilate swears, 'We'll have to see if Caiaphas can track him
down for us.'[convnode null-node]";
rule succeeds.

The last arrest rule:
say "'Never mind that,' snaps Pilate, 'I asked you whether you
arrested this Jesus fellow. Well -- did you?'";
rule succeeds.

Part 3 - Testing

[ commenting out original test command ---
test me with "talk to pilate/a emperor/a himself/g/a jerusalem/topics/
t jesus/no/a caiaphas/a pilate/a emperor/g/topics/t jesus"]

[ a testing command to demonstrate that the default response is
triggered for the topic Jerusalem, even though the subject is
available ]
test me with "hi/a himself/g/topics/epistat jerusalem/a jerusalem"


Captain Mikee

unread,
Nov 23, 2010, 12:10:09 PM11/23/10
to
I don't know what's going on, but here's what I found out:

When jerusalem is a thing:

>showme jerusalem
Jerusalem - thing
location: out of play
singular-named, proper-named; unlit, inedible, portable, neuter,
ordinarily enumerated, unseen, familiar, secondary
printed name: "Jerusalem"
printed plural name: none
indefinite article: none
description: none
initial appearance: none

When jerusalem is a woman:

>showme jerusalem
Jerusalem - woman
location: out of play
singular-named, proper-named; unlit, inedible, portable, ordinarily
enumerated, unseen, familiar, secondary; female
printed name: "Jerusalem"
printed plural name: "women"
indefinite article: none
description: none
initial appearance: none
carrying capacity: 100
quizzing table: Table of Null Response
informing table: Table of Null Response
unknown quizzing rule: default no response rule
unknown informing rule: default no response rule

Adding this debugging rule:

After quizzing someone about something:
let the q-table be the quizzing table of the noun;
say "[the second noun] is [if the second noun is not a subject listed
in the q-table]not [end if]listed in [the q-table].";
repeat through q-table:
say " [subject entry] is listed in [q-table][if the second noun is
subject entry], and it is the subject being asked about[end if].";
continue the action;

produces this result:

>[2] a himself
Pontius Pilate is listed in Table of Pilate's Answers.
Pontius Pilate is listed in Table of Pilate's Answers, and it is the
subject being asked about.
Caiaphas is listed in Table of Pilate's Answers.
Jerusalem is listed in Table of Pilate's Answers.
Emperor is listed in Table of Pilate's Answers.

"How are you today, sir?" you enquire politely. "Terrible," he grunts,
"I slept badly, dreamed nastily, and woke up with a mouth tasting like
a whore's armpit."

>[3] g
Pontius Pilate is listed in Table of Pilate's Answers.
Pontius Pilate is listed in Table of Pilate's Answers, and it is the
subject being asked about.
Caiaphas is listed in Table of Pilate's Answers.
Jerusalem is listed in Table of Pilate's Answers.
Emperor is listed in Table of Pilate's Answers.

"Do you like it in Judaea?" you ask. "Caesarea's okay," he replies,

"But Jerusalem is too hot, too crowded, and too dangerous."

>[4] topics


(You could ask him about himself, Caiaphas or Jerusalem, or tell him
about Jesus.)

>[5] epistat jerusalem


Jerusalem - unseen / familiar / known.

>[6] a jerusalem
Jerusalem is not listed in Table of Pilate's Answers.
Pontius Pilate is listed in Table of Pilate's Answers.
Caiaphas is listed in Table of Pilate's Answers.
Jerusalem is listed in Table of Pilate's Answers, and it is the
subject being asked about.
Emperor is listed in Table of Pilate's Answers.

DEFAULT The governor seems momentarily lost in thought, and apparently
fails to hear your question.

So it looks like the problem is that "the second noun is a subject
listed in [the relevant table]" is false when the second noun is not a
person. You've pretty much worked that out already, but I think this
confirms it. The question now is, is there a problem with the syntax,
or is this a bug in 6F95?

As a temporary fix, you can hack the standard report quizzing/
informing rules to loop through the table instead of checking for the
subject in their conditions:

Report quizzing someone about something known (this is the bugfix
quizzing report rule):
repeat through the quizzing table of the noun:
if the subject entry is the second noun:
if there is a suggest entry and the suggest entry is -1, continue
the action;
if there is a response rule entry, consider the response rule
entry;
if there is a response table entry, show the next response from the
response table entry;
if there is a suggest entry and the suggest entry > 0:
let sug be the suggest entry;
decrease sug by 1;
now the suggest entry is sug;
stop the action.

The bugfix quizzing report rule is listed instead of the standard
quizzing report rule in the report quizzing it about rulebook.

chipjack

unread,
Nov 24, 2010, 3:55:53 PM11/24/10
to
It's nice to know I'm not the only one seeing this. Thanks Cap'n ;)

As a workaround, I ended up doing pretty much what you suggest -
essentially bypassing Inform's "listed in" construct and plugging in
some code that actually looks through the table.

I don't think this is a bug with Eric Eve's extension; it really looks
more like a problem with the way Inform is handling datatypes in
tables. I haven't been able to duplicate it, though, so I haven't
submitted a formal bug report. I also haven't had time to look through
the generated Inform 6 code to see exactly what's going on, which I
probably will at some point.

Anyway, thanks again for looking at it.

Chip

Captain Mikee

unread,
Nov 29, 2010, 12:11:46 PM11/29/10
to
On Nov 24, 3:55 pm, chipjack <chipj...@gmail.com> wrote:
> I don't think this is a bug with Eric Eve's extension; it really looks
> more like a problem with the way Inform is handling datatypes in
> tables. I haven't been able to duplicate it, though, so I haven't
> submitted a formal bug report.

This was still bugging me, so I figured out how to duplicate it:

Mentioning is an action applying to one visible thing. Understand "a
[any thing]" as mentioning.

[There is a Table of Null Responses in "Conversation Rules" by Eric
Eve which also has "yourself" in the subject column.

The addition of this table, with "yourself" in the subject column,
causes Jerusalem (i.e. a thing rather than a person) to "not listed in
the Table of Quizzing Answers."

Changing "yourself" in this table to "a person," or changing the
column header to something different to the column header in the Table
of Mentionables allows Jerusalem to be "listed" again.]

Table of Null Response
subject
yourself

The Great Hall is a Room. Pontius Pilate is a man in the Great Hall.

Jerusalem is a thing. Caiaphas is a man.

Table of Mentionables
subject
Jerusalem
Caiaphas

Report mentioning something:
say "Pilate tells you about [the noun].";

Report mentioning something when the noun is not a subject listed in
the Table of Mentionables:
say "Pilate doesn't have anything to say about that." instead;

Part 3 - Testing

test me with "a caiaphas/a jerusalem"

0 new messages