Grand Diomande Research · Full HTML Reader

Anticipation Pipeline Diagram

```mermaid flowchart TB subgraph Input [Input: MotionWindow] MW[MotionWindow<br/>50 frames @ 50Hz] SF[SkeletonFrames<br/>27 bones × 50 frames] LF[LatentFrames<br/>Optional embeddings] Coverage[Coverage Check<br/>≥ 0.9 required] end

Agents That Account for Themselves architecture technical paper candidate score 32 .md

Full Public Reader

Anticipation Pipeline Diagram

Version: 2.0.0
Last Updated: 2025-01-01
Parent: [06-ANTICIPATION.md](../06-ANTICIPATION.md)

---

Complete Anticipation Pipeline

mermaid
flowchart TB
    subgraph Input [Input: MotionWindow]
        MW[MotionWindow<br/>50 frames @ 50Hz]
        SF[SkeletonFrames<br/>27 bones × 50 frames]
        LF[LatentFrames<br/>Optional embeddings]
        Coverage[Coverage Check<br/>≥ 0.9 required]
    end

    subgraph Validate [Validation Layer]
        NaN[NaN/Inf Check<br/>All values finite]
        Time[Time Bounds<br/>t_end > t_start]
        Bones[Bone Count<br/>= 27 (MOCOPI_BONE_COUNT)]
    end

    subgraph Features [Feature Extraction]
        subgraph Kinematic [Kinematic Features]
            Pos[Position Deltas<br/>Δp per frame]
            Vel[Velocity<br/>dp/dt]
            Acc[Acceleration<br/>dv/dt]
            Jerk[Jerk<br/>da/dt]
        end

        subgraph Latent [Latent Features]
            LatZ[Latent Z<br/>From LatentFrames]
            LatVel[Latent Velocity<br/>dz/dt]
        end

        subgraph Fusion [Feature Fusion]
            Embed[Regime Embedding<br/>64-256 dims]
            Constraint[Constraint Vector<br/>~8 dims]
            Deriv[Derivative Summary<br/>~8 dims]
        end
    end

    subgraph Scalars [Scalar Computation]
        subgraph Primary [Primary Scalars]
            C[Commitment<br/>∈ [0, 1]]
            U[Uncertainty<br/>∈ [0, 1]]
            TP[Transition Pressure<br/>∈ [-∞, +∞]]
        end

        subgraph Secondary [Secondary Scalars]
            RM[Recovery Margin<br/>∈ [0, 1]]
            PS[Phase Stiffness<br/>∈ [0, 1]]
            N[Novelty<br/>∈ [0, 1]]
            S[Stability<br/>∈ [0, 1]]
        end
    end

    subgraph Neighbors [Neighbor-Based (Optional)]
        HNSW[HNSW Query<br/>k nearest]
        Disp[Continuation Dispersion<br/>σ of next states]
        Blend[70/30 Blend<br/>neighbor + heuristic]
    end

    subgraph Output [Output: AnticipationPacket]
        Packet[AnticipationPacket<br/>schema_version: 0.1.0]
        Debug[DebugTrace<br/>Optional]
    end

    %% Flow
    MW --> SF & LF --> Coverage --> Validate
    NaN & Time & Bones --> Features

    Pos --> Vel --> Acc --> Jerk
    LatZ --> LatVel

    Jerk --> Embed
    Vel & Acc --> Constraint
    Jerk --> Deriv
    LatVel --> Embed

    Embed --> C & U
    Constraint --> C
    C & U --> TP
    Constraint --> RM
    Jerk --> PS
    Embed --> N
    LatVel --> S

    Embed --> HNSW --> Disp --> Blend --> U

    C & U & TP & RM & PS & N & S --> Packet
    Embed & Constraint & Deriv --> Packet
    Packet --> Debug

---

Scalar Computation Details

Commitment

Formula:

commitment = 1.0 - uncertainty * (1.0 - constraint_saturation)

Where `constraint_saturation` = how close to physical limits (joint angles, balance).

Interpretation: How irreversible the motion has become.

ValueMeaningSystem Response
0.0-0.3LowObserve, wait
0.3-0.6MediumPrepare response
0.6-0.8HighBegin execution
0.8-1.0Very HighFull commit

Uncertainty

Without neighbors (heuristic):

uncertainty = regime_embedding.variance() * (1.0 - directional_persistence)

With neighbors (MotionPhraseIndex):

dispersion = continuation_dispersion(neighbors)
neighbor_uncertainty = dispersion_to_uncertainty(dispersion)
uncertainty = 0.7 * neighbor_uncertainty + 0.3 * heuristic_uncertainty

Interpretation: How many plausible futures remain.

Transition Pressure

Formula:

dC = (commitment - prev_commitment) / dt
dU = (uncertainty - prev_uncertainty) / dt
transition_pressure = alpha * dC + (1 - alpha) * (-dU)

Where `alpha = 0.3` (configurable).

Interpretation: Rate at which futures are collapsing.

ValueMeaning
> 0.5Strong convergence
0.0-0.5Gentle convergence
-0.5-0.0Gentle divergence
< -0.5Strong divergence

---

Configuration

rust
pub struct AnticipationConfig {
    /// Minimum coverage to process [0, 1]
    pub min_coverage: f32,              // 0.9

    /// Regime embedding dimension
    pub regime_embedding_dim: usize,    // 64

    /// Constraint vector dimension
    pub constraint_vector_dim: usize,   // 8

    /// Derivative summary dimension
    pub derivative_summary_dim: usize,  // 8

    /// Transition pressure smoothing (α)
    pub transition_pressure_alpha: f32, // 0.3

    /// Emit debug traces
    pub emit_debug: bool,               // false
}

---

Invariants Enforced

IDInvariantCheck Location
INV-001DeterministicNo random seeds
INV-003Coverage ≥ 0.9Entry validation
INV-004Scalars in boundsPacket creation
INV-005Bone count = 27Frame validation
INV-007Schema versionDeserialization

---

Performance

MetricTargetAchieved
Latency< 2ms~1.5ms
Memory< 1MB~500KB
Allocations0 hot-pathPre-allocated

---

Navigation

  • Overview: [system-overview.md](system-overview.md)
  • Data Flow: [data-flow.md](data-flow.md)
  • Gesture Pipeline: [gesture-pipeline.md](gesture-pipeline.md)
  • Anticipation Docs: [06-ANTICIPATION.md](../06-ANTICIPATION.md)

Promotion Decision

Promote into a technical note or architecture paper with implementation anchors.

Source Anchor

Comp-Core/docs/architecture/diagrams/anticipation-pipeline.md

Detected Structure

Evaluation · Architecture