The slides and (approximately) the text are now up on my web site:
The description of I7's rule model, and why it exists, will be
familiar to anybody who's been hanging around RAIF for the past few
years. I then go on to talk about my crazy ideas for a *completely*
rule-based language; those aren't new either, but I don't expect that
everybody has been tracking my sporadic newsgroup ramblings on the
The talk went nicely, in case you were wondering. About eight or ten
people showed up, which is pretty good for a programming lecture at
10 AM on a Sunday.
"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the borogoves..."
Hell yeah. Congrats on that. Sunday-morning panels are mainly for
people who are still awake, bleary and sticky from Saturday's into-the-
night booze-and-sex revels with people in Klingon and/or squirrel
Not that I do that anymore, mind you. These days Sunday morning panels
are for sleeping through until one of the con handlers come knocking
angrily on the hotel door wanting to know if I intend to earn my badge
or just pay for it.
(Speaking of which: anyone in Dallas, come see me at A-Kon, and if we
can find 10 people to talk about IF at ANY hour of the day I'll be
shocked, but I'm game for trying ...)
(and I still don't have my itinerary, so for all I know I may be
expected to ... I DID mention ToaSK in my guest bio ...)
Interesting talk; thanks for putting that up.
Also, getting cursed by the Slumbering God for the thousandth time bites.
"So you can't afford to think about the interactions between this tweak
and every other tweak in the game. That's N-squared interactions..."
Only N, I believe.
(Which admittedly does mean that you've look at order N-squared
interactions by the end of the design process.)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
Thanks for that ... you explained the issues very clearly (sounds like the
wasn't necessarily familiar with IF).
The CYOA style quotes at the bottom of the slides were cute, too.
A thought about standard library rules, extension rules and game rules all
Unless there is a universal world model (bad idea for various reasons), I
think it will always be necessary to resolve issues manually (your "throw an
error and let the author fix it" option). A worse problem is when the
compiler doesn't detect any conflict, but the world models of various
extensions & your game are subtly different ... there is an implicit
precedence between all of the rules, but the result is not what the author
wanted (if he knew about it).
This whole thing is a similar problem to merging ontologies ... not sure if
that's a helpful thing to know, though.
Yes, that's what I meant -- N-squared in the process of writing the
> The CYOA style quotes at the bottom of the slides were cute, too.
I look to keep the audience amused. :) Or more likely they didn't have
time to follow that thread -- it was exactly 50 minutes of talk
(leaving room for 10 minutes of questions), but only because I talked
> A thought about standard library rules, extension rules and game rules all
> Unless there is a universal world model
> I think it will always be necessary to resolve issues manually (your
> "throw an error and let the author fix it" option).
The whole rule-precedence and group-precedence idea at the end was
implicitly branching off that last option. (I can make that clearer.)
Really, I'd like the compiler to make *some* assumptions beyond strict
logical implication. Otherwise conflicts are just too common. But this
is up in the realm of guesswork.
> A worse problem is when the compiler doesn't detect any conflict,
> but the world models of various extensions & your game are subtly
> different ... there is an implicit precedence between all of the
> rules, but the result is not what the author wanted (if he knew
> about it).
This is where structured compiler output, as in I7's rules index, is a
I think that differences in *world model* will fall into the realm of
semantic conflicts, not rule conflicts. That is, the extension offers
you some code (functions/rulebooks/etc) and you simply use them in a
way that the extension doesn't support. Or two extensions try to use a
common facility (perhaps a third extension) in conflicting ways.
Precedence doesn't fix that.
My archetypical notion of this failure is iteration. You have some way
to iterate through containers. You have some way to iterate through
supporters. Say you make a container-supporter. What does it mean to
iterate through that? That's not a rule-ordering problem; you
genuinely have to invent some solution.
(Never mind what it should be; I'm illustrating the failure mode.)
On the other hand, it would be nice if this failure was *detected* by
the compiler as a rule conflict.
> This whole thing is a similar problem to merging ontologies ... not
> sure if that's a helpful thing to know, though.
I hadn't thought about it that way, but it makes sense.
I don't claim anything near understanding of multi-dimensional
databases, but I just have this "feeling" that the people that write
rules for them solve some of the same problems you mention in this
presentation. The problem is that most MDDB results are numerical
results based on mathematical formulas and have default values like
zero or null. But I do know that the underlying MDDB mechanisms could
help solve the issue of “fix this group of output based on these
Is it possible that your IF rules language also needs a querying
language? You spent a lot of time talking about an atom, but I’m not
sure you’ve spent a similar amount of time on the value of querying
the world model. When querying the world model, you’re not necessarily
looking for a single data point, but you may potentially be looking
for hundreds or thousands of data points and you want to force
different results for those data points. This could help resolve
problems with the standard responses we all want fine-grained control
Respond with "You hear a grue chew its toes off....you think."
When Grue is present AND Grue has toes AND Time of Day is Dusk AND
Sally is Angry AND Bob is Hungry AND Dave is Sleeping.
I’m getting _way_ ahead of myself here, but those are my thoughts.
You're probably right, but I know less about databases than you do.
> Is it possible that your IF rules language also needs a querying
> language? You spent a lot of time talking about an atom, but I?m not
> sure you?ve spent a similar amount of time on the value of querying
> the world model.
I've been assuming that you query the world model by testing
relations (as in I7), and relations are expressed as atoms.
Group results, and group operations, are something I haven't thought
about -- except for handwaving about "iterators". Obviously, I think
I7's group operations are keener than kittens, and I want something
like that; but that doesn't look like a solution to the problem I
have, so I'm not getting into it for now.
> Respond with "You hear a grue chew its toes off....you think."
> When Grue is present AND Grue has toes AND Time of Day is Dusk AND
> Sally is Angry AND Bob is Hungry AND Dave is Sleeping.
That's a simple condition, and I've already got those in the system.
On May 5, 7:41 am, Andrew Plotkin <erkyr...@eblong.com> wrote:
> Really, I'd like the compiler to make *some* assumptions beyond strict
> logical implication. Otherwise conflicts are just too common. But this
> is up in the realm of guesswork.
I would say "up in the realm of heuristics". The H-word echoed loudly
in my skull while I was in the "trouble spots" section of the talk.
For example, contradictions may poop on a compiler, but if we've the
case where 2 rules say Yes and 1 rule says No, heuristics says "no
problem -- the odd-man-out is outvoted, and moreover, is probably
missing an extra WHEN condition on it". If the compiler explains the
snafu intelligently, I think the trouble spot is solved... just not in
the mathematically-perfect way you're grasping for.
Even explaining stuff to another human involves some back 'n forth to
clarify the odd dark corner, and not all the smart rule-ordering-
precedence stuff in the world will fix that.
Rather than working further on those trouble spots, perhaps you might
think up good ways for a compiler to "figure out" how best to ask for
more information in a useful way? I feel the write-compile-test-
rewrite cycle will always be a dialogue, not a monologue.
I meant, guesswork in deciding whether conflicts really *are* going to
be that common. Maybe I don't need to worry about this at all. But I
can't tell without building a language and then a standard library and
then a game.
I7 gives us some experience to analogize from -- but it's an imperfect
analogy, because its syntax-resolution scheme is so complicated.
Heuristics are tricky to work with, because you need some sort of
stability assurance. (Stability in a technical sense, like "stable
sort".) You need to believe that throwing in one more rule isn't going
to flip several unrelated decisions elsewhere in the code. The smarter
your heuristics get, the harder it is to make those assurances.
This is not to say I'm against heuristics -- just that I want to get a
sense of how much I need them first.
Out of time to read it right now.
> years. I then go on to talk about my crazy ideas for a *completely*
> rule-based language
How about Prolog? ;)
heh, another day there was some guy in comp.lang.lisp implementing an
"Adventure" in Lisp for the sake of learning. You did the other way
around in Lists and Lists!
BTW, this is amusing:
Perl6's grammar feature sounds nice. :)
a game sig: http://tinyurl.com/d3rxz9
> The description of I7's rule model, and why it exists, will be
> familiar to anybody who's been hanging around RAIF for the past few
> years. I then go on to talk about my crazy ideas for a *completely*
> rule-based language; those aren't new either, but I don't expect that
> everybody has been tracking my sporadic newsgroup ramblings on the
I understand this well enough that I can hum along (back in my wild
college days, I was into Prolog). Automatic correction of rule
conficts? Pretty impressive.
I figured as much.
If I think about the MDDB approach a bit more, it comes out like
MDDB designs have dimensions and time. So if you have SALES (Cost of
Goods Sold, Units Sold, Gross Revenue, Net Profit), REGION (Northeast,
Southeast, Midwest, West), PRODUCT (Widget, Gadget, Fidget), and TIME
(2008Q1, 2008Q2, 2008Q3, 2008Q4), you can create reports that show any
of the intersections of these things and any aggregations of the
So if we move over to the IF metaphor, we might have
CHARACTER (PC, George, Henry, Paul, Dave, Fred, Sue, Angela)
OBJECT (Lamp, Sword, Wand, Rock, Flowers, Bottle, Water)
ROOM (Living Room, Dining Room, Garden, Woods, Cave, Fountain, Lake)
ACTION (get, drop, kill, throw, kiss, kick, pull, push, dig)
(not sure what the actual dimensions would be...i'm thinking out loud
here and sharing prematurely)
So then your atoms would be the data within the intersections and the
condition of the atom would use an MDX (ansi standard mddb query
language) like query to determine its state.
This still doesn't tell us what order all of the resulting atoms
should be executed in, but another dimension for PRIORITY may be
Again...just thinking out loud.