Skip to main content

corescout_selfmodel/
lib.rs

1//! `Z(t)`: how the machine behaves.
2//!
3//! ```text
4//! prediction    M(t-k:t)        ->  M_hat(t + dt)     with uncertainty
5//! anomaly       M(t)            ->  how surprising is this
6//! ```
7//!
8//! # Prediction before optimisation
9//!
10//! This crate improves nothing and chooses nothing. It watches, forms claims,
11//! and is scored on how wrong it was. A system that cannot predict its own
12//! next state has no business acting on itself, and prediction error is the
13//! only honest measure of whether the mirror carries enough signal to be worth
14//! having.
15//!
16//! The central metric is deliberately **skill against a hard baseline**, not
17//! absolute error. Most cells of a mirror barely move between consecutive
18//! reflections, so copying the last value scores extremely well; any model
19//! that does not clearly beat that has learned nothing, however small its
20//! error looks.
21//!
22//! # Uncertainty is part of the output
23//!
24//! A prediction without a confidence is unusable by a controller: it cannot
25//! tell the difference between "move the thread, I am sure" and "move the
26//! thread, I am guessing". Every [`predictor::Prediction`] carries an interval
27//! and a confidence derived from how well the model has been doing lately on
28//! that specific cell, not from a global average.
29//!
30//! # What this crate cannot see
31//!
32//! It depends on `corescout-mirror`, `corescout-memory` and
33//! `corescout-represent`, and on nothing that touches hardware. Everything it
34//! knows came through the reflection.
35
36pub mod anomaly;
37pub mod predict;
38pub mod predictor;
39pub mod uncertainty;
40
41pub use anomaly::{Anomaly, AnomalyDetector, Surprise};
42pub use predict::{evaluate, CellScore, PredictionReport};
43pub use predictor::{Prediction, SelfModel, StatePrediction};
44pub use uncertainty::{Confidence, Interval};