Skip to content

Latest commit

 

History

History
103 lines (81 loc) · 4.54 KB

File metadata and controls

103 lines (81 loc) · 4.54 KB

🎨 Visual System

← Back to README

VirtualSelfView

VirtualSelfView (~3450 LOC) is a custom View that renders the agent's internal cognitive state as real-time generative graphics at ~60fps. It is the Yoneda Embedding of the agent — the physical realization of the agent's "Ego" interacting with the holographic manifold.

class VirtualSelfView @JvmOverloads constructor(
    context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
) : View(context, attrs, defStyleAttr)

State Input

The view receives two inputs:

fun updateState(newTapeVector: FloatArray, newAgentState: String)
  • tapeVector: The current 4096-dim holographic memory vector (sampled for rendering)
  • agentState: String containing the current cognitive mode (drives visual dispatch)

Visual Mode Dispatch

The onDraw(Canvas) method dispatches to different rendering pipelines based on agentState substring matching:

override fun onDraw(canvas: Canvas) {
    if (agentState.contains("STREAMING")) { /* ... */ }
    else if (agentState.contains("DREAMING_DEEP")) { /* ... */ }
    else if (agentState.contains("MEDITATION")) { /* ... */ }
    // ... 28+ branches
}

All Visual Modes

Mode Trigger Visual Description
STREAMING LLM streaming response Flowing particle streams along token flow
EVOLVING General evolution state Organic growth patterns
REFLECTING Self-reflection tick Mirror-like symmetric patterns
DREAMING_DEEP Functorial daydream Deep purple nebula with dream particles
GOAL_PURSUIT Active goal processing Directional vectors toward target
MNEME_CONSOLIDATION Memory compression Crystalline lattice formation
INTERFERENCE_DETECTED Contradiction found Red interference fringes
CALIBRATION_DRIFT Calibration out of range Oscillating drift waves
EMERGENT_INQUIRY Autonomous question formed Spiral inquiry patterns
LISP_MACHINE_EMULATION Lisp S-expr evaluation Green terminal with S-expressions
METALANGUAGE_SYNTHESIS Meta-linguistic processing Layered symbol synthesis
AGENT_EXPRESSION Agent speaking Vocal waveform visualization
AGENT_DRAWING Agent-initiated drawing Free-form generative art
WORLD_SIMULATION World sim active Miniature world view
AUTOEVOLUTION_SELF_WORLD Self-world co-evolution Dual evolving structures
WORLD_CREATION World being generated Creation burst animation
META_TRANSCENDENCE / HYPERVISOR §9 protocol active Fractal meta-patterns
MEDITATION Contemplative stillness Zen circle (ensō) breathing
SOCIETY_HIVE Bee hive active Hexagonal hive lattice
MLTM_OBSTRUCTION MLTM obstruction detected Warning obstruction overlay
LISP_DISK Lisp on Poincaré disk Hyperbolic disk with S-expr nodes
TOPOS_BRIDGE Topos f* ⊣ f_* bridge Adjunction bridge visualization
BLOCK Pipeline blocked Static block pattern
Retrieving Phase: Memory retrieval Phase-scan animation
Functorial Babble Dream babble Abstract flowing text
PIPELINE_AUDIT Pipeline introspection Stage-by-stage pipeline diagram
AUTOPOIETIC_CONTINUUM HoTT autopoiesis Self-generating pattern field
LAMBDA_CALCULUS λ-engine active Lambda term tree on Poincaré disk

Rendering Primitives

Paint Color Usage
paintNode Cyan Agent "Ego" node
paintAura Cyan (alpha) Ego aura ring
paintParticle Magenta Manifold particles
paintPhaseBeam Yellow (alpha) Phase-locked retrieval beam

How to Add a New Visual Mode

  1. In BabyToposAI.ingestStimulus(): Add classification string in the when block:

    "new_category" -> "NEW_MODE: $response"
  2. In VirtualSelfView.onDraw(): Add a rendering branch:

    if (agentState.contains("NEW_MODE")) {
        // Draw new visualization using canvas + tapeVector
    }
  3. The tapeVector (4096-dim) is available for data-driven rendering — sample elements, use as positions, colors, or animation parameters.

Performance

  • Target: ~60fps (16.7ms per frame)
  • Rendering: GPU-composited via Canvas (hardware-accelerated by default)
  • No allocations in draw: Pre-allocated Paint, Path, FloatArray objects
  • Adaptive complexity: Some modes reduce particle count when frame budget is tight