code wiki / _hdl_build / nx_worldgen_tuner.nx

nx_worldgen_tuner.nx

buildroot/runtime/_hdl_build/nx_worldgen_tuner.nx

12125 B270 linesdepth 8pulls 12 transitivereach 0 importersview sourcekind orphan librarytopic worldgen
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_tier.nx nx_worldgen_tunelib.nx nx_worldgen_tuner.nx

imports: nx_syscalls.nxnx_tier.nxnx_worldgen_tunelib.nx

imported by: nobody (leaf or entry point)

structs

none

consts

23const K_MAGIC_1024: i64 = 1024
24const K_MAGIC_1228: i64 = 1228
25const K_MAGIC_1433: i64 = 1433
26const K_MAGIC_4096: i64 = 4096
27const K_MAGIC_4095: i64 = 4095

functions

29func 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 }
30func 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 }
31func tn_cat_n(dst: *u8, off: i64, v: i64) -> i64
45func tn_grid_len(knob: i64) -> i64
54func tn_grid_val(knob: i64, i: i64) -> i64
97func tn_report(logfd: i64, tag: *u8, ts: i64, knobs: *i64, grade: i64,
119func main() -> i64