code wiki / (root) / nx_folkgame_ai_lib.nx

nx_folkgame_ai_lib.nx

buildroot/runtime/nx_folkgame_ai_lib.nx

4443 B101 linesdepth 4pulls 4 transitivereach 2 importersview sourcekind librarytopic folkgame
docsdependenciesstructsconstsfunctions

about

nx_folkgame_ai_lib.nx -- THE OPPONENT, as a shared lib so there is exactly ONE of it. The player organ and the gate both import this. If the search lived in the player only, the gate could test it solely by forking the binary, mutation coverage would stop at the fork boundary, and a second copy would eventually drift from the first -- the duplicate-ruler defect this estate keeps paying for. It plays through fg_moves and fg_apply, the SAME generator the align gate validated against the published Tic-Tac-Toe game-tree constant. It is not a second rules implementation and must never become one: if this file could produce a move fg_moves does not admit, the two would disagree. Weights and depth are passed IN, never read here -- the caller owns the conf. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 1 imports · 2 importers

nx_folkgame_lib.nx nx_folkgame_ai_lib.nx nx_folkgame_align_gate.nx nx_folkgame_play.nx

imports: nx_folkgame_lib.nx

imported by: nx_folkgame_align_gate.nxnx_folkgame_play.nx

structs

none

consts

none

functions

16func fgai_eval(base: i64, pw: i64) -> i64
called by 1: fgai_search calls 2: fg_sidefg_count
60func fgai_best(base: i64, depth: i64, snap: *i64, sw: i64, mvb: *i64, mm: i64, scr: *i64, pw: i64, win: i64) -> i64
89func fgai_selfplay(base: i64, depth: i64, snap: *i64, sw: i64, mvb: *i64, mm: i64, scr: *i64, pw: i64, win: i64, maxplies: i64) -> i64