code wiki / _hdl_build / nx_worldgen_tuner_test.nx

nx_worldgen_tuner_test.nx

buildroot/runtime/_hdl_build/nx_worldgen_tuner_test.nx

5765 B124 linesdepth 8pulls 12 transitivereach 0 importersview sourcekind gate/prooftopic worldgen
docsdependenciesstructsconstsfunctions

about

nx_worldgen_tuner_test.nx -- KATs for the verdict-targeted tuner machinery (nx_worldgen_tunelib). Gate module: /tmp-only side effects (the real tuner's durable banking is exercised by its live runs, not here -- a gate beat must never mutate team state). Exit 0 = all pass; first failing KAT's number is the exit code. KAT 1 conf parse: ints, negatives, missing-key fallback. KAT 2 refine-axis string parse (the banked verdict's form). KAT 3 axis mapping: every refine axis -> a verdict offset; FLATNESS value inverted (lower flat = higher score). KAT 4 score is lexicographic: one grade step beats any axis value. KAT 5 eval determinism: same (preset, density, knobs) -> identical 12-slot verdicts. KAT 6 the knob does its job: detail_amp 140 raises LOCAL_VARIATION vs detail_amp 0 (same preset/density -- the ADD_DETAIL claim at tuner level). KAT 7 knob banking round-trip: write a /tmp conf, tl_load_knobs reads it back exactly; missing file falls back to preset defaults. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_worldgen_tunelib.nx nx_worldgen_tuner_test.nx

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

main tl_conf_get tl_conf_get_refine tl_conf_find_val tl_word_at tl_axis_offset sys_mmap tl_axis_value tl_axis_offset ↻ tl_score tl_axis_value ↻ tl_health tl_eval sys_mmap ↻ tl_compose_world nx_procgen_landscape_cfg nx_procgen_preset_is_valid _preset_octaves _preset_persistence_q10 _preset_base_radius _apply_density nx_perlin_alloc sys_mmap ↻ _perlin_lcg_step sys_mmap ↻ _fill_heightmap nx_perlin_fbm_2d nx_perlin_2d nx_sig_compose_cfg _sig_n_peaks _sig_peak_radius _sig_peak_amp _sig_argmin sys_mmap ↻ nx_poisson_disk_sample sys_mmap ↻ nx_prng_init nx_prng_next _pd_cos _pd_sin

structs

none

consts

none

functions

24func main() -> i64