nx_folkgame_ai_lib.nx
buildroot/runtime/nx_folkgame_ai_lib.nx
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
imports: nx_folkgame_lib.nx
imported by: nx_folkgame_align_gate.nxnx_folkgame_play.nx
structs
| none |
consts
| none |
functions
| 16 | func fgai_eval(base: i64, pw: i64) -> i64 |
| 25 | func fgai_search(base: i64, depth: i64, alpha: i64, beta: i64, snap: *i64, sw: i64, mvb: *i64, mm: i64, scr: *i64, d: i64, pw: i64, win: i64) -> i64 |
| 60 | func fgai_best(base: i64, depth: i64, snap: *i64, sw: i64, mvb: *i64, mm: i64, scr: *i64, pw: i64, win: i64) -> i64 |
| 89 | func fgai_selfplay(base: i64, depth: i64, snap: *i64, sw: i64, mvb: *i64, mm: i64, scr: *i64, pw: i64, win: i64, maxplies: i64) -> i64 |