code wiki / _hdl_build / nx_breeder_arena_gate.nx

nx_breeder_arena_gate.nx

buildroot/runtime/_hdl_build/nx_breeder_arena_gate.nx

11381 B214 linesdepth 6pulls 15 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_breeder_arena_gate.nx -- proves the COMPOSED loop is a game: a player moving in a real world with collision, wilds that hunt him, duels that resolve, capture that preserves identity, and breeding that pays off -- winnable AND losable, bit-deterministic, with the world's invariants intact all run. This is the gate that EARNS the gamebench physics-collision flip; without it that flip would be a claim. MUTATION TARGET (documented): make the player invulnerable (BA_LOSS_HP=0) => the reckless policy can no longer lose => stakes collapse => nx_game_depth caps the score below SHALLOW => T2 and T6 RED. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_breeder_arena.nx nx_game_depth.nx nx_breeder_arena_gate.nx

imports: nx_syscalls.nxnx_breeder_arena.nxnx_game_depth.nx

imported by: nobody (leaf or entry point)

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

main p sys_write newG sys_mmap ba_words ba_run sys_mmap ↻ wd_bytes wd_words ba_world_build wd_init wd_set_wall wd_in en_bytes en_words en_init en_o_gen en_o_alive en_cap en_o_dense en_cap ↻ en_o_pos en_cap ↻ en_o_free en_cap ↻ ag_species_default brd_species_default ag_scratch_words ba_words ↻ ac_spawn wd_wall wd_in ↻ wd_occ wd_in ↻ en_spawn en_freelen en_o_free ↻ en_o_free ↻ en_cap ↻

structs

none

consts

29const K: i64 = 4 // strategies scored by the depth critic (2 hunt, 2 reckless)

functions

12func p(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: nlmain calls 1: sys_write
13func pn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
27func nl() -> i64 { p("\n" as *u8); return 0 }
called by 1: main calls 1: p
31func newG() -> *i64 { return sys_mmap(ba_words() * 8) as *i64 }
called by 1: main calls 2: sys_mmapba_words
32func newBT() -> *i64 { let b: *i64 = sys_mmap((1 + 512*BRD_BEAT_STRIDE) * 8) as *i64; b[0] = 0; return b }
called by 1: main calls 1: sys_mmap
33func newEV() -> *i64 { let e: *i64 = sys_mmap((1 + 512*EV_STRIDE) * 8) as *i64; e[0] = 0; return e }
called by 1: main calls 1: sys_mmap
35func main() -> i64