Imaginary Characters

The big idea yesterday was the creation of imaginary characters whose imaginary behavior provides a template against which the protagonist's behavior is measured. This means that, every time a normal character learns about or observes the protagonist's behavior, he must somehow calculate the behavior of the standard characters. This will require a special function added to the token list. Let's see if we can't define this function's inputs, processing, and outputs.

Inputs look simple enough: the event immediately prior to the protagonist's action in question. That's the only thing the function needs to consider.

The function itself must then perform a tricky switcheroo. On the one hand, it must plug in the protagonist's objective attributes; on the other hand, it must use the ideal character's personality traits. To make this a bit more concrete, the function must replicate the exact conditions under which Arthur found himself when he took the action in question -- but it must use the personality attributes of the Perfect King in calculating the reaction. This is tricky business, for two reasons. First, we must cleanly separate all the data associated with Arthur into two portions: the invariant context information, and those traits that are specific to the Perfect King. The second killer problem is that Arthur himself might have changed in the interval between his action and the observer's reaction to it.

Another problem is that the script to be executed (after all, we are expecting the function to use a macro call of the script) might well change physical attributes, and the macro execution could result in miscalculations. There's no way around this; my hand is forced. The system cannot be immune to the decisions of the storybuilder.

Let me fall back on a slightly different approach: suppose that the storybuilder defines a Perfect King role for every verb that deserves such consideration. The Perfect King role calculates the reaction in the same context, but incorporates the expectations of the Perfect King. It really could be little more than an expurgated version of the standard role, lacking any physical changes.

Thus, the new function operates as follows: it takes the event in question, looks up the verb, then executes a custom truncated version of CoreReaction, using the Perfect King character in the place of Arthur. It calls the interpreter (remember, we're already inside the interpreter) using Dave's macro system. When it returns from the macro call, it has the Perfect King's reaction ready to go. It returns the reaction-verb.

We're now back out at the normal level of operation of the interpreter, inside the new function. The function takes the reaction-verb, compares it with Arthur's actual choice as looked up in the HistoryBook. If they match, Arthur gets points; if not, he loses points.

This all seems plausible, but there are a great many details to work out.