nx_axisvar.nx
buildroot/runtime/nx_axisvar.nx
about
nx_axisvar.nx -- DOES THIS JUDGE'S AXIS ACTUALLY VARY? A per-axis distribution census over a whole
directory of renders, so a fitness built on those axes can be justified by measurement instead of
by three hand-picked examples.
nx_axisvar <dir> <prefix> <suffix> e.g. nx_axisvar /tmp bodyfit_ .png
WHY IT EXISTS, MEASURED 2026-08-14: a body-evolution run improved 3 points in 10 generations and
LOST to random search at equal budget. A 5-point sweep suggested the reason -- contour_axis sat at
its ceiling and face_axis was binary -- but five renders is not a population, and changing a shipped
fitness on five samples is the same error as tuning until a green appears. The search had already
written ~132 renders; this reads ALL of them.
★★★IT REPORTS NUMBERS, NOT A VERDICT. An uncalibrated classifier must publish its distribution and
let the reader judge. The ONE verdict it does emit is not a threshold but a FACT: an axis with
distinct==1 took the same value on every single input, so it cannot discriminate anything, and
including it in a mean dilutes every other axis while contributing nothing.
★NO SILENT CAPS. The directory walk LOOPS getdents64 until it returns 0 -- one call is a prefix of a
directory, not a listing, and publishing that prefix's count as a total is how a census becomes a
sample nobody knows is partial. The distinct-value table is bounded and says so when it overflows.
★A FAILED JUDGE IS COUNTED AND NAMED, never folded into the population: judged + failed must equal
matched, and the sum is printed so the partition can be checked.
exit 0 all matched files judged | 2 usage | 3 cannot open dir | 4 nothing matched | 5 some failed
license_tier: ORIGINAL. No hw writes (Rule 26).
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_tool_run.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
| 28 | const AV_NAXIS: i64 = 4 |
| 29 | const AV_DIRBUF: i64 = 262144 |
| 30 | const AV_OUTCAP: i64 = 65536 |
| 31 | const AV_JUDGE_TIMEOUT_MS: i64 = 60000 |
| 33 | const AV_MAXDISTINCT: i64 = 64 |
| 34 | const AV_JUDGE: *u8 = "/volume1/homes/elderwesto/nishihost/nx_charjudge.elf" |
| 36 | const AV_DIRENT_RECLEN_OFF: i64 = 16 |
| 37 | const AV_DIRENT_NAME_OFF: i64 = 19 |
functions
| 39 | func av_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 40 | func av_puts(s: *u8) -> i64 { sys_write(1, s, av_len(s)); return 0 } |
| 41 | func av_pn(v: i64) -> i64 |
| 54 | func av_rdint(b: *u8, pos: *i64, end: i64) -> i64 called by 1: av_field |
| 78 | func av_field(out: *u8, n: i64, key: *u8, found: *i64) -> i64 |
| 104 | func av_starts(name: *u8, pre: *u8) -> i64 called by 1: main |
| 113 | func av_ends(name: *u8, suf: *u8) -> i64 |
| 125 | func av_note(dist: *i64, dn: *i64, a: i64, v: i64) -> i64 called by 1: main |
| 137 | func av_axname(a: i64) -> *u8 called by 1: main |
| 144 | func main(argc: i64, argv: *i64) -> i64 |