code wiki / (root) / nx_procgen_signature_test.nx

nx_procgen_signature_test.nx

buildroot/runtime/nx_procgen_signature_test.nx

5023 B151 linesdepth 5pulls 7 transitivereach 0 importersview sourcekind gate/prooftopic procgen
docsdependenciesstructsconstsfunctions

about

nx_procgen_signature_test.nx -- KATs for the P1 composed-primitives signature features. Exit 0 = all pass; first failing KAT's number is the exit code (loud, names the failure). KAT 1 peak apex: center cell rises by exactly amp (d2=0 term). KAT 2 peak reach: a cell beyond radius is untouched. KAT 3 ridge symmetry: cells mirrored across the segment move equally. KAT 4 valley is ridge negated: same geometry, opposite sign. KAT 5 cliff is antisymmetric: left side up, right side down. KAT 6 compose determinism: same (seed,preset) twice -> identical maps. KAT 7 compose moves EXTREMES: graded ext after >= before on the same fbm base (the P1 gate axis, proven at module level). license_tier: ORIGINAL

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_procgen_signature.nx nx_world_quality_grader.nx nx_perlin.nx nx_procgen_signature_test.nx

imports: nx_syscalls.nxnx_tier.nxnx_procgen_signature.nxnx_world_quality_grader.nxnx_perlin.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 t_fill_zero nx_sig_peak nx_sig_peak_t nx_sig_ridge nx_sig_ridge_t _sig_seg_d2 nx_sig_valley nx_sig_ridge ↻ nx_sig_cliff _sig_seg_d2 ↻ t_fill_fbm nx_perlin_alloc sys_mmap ↻ _perlin_lcg_step 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 ↻

structs

none

consts

21const TW: nx_int = 64
22const TH: nx_int = 64

functions

24func t_fill_zero(hm: *nx_int, n: nx_int) -> nx_int
called by 1: main
30func t_fill_fbm(hm: *nx_int, seed: nx_int) -> nx_int
44func main() -> i64