code wiki / _hdl_build / nx_worldgen_tuner.nx
nx_worldgen_tuner.nx
buildroot/runtime/_hdl_build/nx_worldgen_tuner.nx
about
nx_worldgen_tuner.nx -- TEAM-OWNED verdict-targeted knob tuner
(operator 2026-06-10 "build the team's capabilities to handle your
callouts"). The refine loop auto-files a verdict row NAMING a weak
axis; this organ picks that assignment up MECHANICALLY:
read knowledge/status/worldgen_best.conf (preset, density, axis)
coordinate-descend the generator's exposed knobs
(river_depth, rill_depth, rill_radius, detail_amp)
score = (worst-of-seeds grade, named-axis value) lexicographic
bank winner -> knowledge/status/worldgen_knobs.conf (+ /tmp copy)
on banked-knobs CHANGE -> auto-file one arc=PROCGEN pm row
nx_worldgen_refine consumes the banked knobs each beat, so the tuned
metric IS the gate metric. Verdict -> assignment -> tune -> re-verdict:
the loop is closed with the 8-axis grader as referee, no LLM anywhere.
TUNER lines -> stdout + /tmp/nishi_worldgen_tuner.log.
Exit 0 = tuned (banked best >= starting score), 1 = regression refused.
license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_tier.nxnx_worldgen_tunelib.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
| 23 | const K_MAGIC_1024: i64 = 1024 |
| 24 | const K_MAGIC_1228: i64 = 1228 |
| 25 | const K_MAGIC_1433: i64 = 1433 |
| 26 | const K_MAGIC_4096: i64 = 4096 |
| 27 | const K_MAGIC_4095: i64 = 4095 |
functions
| 29 | func tn_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } calls 1: sys_write |
| 30 | func tn_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off+i] = s[i]; i = i + 1 } return off + i } |
| 31 | func tn_cat_n(dst: *u8, off: i64, v: i64) -> i64 |
| 45 | func tn_grid_len(knob: i64) -> i64 called by 1: main |
| 54 | func tn_grid_val(knob: i64, i: i64) -> i64 called by 1: main |
| 97 | func tn_report(logfd: i64, tag: *u8, ts: i64, knobs: *i64, grade: i64, |
| 119 | func main() -> i64 |