How it works
Inspectable research heuristics. Not clinical models. Not trading signals.
Pipeline
Computer-side only
- Mock neural engine synthesizes Engagement, Fatigue, Arousal, and Calibrated Confidence as mean-reverting channels with optional injections.
- Decision Quality folds those channels into one band and decides how much confirmation an order needs. It never auto-trades.
- Intent order construction uses sliders and discrete confirms that can later map to NeuralBridge intent vectors.
- Paper engine walks a handful of symbols and fills simulated tickets against cash and positions in the browser.
- Heuristic memory stores the state at fill time and, after a short mark-to-market, notes personal patterns without judging.
Engagement
Research proxy
engagement = clamp(OU(μ≈68, σ≈6) + inject + sessionDrift)
Mean-reverting synthetic channel. In a live adapter this would be a decoded focus / engagement feature, not raw EEG.
Fatigue
Research proxy
fatigue = OU(μ = 22 + 1.5*sessionMinutes, σ≈3); μ capped at 85
Slow accumulator so the demo can show degradation over a sitting. Not a medical fatigue index.
Emotional arousal / stress
Research proxy
arousal = clamp(OU(μ≈38, σ≈7) + stressInject)
Mid-range is treated as alert-but-settled. Extremes (very low or very high) reduce Decision Quality.
Calibrated confidence
Research proxy
confidence = clamp(OU(μ≈62, σ≈6) − 0.15*(arousal−50)_+ − overconfidenceInject)
Intended as a calibrated (not raw) confidence proxy. Overconfidence injection raises the number while Decision Quality still penalizes mismatch.
Arousal fitness (inverted-U)
Research proxy
fitness = 100 − 1.65 * |arousal − 38| (clamped 0–100)
Yerkes-Dodson-inspired research toy: moderate arousal supports quality; both flat and panicked states score worse.
Decision Quality score
Research proxy
score = 0.30*engagement + 0.28*(100−fatigue) + 0.22*arousalFitness + 0.20*confidence
Then banded High / Medium / Low. Forced to Caution on freeze, high fatigue, high arousal, or anomaly. Not a recommendation to trade.
Anomaly score
Research proxy
if max(|Δengagement|, |Δfatigue|, |Δarousal|, |Δconfidence|) ≥ anomalyDelta → spike; score = EMA of spike magnitude
Catches sudden extreme state changes (e.g. a decoder glitch or an injected shock). Research only.
Where a real BCI would plug in
Keep CognitiveState stable. Replace SyntheticCognitiveGenerator.next() with decoded features from NeuralBridge (see src/lib/adapter/neurabridge-stub.ts) and call ingestCognitive(). Order sliders already correspond to velocity_2d and confirm buttons to switch_binary / class_label.