Conscious automatisms and the awareness process — implementation strategy

Document to prepare the next stage: conscious automatisms and the awareness process. The old implementation was in Go (OLD_CODE); the new JS stack already has stronger adaptive systems — avoid dragging obsolete patterns into the new code, but keep the conceptual frame.


0. Project purpose and scope

Purpose: the project is not “a working creature and raising it”, but the most adequate way to implement the theory of individual adaptivity. As theories are formalized mathematically, adaptivity theory is best described by a program — an analogue of math in physics, but more effective for describing the circuitry of adaptive systems.

Out of scope for the new implementation:


1. Where we are now (JS)

Hooks for awareness and automatisms already exist:

Component Purpose
OR Pick the most salient stimulus, block reflex for 2 pulses, call hippocampus, stimuls_consciousness(actual_stimul_ID), save EM.
Hippocampus active_stimulsArr_ID, actual_stimul_ID — hold the stimulus that triggered OR.
_9_Conscience stimuls_consciousness(actual_stimul_ID) — stub; called from OR on a new winner and on response stimulus during EM waiting. Natural place to hang the “awareness process”.
Perception tree 6 levels, terminal node = conditions; binding reflexes/automatisms to a branch is already described.
EM Frame: conditions (perceptionNodeId), stimulus, action, effect, response stimulus — ready context for comprehension.
AI Action images; stimulus → action link already exists.
CR Conditioned reflexes by context (BadNormWell + emotion) and FinalImageId.

So: a channel to the “cortex” exists (stimuls_consciousness call), context can be built from tree, EM, and AI. Missing: an explicit “conscious automatism” model and an “awareness process” loop (what this channel processes).


2. Recommendation: lean on the new stack; old code is concept only

If the OLD_CODE folder is available (next to the project or another repo), it helps to:


3. Possible shape of a “conscious automatism” in the new stack

Without relying on old code, a draft format:

Then:


4. Possible shape of the “awareness process”

Next implementation steps could be staged, for example:

  1. Widen the stimuls_consciousness call with context (tree, EM, OR/EM flags).
  2. Define the “conscious automatism” data structure and storage (array + persistence, like CR/EM).
  3. Introduce an awareness loop: from context pick candidate automatisms, optionally run through “awareness”, execute chosen action (via existing effectors/AI).

5. Summary


6. Mapping to OLD_CODE (Go) — after loading the old implementation

The OLD_CODE folder holds the old implementation (Go + console). Below: distilled concepts and flows for idea transfer to JS, without copying code.

6.1 Automatism tree (Go)

6.2 Awareness process (Go)

6.3 Automatism in Go

6.4 Take from OLD_CODE as ideas only

6.5 Recommended order in JS

  1. Extend stimuls_consciousness: pass context (terminalNodeId, lastEpisodeFrame, isResponseStimulus).
  2. Add conscious automatism store: bind to perceptionNodeId (and optional stimulusImageId), actionImageId, usefulness/belief flags.
  3. In stimuls_consciousness by context: find automatism by node; if found and “default” — run action (via AI/effectors); if not — stub for future “thinking loop” or simple choice by Rules (EM).
  4. Reflex link: if a successful automatism exists for the node, do not start conditioned/genetic reflex (as in Go: automatism blocks reflex).
  5. If needed add per-pulse “thinking dispatcher” (simplified dispetchConsciousnessThinking) for a queue of unresolved situations.

Details of old structures (Automatizm, cycleInfo, infoFunc*) can be checked in OLD_CODE/GO/brain/psychic/ when needed.