← Back to the demo list
Episodic Memory — Full Cycle (Mock)
episodic_memory.js · abstract_images.js
Current Image
After the orientation reflex, the winner stimulus (actual_stimul_ID / FinalImageId) is held in the hippocampus and the awareness context. The EM frame is attached to this image and to the active perception-branch node.
Chain of Stages
1
EM Frame — call save_episodic_memory after OR: the frame is opened, effect === null, and diffBefore is saved.
2
Action — when a reflex fires, EpisodicMemory_setLastFrameActionFromActionId writes the action image (OD) into the frame.
3
Waiting — a pulse counter until response_waiting_period (default 15); progress bar in the UI.
4
End of Waiting — the operator reply stimulus or a timeout in EpisodicMemory_onPulse.
5
Zeros in the Rule — for an incomplete frame episodicFrameFillRuleZerosForIncompleteClose: empty OD/reply fields become 0.
6
effectclamp(diffAfter − diffBefore) in [−10, +10] inside closeLastFrame.
7
AbstractionsAbstractImages_cloneFromEpisodeFrame: perception clones and (if OD is non-zero) action clones.
Frame Fields (Training)
FieldOpen FrameAfter Close
stimulusImageIdFinalImagesame
actionImageIdOD or nullnumber or 0
responseStimulusImageIdnull / replynumber or 0
effectnull−10…+10
Waiting Period
Operator-reply waiting progress

Duration is in pulses, not setTimeout — the logic is in EpisodicMemory_onPulse.

Abstractions After Close
On every closeLastFrame, AbstractPerceptionImages clones are updated for the pair (branch node, stimulus); if OD is non-zero, AbstractActionImages is updated as well. In semanticStructure, episodic/teacher rules are stored for later consciousness levels.
Perception
(perceptionNodeId, stimulusImageId)
Action
if actionImageId ≠ 0