code wiki / _hdl_build / nx_game_agent_gate.nx
nx_game_agent_gate.nx
buildroot/runtime/_hdl_build/nx_game_agent_gate.nx
about
nx_game_agent_gate.nx -- proves the NPC/enemy brain (perceive -> chase -> attack -> flee) actually
behaves, with the lane's discipline: anti-vacuity guards on every claim, a U-pocket maze tooth that a
GREEDY chaser provably jams in (so CHASE is real routing, not wishful adjacency), causal ATTACK events
(every one emitted at manhattan distance 1), and determinism across full replays.
MUTATION TARGET (documented): sever the LOS check in ag_tick (perceive through walls) => T2 wall-blind
tooth RED while the open-field teeth stay GREEN. license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_game_agent.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 27 | const W: i64 = 20 |
| 28 | const H: i64 = 14 |
functions
| 10 | func p(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 11 | func pn(v: i64) -> i64 |
| 25 | func nl() -> i64 { p("\n" as *u8); return 0 } |
| 30 | func world_border(wd: *i64) -> i64 |
| 38 | func main() -> i64 |