Math at a Glance
This is the single-page cheat sheet for the intelligence layer. Every technique that appears in FrankenTUI’s runtime decisions is listed here with its consuming subsystem, canonical formula, and the performance property it buys. Use this table as a navigation hub — each row links to the full explanation.
For the motivation behind the whole layer, see intelligence/overview.
Bayesian inference
| Technique | Where used | Core formula | Performance impact |
|---|---|---|---|
| Bayes factors | Command-palette scoring | Better ranking with fewer re-sorts | |
| Evidence ledger | Explanations for probabilistic decisions | Debuggable, auditable scoring | |
| Log-BF capability probe | Terminal-capability detection | Robust detection from noisy probes | |
| Log10-BF coalescer | Resize-scheduler evidence ledger | Explainable, stable resize decisions | |
| Bayesian hint ranking | Keybinding-hint ordering | Stable, utility-aware hints | |
| Beta-Binomial | Diff-strategy selection | with binomial updates | Avoids slow strategies as workload shifts |
| Bayesian height predictor | Virtualized-list preallocation | + conformal | Fewer scroll jumps |
Change detection and sequential testing
| Technique | Where used | Core formula | Performance impact |
|---|---|---|---|
| BOCPD | Resize coalescing | Run-length posterior + hazard | Fewer redundant renders during drags |
| Run-length posterior | BOCPD core | recursion | Fast regime switches without thresholds |
| E-process | Budget alerts, throttle | Safe early exits under continuous monitoring | |
| GRAPA | Adaptive e-process | Self-tuning sensitivity | |
| CUSUM | Budget change detection | Fast drift detection | |
| CUSUM hover stabilizer | Mouse hover jitter | Stable hover targets without lag | |
| Alpha-investing | Sequential FDR | (wealth process) | Bounded false-alert rate across monitors |
Conformal prediction
| Technique | Where used | Core formula | Performance impact |
|---|---|---|---|
| Vanilla conformal | Risk bounds | Stable thresholds without tuning | |
| Mondrian conformal | Frame-time risk gating | per bucket | Safe budget gating with sparse data |
| Conformal rank confidence | Command-palette stability | (gap-based p-value) | Deterministic tie-breaks, stable top-k |
Value of information and sampling
| Technique | Where used | Core formula | Performance impact |
|---|---|---|---|
| VOI sampling | Expensive measurements | Lower overhead in steady state |
Control theory and scheduling
| Technique | Where used | Core formula | Performance impact |
|---|---|---|---|
| PID / PI | Degradation control | Smooth frame-time stabilisation | |
| MPC (evaluation) | Controller check | Confirms PI is sufficient | |
| SOS barrier | Admissible-region proof | Constant-time safe/unsafe classification | |
| Jain’s fairness | Input guard | Prevents rendering from starving input | |
| Smith’s rule + aging | Queueing scheduler | Fair throughput under load |
Data structures with statistical guarantees
| Technique | Where used | Core formula | Performance impact |
|---|---|---|---|
| Count-Min Sketch | Width cache, timeline aggregation | Fast approximate counts | |
| W-TinyLFU admission | Width-cache admission | admit iff (doorkeeper → CMS) | Higher hit rate, fewer recomputes |
| PAC-Bayes | Sketch calibration | Tighter error bounds | |
| Fenwick tree | Virtualized lists | Prefix sums with | scroll + height queries |
| Summed-area table | Tile-skip diff | Skip empty tiles on large screens | |
| S3-FIFO cache | Hot-key cache | Small (10%) + Main (90%) + Ghost FIFOs | Scan-resistant, better than LRU/ARC at lower overhead |
Visual effects (deterministic math)
| Effect | Core equation | What it produces |
|---|---|---|
| Metaballs | , iso-surface | Smooth, organic blob fields |
| Plasma | Psychedelic interference bands | |
| Gray-Scott | Reaction-diffusion morphogenesis | |
| Clifford attractor | Strange-attractor filaments | |
| Mandelbrot / Julia | (escape-time colouring) | Fractal boundaries + deep zooms |
| Lissajous / harmonograph | Phase-locked curves | |
| Flow field | Particle ribbons | |
| Wave interference | Multi-source ripples | |
| Spiral galaxy | Logarithmic-spiral starfields | |
| Spin lattice (LLG) | Magnetic-domain dynamics |
Animation and UI dynamics
| Technique | Where used | Core formula | Performance impact |
|---|---|---|---|
| Damped spring | Animation transitions | Natural motion without frame-rate artefacts | |
| Easing curves | Fade/slide timing | , , cubic variants | Predictable velocity shaping |
| Staggered cascade | List animations | Coordinated, non-uniform entrances | |
| Sine pulse | Attention pulses | Smooth 0→1→0 emphasis | |
| Perceived luminance | Dark/light probe | Reliable theme defaults |
Cross-cutting summaries
| Technique | Where used | Core formula | Performance impact |
|---|---|---|---|
| Rough-path signatures | Workload fingerprinting, regression detection | Reparameterisation-invariant trace comparison | |
| Incremental view maintenance | Derived-state updates | Signed deltas + bilinear join rule + 50% fallback | Derived views updated in |
Using this table
- Each row linking to an explanation page is a live link; hover to see the preview, click to read the full motivation, math, worked example, Rust interface, and debugging notes.
- Rows without links describe techniques whose primary explanation
lives elsewhere (data-structure pages under
/reference, effect pages under/extras, animation under/style). They are included here for completeness so the full mathematical surface of FrankenTUI is visible in one place. - The “performance impact” column is deliberately qualitative. Hard
numbers are in the individual pages’ worked examples and in the
benchmark reports referenced by
/testing/benchmark-gate.
If a decision in FrankenTUI surprises you, grep this table for
the subsystem. The corresponding intelligence page will have the
evidence-sink event name and a jq one-liner. That’s usually a
one-minute path from “huh?” to “oh, I see exactly why.”
Cross-references
- Intelligence overview — the narrative introduction to why this table exists.
/operations/frame-budget— the operator-facing view of the same machinery./reference/telemetry-events— the schema of the evidence sink’s event catalog.