Info detectors: activation, hold, and reset algorithms
This document lists all info-picture detectors, their numeric fields in InfoPicture, and three condition groups for each:
- Activation — when the detector becomes active (field ≠ 0).
- Hold — when the detector stays active.
- Reset — when the detector must return to 0.
General principles
- Detector values are integers (or floats for “levels”). Zero always means “inactive / not detected”.
- Each
InfoDet_updateXxx(...)ininfo_detectors.js:- takes parameters from the “information gathering” site (vitals, contexts, EM effects, waiting state, etc.);
- itself decides whether to set a non-zero value or reset to 0 from the three conditions.
- Callers must pass fresh data on every material change (pulse, OR, EM frame close, wait start/end, etc.), even when “nothing happened” — so the detector can reset itself.
Detectors are loosely grouped as:
- Snapshot (state) — can be recomputed from the current state snapshot (BadNormWell, BasicContextsActived, semantics, etc.).
- Event — capture a moment/fact in time (wait ended without answer, novelty spike, etc.). Hold and reset matter especially for these.
1. Comprehension mode, Theme, Situation
1.1. Target comprehension mode (main consciousness cycle + “Mode” cell)
- Source: main cycle
thinkingMode; UI —Consciousness_getMainCycleThinkingMode(). - Activation:
- When starting a reaction/automatism that needs target comprehension (e.g. OR with semantically salient stimulus or starting a comprehension cycle for
unsolved_problem): callInfoDet_updateTargetMode(true).
- When starting a reaction/automatism that needs target comprehension (e.g. OR with semantically salient stimulus or starting a comprehension cycle for
- Hold:
- While the target comprehension cycle runs or automatism consequence evaluation (waiting period) is active.
- Reset:
- When the target cycle ends (problem solved or deemed irrelevant) and no new target comprehension is needed →
InfoDet_updateTargetMode(false).
- When the target cycle ends (problem solved or deemed irrelevant) and no new target comprehension is needed →
1.2. Current theme (InfoPicture.themeId, “Theme” cell)
- Field:
themeId:0— no theme, >0 — theme image ID from the situations tree. - Activation:
- On each
SituationsTree_onPerceptionTreeActivated()call, best‑match ready theme image for current mode andtree.BaseID/EmotionID/ActivityID:- if a ready image exists (ready and score>0) →
InfoDet_updateCurrentTheme(themeId).
- if a ready image exists (ready and score>0) →
- On each
- Hold:
- While the current (Base, Emotion, Activity) combo stays closest to the same ready theme image.
- Reset:
- If on the next situations-tree activation:
- no ready images (all count ≤ 3),
- or no ready image yields non-zero score,
→InfoDet_updateCurrentTheme(0).
- If on the next situations-tree activation:
1.3. Current situation (InfoPicture.situationId, “Situation” cell)
- Field:
situationId:0— none, >0 — situation image ID from the situations tree. - Activation:
- In
SituationsTree_onPerceptionTreeActivated()a component vector is built from info-picture detector fields; among ready images pick best‑match:- if score>0 and ready=true →
InfoDet_updateCurrentSituation(situationId).
- if score>0 and ready=true →
- In
- Hold:
- While the current detector set stays closest to the same situation.
- Reset:
- On the next call, if:
- no ready situations for current mode,
- or score==0 for all,
→InfoDet_updateCurrentSituation(0).
- On the next call, if:
2. Vitals and basic contexts
2.1. Critical vital (InfoPicture.criticalVital, “Crit. vital” cell)
- Field:
criticalVital:0— no critical vital;>0— vital ID whose value is >70 and maximal among all.
- Activation:
- In
updateImportanceMetrics(badVitals)orgetActiveBasicContexts(cpuls):- scan
VitalsArrand find a vital withvalue > 70and maximum value; - if found →
InfoPicture.criticalVital = vitalId.
- scan
- In
- Hold:
- While repeated calls still have a vital with
value > 70; on “leader” change update detector to new ID.
- While repeated calls still have a vital with
- Reset:
- If on the next call no vital exceeds 70 →
criticalVital = 0.
- If on the next call no vital exceeds 70 →
2.2. Bad state (InfoPicture.badState, “Bad” cell)
- Field:
badState:0— not Bad,1— Bad (BadNormWell=1). - Activation:
- In
InfoDet_updateBadState(lastBadNormWell, badNormWell):- when
badNormWell === 1→badState = 1.
- when
- In
- Hold:
- While
BadNormWellstays 1.
- While
- Reset:
- On any
BadNormWell != 1in the next call →badState = 0.
- On any
2.3. Sudden worsening (InfoPicture.suddenChange, “Sudden chg.” cell)
- Field:
suddenChange:0— none;1— moment of switch to Bad (per PDF); a more detailed level may be stored.
- Activation:
- In
InfoDet_updateBadState(lastBadNormWell, badNormWell):- if
lastBadNormWell !== 1andbadNormWell === 1→suddenChange = 1.
- if
- In
- Hold:
- Event detector: may keep
1for one comprehension-cycle step or one/few pulses (your choice) if the event must be “seen”.
- Event detector: may keep
- Reset:
- On next call without another switch to Bad →
suddenChange = 0.
- On next call without another switch to Bad →
2.4. Play mode (InfoPicture.playMode, “Play” cell)
- Field:
playMode:0— off,1— Play basic context active. - Activation:
- In
getActiveBasicContextsafterBasicContextsActived:- if
BasicContextsActivedcontains contextid == 11→playMode = 1.
- if
- In
- Hold:
- While Play stays in
BasicContextsActived.
- While Play stays in
- Reset:
- On next call, if Play context inactive →
playMode = 0.
- On next call, if Play context inactive →
2.5. Learning mode (InfoPicture.learningMode, “Learning” cell)
- Field:
learningMode:0— off,1— learning mode active. - Activation:
- In
InfoDet_updateLearningAndSearch(BasicContextsActived, VitalsArr):- if basic context Curiosity (id=12) is active or vital “Interest” has
value > 70→learningMode = 1.
- if basic context Curiosity (id=12) is active or vital “Interest” has
- In
- Hold:
- While at least one holds (Curiosity or high Interest).
- Reset:
- With no Curiosity and Interest≤70 →
learningMode = 0.
- With no Curiosity and Interest≤70 →
2.6. Search interest (InfoPicture.searchInterest, “Search” cell)
- Field:
searchInterest:0— off,1— Interest vital >70. - Activation:
- In
InfoDet_updateLearningAndSearch:- if vital with Id “Interest” (agreed id, e.g. 10) has
value > 70→searchInterest = 1.
- if vital with Id “Interest” (agreed id, e.g. 10) has
- In
- Hold:
- While Interest>70.
- Reset:
- On next call when Interest≤70 →
searchInterest = 0.
- On next call when Interest≤70 →
2.7. Fear (InfoPicture.fear, “Fear” cell)
- Field:
fear:0— off,1— Fear basic context active. - Activation:
- In
getActiveBasicContexts:- if
BasicContextsActivedcontains context id=6 (Fear) →fear = 1.
- if
- In
- Hold:
- While Fear context stays active.
- Reset:
- On next call without id=6 →
fear = 0.
- On next call without id=6 →
2.8. Aggression (InfoPicture.aggression, “Aggression” cell)
- Field:
aggression:0— off,1— Aggression basic context active. - Activation:
- If
BasicContextsActivedcontains context id=7 (Aggression) →aggression = 1.
- If
- Hold:
- While Aggression context active.
- Reset:
- On next call without id=7 →
aggression = 0.
- On next call without id=7 →
2.9. Defense (InfoPicture.defense, “Defense” cell)
- Field:
defense:0— off,1— defense mode active. - Activation:
- If
fear == 1oraggression == 1→defense = 1.
- If
- Hold:
- While fear or aggression active.
- Reset:
- When
fear == 0andaggression == 0→defense = 0.
- When
3. Semantics and orientation reflex
3.1. Console stimulus (InfoPicture.consoleStimulus, “From console” cell)
- Field:
consoleStimulus:0— no stimulus;>0— winning stimulus imageFinalImageId.
- Activation:
- In
runOROnStimulusActivationafter choosingwinnerId:InfoDet_updateConsoleStimulus(winnerId).
- In
- Hold:
- May hold until next OR (last salient stimulus).
- Reset:
- On explicit absence of active stimuli (all cleared) or by policy on branch change:
- call
InfoDet_updateConsoleStimulus(0).
- call
- On explicit absence of active stimuli (all cleared) or by policy on branch change:
3.2. High semantic importance (InfoPicture.highSemanticImportance)
- Field:
highSemanticImportance:0— none;>0—meanImportanceunder current conditions. - Activation:
- In
orientation_reflex.jsaftersemWinner:- if
meanImportance > 0→highSemanticImportance = meanImportance.
- if
- In
- Hold:
- While current salient stimulus (
winnerId) and conditions (well, emotionId) unchanged.
- While current salient stimulus (
- Reset:
- On stimulus/context change (new OR) or no semantics →
highSemanticImportance = 0.
- On stimulus/context change (new OR) or no semantics →
3.3. High-importance object (InfoPicture.highImportanceObject)
- Field:
highImportanceObject:0— none;>0— salient image ID (FinalImageId) with |semantics|>5. - Activation:
- In
orientation_reflex.js:- if
Math.abs(meanImportance) > 5→highImportanceObject = winnerId.
- if
- In
- Hold:
- While same stimulus and conditions similar.
- Reset:
- On stimulus/context change or
|meanImportance| ≤ 5→highImportanceObject = 0.
- On stimulus/context change or
3.4. Image novelty (InfoPicture.imageNovelty)
- Field:
imageNovelty:0— none;>0— novelty value if above threshold. - Activation:
- In
orientation_reflex.jsafternovelty:- if
novelty > threshold(from code) →imageNovelty = novelty.
- if
- In
- Hold:
- Until next OR.
- Reset:
- On new OR when
novelty ≤ threshold→imageNovelty = 0.
- On new OR when
3.5. Conflicting semantics (InfoPicture.conflictingSemantics)
- Field:
conflictingSemantics:0— none;1— conflicting semantics detected. - Activation:
- Semantics analysis (understanding module) finds:
- mean importance near 0 with large
samplesCount, - under different conditions both sizable positive and sizable negative values.
- mean importance near 0 with large
- Then →
conflictingSemantics = 1.
- Semantics analysis (understanding module) finds:
- Hold:
- Until conflicting-semantics situation resolves.
- Reset:
- If next analysis shows no conflict signs →
conflictingSemantics = 0.
- If next analysis shows no conflict signs →
4. Action effects and automatisms
4.1. Positive / negative action effect (positiveActionEffect, negativeActionEffect)
- Fields:
positiveActionEffect:0or >0 — magnitude of last positive effect;negativeActionEffect:0or <0 — magnitude of last negative effect.
- Activation:
- In
closeLastFrame(episodic_memory.js) after computinglast.effect:- if
effect > 0→positiveActionEffect = effect,negativeActionEffect = 0; - if
effect < 0→negativeActionEffect = effect,positiveActionEffect = 0; - if
effect == 0→ both 0.
- if
- In
- Hold:
- Holds the last completed EM frame’s value.
- Reset:
- On a new frame without effect or explicit history reset → both = 0.
4.2. Negative motor automatism effect (negativeMotorEffect)
- Field:
negativeMotorEffect:0— none;<0— negative z during motor automatism waiting. - Activation:
- When a motor automatism fires and
z = getDiffImportance()is measured in the waiting period:- if
z < 0→negativeMotorEffect = z.
- if
- When a motor automatism fires and
- Hold:
- Until a new
zis taken for another motor automatism.
- Until a new
- Reset:
- On next measurement with
z >= 0or waiting ends without negative effect →negativeMotorEffect = 0.
- On next measurement with
4.3. Negative mental automatism effect (negativeMentalEffect)
- Same as motor, for automatisms started from comprehension (mental):
- if
z < 0in waiting →negativeMentalEffect = z, - on absence/completion → 0.
- if
4.4. Low automatism usefulness (lowAutomatismUsefulness)
- Field:
lowAutomatismUsefulness:0— none; |value| ≤ 1 — low usefulness. - Activation:
- On each new
effectSamplewritten to automatism usefulness:- if
0 < |effectSample| ≤ 1→lowAutomatismUsefulness = effectSample.
- if
- On each new
- Hold:
- Until the next sample shows a normal absolute effect (>1).
- Reset:
- When
|effectSample| > 1oreffectSample == 0→lowAutomatismUsefulness = 0.
- When
4.5. Suitable automatism found (foundSuitableAutomatism)
- Field:
foundSuitableAutomatism:0— none;1— comprehension cycle in target mode found and uses an automatism. - Activation:
- When a suitable automatism is chosen and started in target mode →
foundSuitableAutomatism = 1.
- When a suitable automatism is chosen and started in target mode →
- Hold:
- While the comprehension cycle keeps using that automatism.
- Reset:
- When the cycle ends or the automatism is abandoned →
foundSuitableAutomatism = 0.
- When the cycle ends or the automatism is abandoned →
5. Waiting and operator responses
5.1. No reaction to stimulus (noReactionToStimulus)
- Field:
noReactionToStimulus:0— none;1— no reaction to stimulus recorded. - Activation:
- In
EpisodicMemory_onPulse, whenlast.actionImageId === nulland waiting expired without reaction →noReactionToStimulus = 1.
- In
- Hold:
- Until the next wait starts or explicit reset.
- Reset:
- On reaction or starting a new wait →
noReactionToStimulus = 0.
- On reaction or starting a new wait →
5.2. Operator ignoring (operatorIgnoring)
- Field:
operatorIgnoring:0— none;1— operator ignored the action. - Activation:
- In
EpisodicMemory_onPulse, iflast.actionImageId != null(there was reaction/automatism) and waiting ended without response stimulus →operatorIgnoring = 1.
- In
- Hold:
- Until a response stimulus arrives in a new waiting period.
- Reset:
- In
orientation_reflex.js, on response stimulus during waiting (EpisodicMemory_isInWaitingPeriod):operatorIgnoring = 0.
- In
5.3. Operator answer received (operatorAnswerReceived)
- Field:
operatorAnswerReceived:0— none;1— operator answer received. - Activation:
- In
orientation_reflex.js, when OR fires during waiting and the frame closes with response stimulus →operatorAnswerReceived = 1.
- In
- Hold:
- Until the next waiting frame or explicit reset.
- Reset:
- On starting a new waiting period or processing the answer →
operatorAnswerReceived = 0.
- On starting a new waiting period or processing the answer →
5.4. Active answer waiting (activeWaitingAnswer)
- Field:
activeWaitingAnswer:0— none;1— automatism result waiting period active. - Activation:
- When creating an EM frame tied to an automatism (especially mental, started from comprehension) →
activeWaitingAnswer = 1.
- When creating an EM frame tied to an automatism (especially mental, started from comprehension) →
- Hold:
- While waiting is not finished (answer/timeout).
- Reset:
- On frame close (with or without answer) →
activeWaitingAnswer = 0.
- On frame close (with or without answer) →
5.5. Run of episodes without effect (seriesWithoutEffect)
- Field:
seriesWithoutEffect:0— none; >0 — length of latest run of frames witheffect == 0. - Activation / hold:
- EM logic increments on each closed frame with
effect == 0and clears on non-zero effect; on each length change callInfoDet_updateSeriesWithoutEffect(length).
- EM logic increments on each closed frame with
- Reset:
- On non-zero effect (
effect != 0) or explicit EM reset →seriesWithoutEffect = 0.
6. Comprehension and hard problems
These detectors depend on the comprehension cycle (conscience_level_2) and unsolved_problem handling.
6.1. Teacher learning (teacherLearning)
- Field:
teacherLearning:0— off;1— teacher-learning mode on. - Activation:
- When comprehension records an unsolved problem for a given image that stays unsolved through an uninterrupted attempt loop (several target-comprehension steps in a row).
- Hold:
- While “hand initiative to operator” mode runs: system tracks actions and elicits responses.
- Reset:
- On problem solved (operator answer or internal fix) or step limit reached →
teacherLearning = 0.
- On problem solved (operator answer or internal fix) or step limit reached →
6.2. Dissatisfaction with the status quo (dissatisfaction)
- Field:
dissatisfaction:0— none;1— dissatisfaction present. - Activation:
- When Calm basic context is active, no salient stimuli, and a passive-mode comprehension cycle finished (reached end without new ideas/changes).
- Hold:
- Until external conditions change or a new stimulus/interest appears.
- Reset:
- On new stimuli, context change, or target cycle start →
dissatisfaction = 0.
- On new stimuli, context change, or target cycle start →
6.3. Misunderstanding (misunderstanding)
- Field:
misunderstanding:0— none;1— misunderstanding state. - Activation:
- If comprehension reaches the end in target mode or iteration steps exceed a limit (e.g. 10) and the problem is unsolved.
- Hold:
- Until the cycle restarts with different conditions or the problem is solved.
- Reset:
- On problem solved or cycle restart with new configuration →
misunderstanding = 0.
- On problem solved or cycle restart with new configuration →
6.4. Doubt in default automatism (doubtInDefaultAutomatism)
- Field:
doubtInDefaultAutomatism:0— none;1— doubt present. - Activation:
- When level-2 comprehension starts in target mode for a branch where the default automatism gives ambiguous/unacceptable results.
- Hold:
- While level 2 considers alternatives to the default automatism.
- Reset:
- On choosing a new default or confirming the old →
doubtInDefaultAutomatism = 0.
- On choosing a new default or confirming the old →
6.5. Hard problem (hardProblem)
- Field:
hardProblem:0— none; >0 — difficulty level/counter for the image’s problem. - Activation / hold:
- Per image (stimulus/situation) count cases when:
unsolved_problemexists for that image,- target cycle ends without resolution,
- comprehension step count exceeds threshold.
- On each such case increment
hardProblemfor the current image and pass toInfoDet_updateHardProblem(level).
- Per image (stimulus/situation) count cases when:
- Reset:
- On problem solved (image marked resolved) → level cleared, image removed from “hard problems” list,
hardProblem = 0.
- On problem solved (image marked resolved) → level cleared, image removed from “hard problems” list,
This document defines target algorithms for all info detectors; InfoDet_update... implementations in info_detectors.js should follow these rules, and call sites in prepare.js, orientation_reflex.js, episodic_memory.js, conscience_level_2.js, etc. should pass the right parameters whenever relevant state changes.