code wiki / _hdl_build / nx_actbench.nx
nx_actbench.nx
buildroot/runtime/_hdl_build/nx_actbench.nx
about
nx_actbench.nx -- I3: THE PHYSICAL-PLAUSIBILITY RULER. (beyond-metahuman plan, Phase 0 instruments.)
★★★WHY THIS EXISTS, AND IT IS A MEASURED REASON RATHER THAN A PREFERENCE. The field published the
number that convicts our whole instrument set: "Beyond MPJPE: A Physics-Based Audit of Monocular 3D
Human Pose Estimation" (PhysHuman @ CVPR 2026) reports that the geometric standard MPJPE and the
physical composite PHYSSCORE are correlated at only SPEARMAN rho = 0.37, WITH RANK REVERSALS -- the
temporal method WHAM ranks 3rd on MPJPE and 1st on physical plausibility. Every ruler this program
owns -- nx_twinbench (mm), nx_bodybench (geometry MIN), nx_facemark (placement), nx_curvebench --
is GEOMETRIC. So a body of ours can score well on all of them and still be physically impossible,
and nothing we own could see it. This organ is the missing axis.
★WHAT IT IS NOT: invented teeth. The first draft of this rung was going to assert energy decay and
replay determinism -- both fine properties, both MINE. runtime/nx_pose_benchmark_audit.nx exists
precisely to convict that move, grading every claim MECHANICAL vs SELF-VALIDATED vs
INDUSTRY-MEASURED, and its standing verdict is "ZERO industry benchmarks is the honest truth". So
the channels below are the PUBLISHED ones (PHYSSCORE's six; definitions from the PhysDiff/EDGE
lineage and PhyMotion arXiv:2605.14269), not the ones that were convenient to write.
★A RULER IS A FUNCTION OF A TRACE. PHYSSCORE operates on joint positions and needs NO GROUND TRUTH,
which is the property that matters here: it can score a GENERATED being. That is what makes it
usable on the creature/fantasy half, where there is no cadaver dragon to compare against.
So this organ takes a trace + a skeleton and scores it. It is coupled to no generator.
★★CHANNEL 4 READS THE SKELETON'S OWN EMITTED TABLE. nx_skelgen writes "B <bone> <len> <lo> <hi>";
this reads those rows. There is therefore NO SECOND CONSTRAINT TABLE to drift from -- the exact
failure nx_skelgen itself documents (a fix applied to one of two tables is a bug with a good alibi).
⚠★DECLARED SUBSTITUTION, because an undeclared one is a lie: PHYSSCORE measures penetration and
float against the lowest MESH VERTEX. We measure against the lowest JOINT. A joint is inboard of the
surface, so our penetration UNDER-reports and our float OVER-reports by roughly a limb radius. The
number travels with that caveat in-band, every call.
⚠★AND THE FIELD ITSELF SAYS THERE IS NO STANDARD PARAMETER SET ("various methods may employ
disparate parameter choices and even design distinct evaluation approaches"). So every threshold
this organ uses is EMITTED IN THE OUTPUT. A plausibility number quoted without its thresholds is
not comparable to anyone else's, including our own last run.
nx_actbench score <trace> <skel.dat>
nx_actbench selftest
license_tier: ORIGINAL expect_exit: 0 No hw writes (Rule 26).
dependencies 1 imports · 0 importers
imports: nx_gate_verdict.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 42 | const AB_MAGIC_65536: i64 = 65536 |
| 43 | const AB_MAGIC_4096: i64 = 4096 |
| 44 | const AB_MAGIC_1523: i64 = 1523 |
| 49 | const AB_MAXF: i64 = 512 |
| 50 | const AB_MAXJ: i64 = 64 |
| 51 | const AB_MAXC: i64 = 32 |
| 53 | const AB_CST: i64 = 6 |
| 55 | const AB_MAXS: i64 = 32 |
| 56 | const AB_SST: i64 = 3 |
| 59 | const AB_CAPSAMP: i64 = 16 |
| 60 | const AB_MAXB: i64 = 24 |
| 61 | const AB_MODE: i64 = 420 |
| 65 | const AB_GTOL: i64 = 5 |
| 68 | const AB_CONTACT: i64 = 40 |
| 70 | const AB_FOOTHALF: i64 = 60 |
| 71 | const AB_SCALE: i64 = 1024 |
| 72 | const AB_PERMIL: i64 = 1000 |
| 73 | const AB_DEG: i64 = 180 |
| 75 | const AB_FXB: i64 = 20 |
| 76 | const AB_COS1: i64 = 1048416 |
| 77 | const AB_SIN1: i64 = 18300 |
| 78 | const AB_ONE20: i64 = 1048576 |
| 80 | const AB_E_OPEN: i64 = 3 |
| 81 | const AB_E_CAP: i64 = 4 |
| 82 | const AB_E_EMPTY: i64 = 5 |
functions
| 84 | func ab_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 85 | func ab_pn(v: i64) -> i64 called by 1: ab_score |
| 94 | func ab_streq(a: *u8, b: *u8) -> i64 called by 1: main |
| 99 | func ab_iabs(v: i64) -> i64 { if v<0 { return 0-v } return v } called by 1: ab_gate |
| 104 | func ab_isqrt(v: i64) -> i64 |
| 115 | func ab_costab() -> *i64 |
| 132 | func ab_acos(cv: i64, t: *i64) -> i64 |
| 145 | func ab_isdig(c: i64) -> i64 { if c>=48 { if c<=57 { return 1 } } return 0 } called by 1: ab_tok |
| 147 | func ab_tok(b: *u8, n: i64, p: *i64, out: *i64) -> i64 |
| 175 | func ab_nextline(b: *u8, n: i64, p: *i64) -> i64 |
| 188 | func ab_vidx(f: i64, j: i64, ax: i64) -> i64 { return (f*AB_MAXJ + j)*3 + ax } |
| 197 | func ab_seg_dist(ax: i64, az: i64, bx: i64, bz: i64, px: i64, pz: i64) -> i64 |
| 216 | func ab_hull(cx: *i64, cz: *i64, n: i64, hx: *i64, hz: *i64) -> i64 called by 1: ab_com |
| 265 | func ab_hull_dist(hx: *i64, hz: *i64, h: i64, px: i64, pz: i64) -> i64 |
| 299 | func ab_pt_seg3(ax: i64, ay: i64, az: i64, bx: i64, by: i64, bz: i64, |
| 324 | func ab_seg_seg3(ax: i64, ay: i64, az: i64, bx: i64, by: i64, bz: i64, |
| 345 | func ab_gpen(V: *i64, nf: i64, nj: i64, out: *i64) -> i64 |
| 378 | func ab_float(V: *i64, nf: i64, nj: i64, out: *i64) -> i64 |
| 409 | func ab_skate(V: *i64, nf: i64, E: *i64, ne: i64, out: *i64) -> i64 |
| 458 | func ab_jlimit(V: *i64, nf: i64, C: *i64, nc: i64, BLO: *i64, BHI: *i64, t: *i64, out: *i64) -> i64 |
| 514 | func ab_smooth(V: *i64, nf: i64, nj: i64, out: *i64) -> i64 |
| 552 | func ab_com(V: *i64, nf: i64, nj: i64, E: *i64, ne: i64, out: *i64) -> i64 |
| 609 | func ab_linked(a: i64, b: i64, JP: *i64) -> i64 called by 1: ab_selfpen |
| 616 | func ab_selfpen(V: *i64, nf: i64, S: *i64, ns: i64, JP: *i64, out: *i64) -> i64 |
| 672 | func ab_load_skel(path: *u8, BLO: *i64, BHI: *i64, JP: *i64) -> i64 |
| 717 | func ab_load_trace(path: *u8, V: *i64, E: *i64, C: *i64, S: *i64, cfg: *i64) -> i64 |
| 797 | func ab_vbytes() -> i64 { return AB_MAXF*AB_MAXJ*3*8 } |
| 800 | func ab_score(tpath: *u8, spath: *u8) -> i64 |
| 886 | func ab_wr(path: *u8, b: *u8, n: i64) -> i64 |
| 893 | func ab_app(b: *u8, p: *i64, s: *u8) -> i64 |
| 898 | func ab_appn(b: *u8, p: *i64, v: i64) -> i64 |
| 910 | func ab_v(b: *u8, p: *i64, f: i64, j: i64, x: i64, y: i64, z: i64) -> i64 |
| 922 | func ab_fixture(path: *u8, nf: i64, slide: i64, sink: i64, kneez: i64, jitter: i64) -> i64 |
| 944 | func ab_gate() -> i64 |
| 1212 | func main(argc: i64, argv: *i64) -> i64 |