Tuesday, February 21, 2023

Acuitas Diary #57 (February 2023)

The development pattern I'm trying to follow lately is to spend half the month adding something to the Narrative module, and half the month on something else. This month's Narrative work was on better goal modeling in the Narrative scratchboard, with the hope of expanding its ability to handle character motivations. For the other feature, I made my first introduction of indirect objects to the Text Parser.

Acuitas has had the capacity to model individual goals for agents for a while. But this was something that had to be established ahead of time; the Narrative module couldn't take in top-level goals defined for a fictional character and store them in the temporary Narrative memory space. There were several elements to incorporating this:

*Getting Narrative to pick up on hints that help indicate whether an agent's described desire is an ultimate goal or an instrumental goal.
*Making it detect and store goal priority information (e.g. "he wanted X more than he wanted Y").
*Merging these stored goals into the goal model so they can be detected as motivations for instrumental subgoals

I also threw in some ability to model goal maximization. Up to this point, the Narrative module has considered goals as things that can be satisfied or unsatisfied - e.g. a state an agent wants to be in, or some singular deed it wants to accomplish. At any given moment in the course of the story, the goal is either achieved or not. A maximizing goal is something the agent wants to have as many times as possible, or to the greatest possible extent. It has a "score," but is never completed.

The endgame was to get this sentence to be somewhat meaningful:

"The <agent> wanted to be powerful more than the <agent> wanted any other thing."

Uh-oh.

On to the second project: including indirect objects in the Text Parser. I left them out initially because they can be a little tricky. Another noun appearing between a verb and a direct object might be an indirect object (as in "I gave the people bread"), but it might also be a "noun" functioning as an adjective (as in "I gave the wheat bread to them"). I guarantee the parser still doesn't perfectly distinguish these yet - sorting out all cases will probably take the application of common-sense reasoning and contextual clues. But it can already handle less ambiguous cases like "I gave the people a good show."

Despite the difficulties, it was time to get IOs in, because their absence has been something of a thorn in my side. I've been getting around it by substituting prepositional phrases, which has led to some awkward wording like "Graham asked of a troll where the chest was." I wouldn't say they're fully implemented  yet either - interactions with some other grammatical elements, notably conjunctions and dependent clauses, aren't totally ironed out. But at least the Parser can handle IOs in simpler sentences, and the rest of the text-processing chain is now set up to manage them also.

Indirect objects are surprisingly sparse in my parser benchmark datasets. I re-ran those and scored one new sentence. One.

Sentence diagram (Parser output) example from the "Out of the Dark" test set. There's some ambiguity in whether the phrase starting with "about" modifies "told" or "stories." I think either reading counts as correct.

In my diagram tool, I draw an arrow pointing from a direct object to the indirect object with which it is associated.

Until the next cycle,
Jenny

No comments:

Post a Comment