code wiki / _hdl_build / nx_game_depth.nx

nx_game_depth.nx

buildroot/runtime/_hdl_build/nx_game_depth.nx

4540 B91 linesdepth 2pulls 2 transitivereach 4 importersview sourcekind librarytopic game
docsdependenciesstructsconstsfunctions

about

nx_game_depth.nx -- the MECHANICAL-DEPTH critic. nx_game_critic measures whether a frame LOOKS rich; this measures whether the GAME PLAYS deep -- because a beautiful frame on a trivial click-loop is still a toy. Depth is not asserted from the rules; it is MEASURED from OUTCOMES: run K distinct strategies and see whether they DIVERGE. A shallow game funnels every strategy to the same win (spread ~0, nothing is at stake). A deep game rewards good play and punishes bad -- strategies spread out, and a careless one can LOSE. That divergence is depth you can measure, and it is exactly what the current click-to-sell loop LACKS (you always win). Verdict SHALLOW/BASIC/DEEP. LIB. license_tier: ORIGINAL

dependencies 1 imports · 4 importers

nx_syscalls.nx nx_game_depth.nx nx_breeder_arena_gate.nx nx_drift_engine.nx nx_game_depth_gate.nx nx_game_redteam_gate.nx

imports: nx_syscalls.nx

imported by: nx_breeder_arena_gate.nxnx_drift_engine.nxnx_game_depth_gate.nxnx_game_redteam_gate.nx

structs

none

consts

10const GD_N: i64 = 4
11const GD_M_SPREAD: i64 = 0 // outcome spread across strategies (permil of the best)
12const GD_M_STAKES: i64 = 1 // are BOTH win and loss reachable? (real consequence)
13const GD_M_DIVERSE: i64 = 2 // distinct outcome buckets / K (strategies genuinely differ)
14const GD_M_DET: i64 = 3 // determinism: fraction of strategies that REPLAY identically. Skill games
17const GD_SHALLOW: i64 = 300
18const GD_BASIC: i64 = 550

functions

23func gd_score(scores1: *i64, scores2: *i64, results: *i64, k: i64, out: *i64) -> i64
called by 4: mainmainmainmain calls 1: sys_mmap
66func gd_cap(v: i64, target: i64, weight: i64) -> i64
called by 1: gd_quality
76func gd_quality(out: *i64) -> i64
called by 4: mainmainmainmain calls 1: gd_cap
87func gd_verdict(score: i64) -> *u8
called by 4: mainmainmainmain