Ternsig - TernarySignal Foundation
The foundational crate that unlocked a new way of thinking about neural learning. TernarySignals (polarity + magnitude) replace floating-point weights entirely.
Core Components
- TernarySignal: The fundamental unit (polarity ∈ {-1,0,+1}, magnitude ∈ 0-255)
- TensorISA: Hot-reloadable neural network instruction set (.tisa.asm files)
- Adaptive Learning: Mastery learning - 23ms updates, 90% accuracy threshold
- Thermogram Integration: Persistent weight storage with temperature lifecycle
Three-Tier Learning System
- Tier 1 (Priors): Offline instinct creation via mastery learning
- Tier 2 (Coordination): SNN + neuromodulators gate learning
- Tier 3 (Runtime): Continuous 23ms adaptive refinement
Design Principles
- No floats: All weights are TernarySignal (2 bytes each)
- CPU-only: Integer arithmetic, no GPU required
- Persistent: All weights use thermograms (survive crashes)
- Hot-reloadable: .tisa.asm files define network architecture
Example
use ternsig::{TernarySignal, TensorInterpreter, assemble};
// Load chip definition
let program = assemble(include_str!("onset.tisa.asm"))?;
let mut interpreter = TensorInterpreter::new(&program)?;
// Forward pass with ternary weights
interpreter.set_input(&input_signals);
interpreter.execute()?;
let output = interpreter.get_output();