Tuesday, April 30, 2024

Acuitas Diary #71 (April 2024)

This past month, I started adding proper support for "issue trees," a feature whose absence has pained me as I've worked on the Narrative and Game Engines. Problems and goals seem to naturally exist in a hierarchy: any problem spawns a plan for solving it, which can contain new tasks or subproblems that require their own solutions, and so on until one reaches atomic actions that can be performed without issue. The Narrative understanding code already included some procedures for inferring extra issues from those explicitly stated in a story. But after they were created, no connection was maintained between parent and child issues.

Star Trek still of a Borg cube floating in space. Caption says, "It's been a busy week."

As an example of the type of difficulty Acuitas could get into by not keeping record of issue relationships: sometimes issues get overcome by events. A subgoal is rendered invalid if the parent goal it serves is unexpectedly realized via some other method. Such a situation appeared in the Tron story. Flynn's primary goal is to obtain a metadata file which proves that he, not Dillinger, was the creator of several video games. (In my simplified version of the story, I rendered this as "Flynn wanted his videogames.") He tries to do this by disabling the Master Control Program and hacking into the Grid - a subgoal the MCP thwarts by "digitizing" him. After Flynn helps defeat the MCP through his adventures inside the Grid, the file he wanted simply prints out. So technically Flynn never completes his hacking attempt; he no longer needs to. In my original version of the story, I had to gloss over this by never actually stating that Flynn wanted to, or planned to, hack the Grid. If I did, Acuitas would treat this unfulfilled subgoal as either a loose end or an ultimate win for the villains, denying the story a fully happy ending.

So my work included adding the proper tree relationships, plus some code that would enforce the recursive cascade of issue deactivation when a problem is solved or a goal realized, and testing to be sure this worked correctly in Narrative and didn't break anything in the Game Engine. As part of this I made an inane test story to isolate the kind of scenario I had in mind:

"Michael was a human."
"Michael was hungry."
"Michael decided to eat food."
"But Michael did not have food."
"Michael was in a room."
"A table was also in the room."
"An apple was on the table."
"Michael decided to get the apple."
"But then Sarah walked into the room."
"Sarah had a pizza."
"Sarah gave the pizza to Michael."
"Michael ate the pizza."
"The end."

I first got this story working: once Sarah comes through with the pizza, the subgoal of picking up the apple properly deactivates, and the story is considered finished. Then I revised "Simple Tron" slightly, to be more like the version I first wrote, which registers hacking the Grid as one of Flynn's subgoals. This also completed with a recognized "good ending" and no loose ends.

I have also been pushing hard to get that previously-mentioned knowledge representation refactoring finished. I got to the point of bringing the reformatted semantic database online and moving a lot of changes into the live code - but I did not quite get it finished, so if the Acuitas codebase were a business, it would have "pardon our dust" signs everywhere. He can at least read stories without crashing, and get through a rudimentary "Hello, my name is ..." conversation, but there are a lot of bugs for me to clean up yet. I'm planning to revise the Conversation area soon anyway, though, so maybe it's okay?

Until the next cycle,
Jenny

No comments:

Post a Comment