code wiki / _hdl_build / nx_playtest_creature.nx
nx_playtest_creature.nx
buildroot/runtime/_hdl_build/nx_playtest_creature.nx
about
nx_playtest_creature.nx -- a SOVEREIGN AUTOMATED PLAYTESTER (the Google/DeepMind-style "agents actually play the
game" tooling, built hardware-rung-up). It drives nx_creature_game BLACK-BOX (only cg_status/cg_nlegal/
cg_observe/cg_step -- no privileged internals), across many seeds x two policies (RANDOM exploration + a
HEURISTIC player), checking INVARIANTS every step (state stays valid, a legal move always exists while ongoing,
the game always TERMINATES). Then it renders an HONEST verdict that CAN FAIL: a game is PLAYABLE only if 0
invariant violations, 0 hangs/softlocks, it is WINNABLE under good play, AND it has real fail states + skill
depth (heuristic beats random). If this fails, our game ecosystem is not delivering a real game yet. license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_creature_game.nxnx_syscalls.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
| 10 | const N_MAGIC_1103515245: i64 = 1103515245 |
| 11 | const N_MAGIC_12345: i64 = 12345 |
| 12 | const N_MAGIC_32767: i64 = 32767 |
| 13 | const N_MAGIC_2654435761: i64 = 2654435761 |
| 15 | const N_SESS: i64 = 64 |
functions
| 17 | func w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 18 | func wn(v: i64) -> i64 { var m: i64=v; if m<0{w("-" as *u8);m=0-m} let t:*u8=sys_mmap(24); var k:i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i:i64=0; let o:*u8=sys_mmap(24); while i<k{o[i]=t[k-1-i];i=i+1} sys_write(1,o,k); return 0 } |
| 19 | func pol_rng(b: *i64) -> i64 { var x: i64 = b[0]; x = x*N_MAGIC_1103515245 + N_MAGIC_12345; b[0]=x; return (x >> 16) & N_MAGIC_32767 } called by 1: pt_session |
| 22 | func pt_inv(o: *i64, nlegal: i64, status: i64) -> i64 called by 1: pt_session |
| 35 | func pt_session(seed: i64, policy: i64, vbox: *i64) -> i64 |
| 63 | func pt_run(policy: i64, base: i64, r: *i64, vbox: *i64) -> i64 |
| 74 | func main(argc: i64, argv: *i64) -> i64 |