Temporal Field
A ring buffer with decay and pub/sub events for cognitive architectures.
The brain does not poll - one spark cascades.
Architecture: Field / Writer / Reader
The system separates into three roles:
- Field - The substrate: ring buffer with decay
- Writers - Anything that writes to regions (cochlea, tokenizer, motor, etc.)
- Readers - FieldObservers that receive events when thresholds cross
Multiple writers can write to the same field (additive semantics). Multiple readers can subscribe to the same field (pub/sub). Writes automatically fire events to all readers when thresholds cross.
Example: Multimodal Binding Detection
This example shows the pattern used for concept grounding - detecting when audio and text patterns co-occur (e.g., hearing "door" while seeing the word).
use ;
use Arc;
// Region definitions (like SensoryField's ModalityRegions)
const AUDIO_REGION: Range = 0..64;
const TEXT_REGION: Range = 64..128;
// 1. Create the Field (the substrate)
let config = new; // 128 dims, 50 frames, 0.95 retention
let mut field = new;
// 2. Configure monitored regions (what triggers events)
field.monitor_region;
field.monitor_region;
field.set_convergence_threshold; // Fire when 2+ regions active
// 3. Subscribe Reader (binding detector)
field.subscribe;
// 4. Writers write to their regions
// Cochlea writes audio features
let audio_features = vec!;
field.write_region;
// Tokenizer writes text embedding
let text_embedding = vec!;
field.write_region;
// ^ This triggers Convergence event because both regions are now active
// 5. Time advances - decay happens automatically
field.tick; // All values decay by retention factor
Key Insight
The field doesn't know what audio or text means. It just knows that patterns co-occurred within a temporal window. Meaning emerges from the binding.
Core Concepts
| Concept | Description |
|---|---|
| Ring buffer | Fixed memory, oldest frames auto-evicted |
| Decay per tick | Time encoded in values, not metadata |
| Regions | Spatial partitioning for multi-channel integration |
| Pub/sub | Writes fire events to observers automatically |
| Additive writes | Multiple writers can contribute to same frame |
Events
| Event | Fires When |
|---|---|
RegionActive |
A monitored region crosses above its threshold |
RegionQuiet |
A monitored region drops below its threshold |
Convergence |
N or more regions are simultaneously active |
The Floating Ternary Foundation
Each dimension encodes direction + intensity using signed bytes:
Range: {-1.00 ... 0.00 ... +1.00}
Storage: i8 (-100 to +100) for 2 decimal precision
This is NOT discrete ternary {-1, 0, +1}. It's floating-point ternary - the polarity indicates direction, the magnitude indicates strength.
Applications
| Field Type | Purpose | Configuration |
|---|---|---|
| SensoryField | Cross-modal pattern integration | 320 dims, 500ms window |
| ConvergenceField | Mesh output integration | 64 dims, 100ms window |
| InterlocutorField | Connection salience tracking | 8 dims, 1.4s half-life |
| PlanField | Active plan salience | 8 dims |
| EffectorField | Output pathway warmth | 8 dims |
All share the same substrate - only configuration differs.
Evolution
FloatingTernary → Temporal Binding Fields → Temporal Fields
One system that evolved. Every write triggers downstream processing.
License
MIT OR Apache-2.0