code wiki / (root) / nx_procgen_biome_test.nx

nx_procgen_biome_test.nx

buildroot/runtime/nx_procgen_biome_test.nx

4901 B129 linesdepth 6pulls 9 transitivereach 0 importersview sourcekind gate/prooftopic procgen
docsdependenciesstructsconstsfunctions

about

nx_procgen_biome_test.nx -- KATs for the P2 causal biome map. Exit 0 = all pass; first failing KAT's number is the exit code. KAT 1 determinism: same (heightmap, seed) twice -> identical maps. KAT 2 validity: every cell holds a sealed biome ID. KAT 3 lawfulness: grader BIOME_COHERENCE >= 12000 on a generated world (the R1 ladder target; lawful-by-construction, grader-proven). KAT 4 moisture works: a different moisture seed changes the map, and one map's MID band holds >= 2 distinct biomes. KAT 5 tamper RED: an all-ICE map scores LOW coherence (< 8000) -- the axis discriminates, it doesn't rubber-stamp. KAT 6 flat-map refusal path: range 0 builds valid biomes, no crash. KAT 7 every preset x 2 seeds: coherence >= 12000 (width, worst-case). KAT 8 elevation band function mirrors the grader's quartile cuts. license_tier: ORIGINAL

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_procgen_preset.nx nx_procgen_biome.nx nx_world_quality_grader.nx nx_procgen_biome_test.nx

imports: nx_syscalls.nxnx_tier.nxnx_procgen_preset.nxnx_procgen_biome.nxnx_world_quality_grader.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap nx_procgen_landscape 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 _perlin_hash_2d _perlin_dot_2d _perlin_grad_2d_x _perlin_grad_2d_y _perlin_ease _perlin_lerp nx_sig_compose 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 _pd_accept _pd_dist_sq nx_sig_peak_t nx_sig_ridge_t _sig_seg_d2 nx_sig_basin

structs

none

consts

23const BW: nx_int = 64
24const BH: nx_int = 64

functions

26func main() -> i64