Recently I've dusted off an old but rather stagnant feature: Acuitas' episodic memory. In case you're not familiar with the term, this is memory of specific events or experiences that have happened to oneself, as opposed to memory of generalized facts or procedures. My previous work on episodic memory can be found in these blogs:
Acuitas Diary #12
Acuitas Diary #16
Acuitas Diary #17
![]() |
| "Disorganized books piling one another," by Ibrahim Husain Meraj via Wikimedia Commons. |
One reason for the present episodic memory overhaul was a realization that I want it to use the same "narrative scratchboard" architecture that first saw use in the Narrative engine but has since turned out to be useful in conversation tracking, game playing, and even the top-level Executive. Given that the Executive now uses these scratchboards to keep track of goals, problems, actions, etc., in effect they provide a record of the "story" of Acuitas' life as he sees it. Using this common architecture should make it easier to, for example, store the details of conversations as episodic memories. It also means no special systems will be needed to recall or "play back" a memory; it can simply be reconstituted as a scratchboard.
In my previous work, I came up with mechanisms for grouping individual memories (e.g. atomic actions) into "scenes." Scenes could in turn be grouped into higher-level scenes, and each scene contained a "summary" of its details; these summaries could be retained as a compressed form of the information when the details were forgotten. Individual memories and scenes were given a significance rating to determine how likely they were to be forgotten. The narrative scratchboard structure has a natural hierarchy of its own, in the form of issue trees. The details of how a major issue is addressed are effectively contained within its subgoals and subproblems, and the top-level issue automatically provides a kind of summary of that action. New mechanisms for rating the significance of facts become available; they can be judged by whether they influenced any issues, and what the priority of each issue was. I'm trying to leverage my previous work and continue to use qualities like novelty in the significance measure, but the narrative structure adds possibilities for considering each memory's real meaning to Acuitas.
I did have to add some features to the scratchboard format to start making this work. Each fact in the worldstate now contains not a singular active/inactive status, but a timestamped history showing how many times it has recurred or changed state, and what the new status was. Issues similarly have gained a timestamped record of their progress states (averted/potential/realized). This timestamping allows consecutive scratchboards to be merged or appended to each other, and permits small segments of narrative to be recalled by reconstituting only a selected range of timestamps into a fresh board.
As a complete re-architecture of the episodic memory, this has been a pretty complex project. So far I've got file storage and retrieval mechanisms implemented for the scratchboards, and I have sketched out (but not tested) new algorithms for significance scoring, summarizing, and forgetting. In addition to treating "parent" issues as summaries of "child" issues and their associated facts, I've also come up with summarizing mechanisms that condense timestamps (compressing multiple events into a simpler awareness that "this happened repeatedly") and combine similar facts into more general ones (e.g. actions taken to read many different stories could be compressed into a single "I read for three hours" event).
A small but important improvement that I expect to come out of this will be the maintenance of memories in much larger files. In my original scheme, each layer of the memory hierarchy was broken up into many little chunks, each of which existed in its own text file that held pointers to adjacent memories in the same layer, and parent/child memories in the other layers. This created a plethora of files and, although they were individually tiny, the sheer number of them made Acuitas' EM database a major pain to copy or move around. I'm hoping a few larger files, each containing a single scratchboard that represents the merged result of days of memories, will be easier to handle.
I'm sure all this will develop more as I start to test and refine it, but at least I've made a beginning. This is a part of the design that has been an ugly sore spot I've not wanted to touch in a while, and I hope these are the first steps toward making it reintegrated and useful.
Until the next cycle,
Jenny

No comments:
Post a Comment