ChimeraBot_garage: M5 — probe scheduler, advisory wiring, G6 ablation ON/OFF, G5 interventional eval

This commit is contained in:
2026-10-07 00:33:31 +02:00
parent da9a66aab8
commit 6a3ba390ee
10 changed files with 944 additions and 5 deletions
+24 -1
View File
@@ -7,7 +7,7 @@
##
## Run: from ChimeraBot_garage/src, `nimble test`.
import std/[math, strutils]
import std/[math, strutils, os]
import chimera/dsl
import chimera/oracle
@@ -26,6 +26,11 @@ block:
echo "G1: oracle convergence over the M2 kernel set (T* = ", TStar, " ticks)"
echo " ", align("kernel", 16), align("idTick", 8), align("posterior", 11),
align("censor", 8)
# Persist the FULL 12-kernel table to a committed artifact, so the answer to
# "did every kernel converge?" no longer depends on log truncation (the M2/M3
# reports lost rows to tail-cut logs). Deterministic: every column is a pure
# function of the kernel set + fixed oracle env.
var rows: seq[string]
for i in 0 ..< kernels.len:
let r = runG1(kernels, i, env, TStar)
let idStr = if r.idTick < 0: " NEVER" else: align($r.idTick, 8)
@@ -39,6 +44,24 @@ block:
check("G1 " & r.kernel & " identified within T*", ok,
"idTick=" & $r.idTick & " posterior=" & formatFloat(r.finalPosterior,
ffDecimal, 4))
rows.add "| " & r.kernel & " | " &
(if r.idTick < 0: "never" else: $r.idTick) & " | " &
formatFloat(r.finalPosterior, ffDecimal, 5) & " | " &
formatFloat(r.censorRate, ffDecimal, 4) & " | " &
(if ok: "PASS" else: "FAIL") & " |"
let artPath = currentSourcePath().parentDir.parentDir /
"benchmarks" / "g1_oracle_table.md"
createDir(artPath.parentDir)
writeFile(artPath,
"# G1 oracle-convergence table\n\n" &
"Auto-generated by `tests/test_oracle_g1.nim` (deterministic; regenerate with " &
"`nimble test`). T* = " & $TStar & " ticks, threshold = " &
formatFloat(Threshold, ffDecimal, 2) & ", env = default synthetic arena " &
"(800x600, no sensor error). A PASS means posterior(kernel) reached the " &
"threshold within T*.\n\n" &
"| kernel | idTick | finalPosterior | censorRate | pass |\n" &
"|---|---:|---:|---:|---|\n" & rows.join("\n") & "\n")
echo " table written: ", artPath
block:
echo ""