Multi-sensor fusion engine with confidence-weighted aggregation for FLUX agents.
flux-perception is a Rust crate implementing a sensor fusion engine — it takes readings from multiple sensors, each with their own weight, bias, and confidence, and produces a single FusedSignal representing the best estimate of reality.
Agents don't perceive the world through a single lens. flux-perception models how FLUX agents fuse noisy, contradictory inputs into coherent decisions:
flux-navigatefuses position estimates from multiple sourcesflux-compasscombines heading readings with sensor dataflux-evolveuses fused signals as fitness inputs for behavioral evolutionflux-trustcross-references perception confidence with trust scores
| Feature | Description |
|---|---|
| Weighted Fusion | Combines sensor values using confidence × weight averaging |
| Bias Calibration | Per-sensor bias correction via calibrate() |
| Confidence Threshold | Ignores sensors below a minimum confidence floor |
| Agreement Metric | agreement() returns 0.0–1.0 indicating how aligned sensors are |
| Variance Tracking | Reports spread/confidence of the fused signal |
| History | Tracks recent fused signals for trend analysis |
use flux_perception::Engine;
let mut engine = Engine::new(0.1); // confidence threshold
// Add sensors with different weights
engine.add_sensor(1, 1.0, 0.0); // high-weight primary
engine.add_sensor(2, 0.5, 0.0); // lower-weight secondary
// Feed readings
engine.update(1, 42.0, 0.95, 100);
engine.update(2, 44.0, 0.70, 100);
// Read fused signal
let fused = engine.read();
println!("Value: {:.1}, Confidence: {:.2}", fused.value, fused.confidence);
println!("Agreement: {:.2}", engine.agreement());
// Calibrate a sensor
engine.calibrate(2, -2.0); // correct systematic bias
engine.deactivate(1); // ignore a faulty sensorcargo build
cargo testflux-navigate— BFS pathfinding on 32×32 gridsflux-compass— Heading/orientation with spring-damper physicsflux-memory— Key-value store for caching sensor stateflux-trust— Bayesian trust scoringflux-evolve— Behavioral evolution engine
Part of the SuperInstance FLUX fleet.