V · Systems / CHAPTER 66
lucy — SoftAcc / Score measuring
github.com/openfluke/welvet/lucy✅
Why it exists
Adaptation benches (test41-w, tide, live_gpt) need one shared measuring math — SoftAcc, Availability, AdaptPct, Score — not three copies of the formulas.
What it is
Pure measuring package: SoftAcc / SoftAccProb, Window + Snapshot, Finalize. No datasets, no train loops. Sine scale 0.10; classification SoftAccProb scale 1.0. Density / synthetic-organism board is §69.
SoftAcc = 100 × (1 − |pred−target| / scale) clamped [0,100] Availability = InferMs / (InferMs + TrainMs) × 100 Score = Throughput × Availability × Acc / 10_000 Acc = hard argmax % (AvgAccuracy) — the Acc pillar AdaptPct = mean SoftAcc in AdaptWindows after each switch
tide/metrics re-exports this package for existing tide callers.
Engine tests for lucy live under w2a/tests/lucy.
AAI Lucy benches (private tree, replace → public Welvet): test41 native cam, test48 credit sweep, test50 23-mode FP32 race.
Harness is not an engine package. Pulse math is this chapter. Density board: §69.
Modes + equations: §67. Cameral sandwiches: §68.
Go example
cd welvet/examples/66-lucy && source ../env.sh && go run .package main
import (
"fmt"
"github.com/openfluke/welvet/lucy"
)
func main() {
a := lucy.SoftAccOne(0.72, 0.80) // sine scale 0.10
p := lucy.SoftAccProb(0.91, 1.0) // class scale 1.0
var snap lucy.Snapshot
snap.AvgAccuracy = 80
snap.SoftAcc = a
snap.InferMs = 8
snap.TrainMs = 2
snap.Throughput = 12000
lucy.Finalize(&snap, lucy.Options{AdaptWindows: 10})
fmt.Printf("soft=%.1f class=%.1f avail=%.1f score=%.0f\n",
a, p, snap.Availability, snap.Score)
}
Output
soft=20.0 class=91.0 avail=80.0 score=7680