nx_folkgame_play.nx
buildroot/runtime/nx_folkgame_play.nx
about
nx_folkgame_play.nx -- NATIVE terminal player for any align-family folk game. THE POINT OF THIS
ORGAN IS THAT IT CAN BE PLAYED, and the operator's own standing correction is why it exists:
an internal GREEN gate is not a thing anyone can open and play. Built by the Nishi toolchain
(nx_cc -> nxasm_x86, no gcc) to a NATIVE binary that runs on this host -- no WebAssembly, no
browser, no borrowed VM anywhere in the path.
usage: nx_folkgame_play <slug> [depth] slug is a section of knowledge/compare/folkgames.align
The opponent is full-width alpha-beta over the SAME move generator the gate validated against the
published Tic-Tac-Toe game-tree constant. It is not a second rules implementation: if it could
make a move the gate's generator does not admit, the two would disagree and this file would be
the duplicate-ruler defect.
Depth and evaluation weights are conf rows (knowledge/folkgames.conf), never literals.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 3 imports · 0 importers
imports: nx_folkgame_lib.nxnx_folkgame_ai_lib.nxnx_lineconf_lib.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
| 20 | const FGP_SPEC: *u8 = "knowledge/compare/folkgames.align" |
| 21 | const FGP_CONF: *u8 = "knowledge/folkgames.conf" |
| 22 | const FGP_LINECAP: i64 = 256 |
| 23 | const FGP_GRIDCAP: i64 = 4096 |
| 24 | const FGP_HUMAN: i64 = 1 |
| 25 | const FGP_AI: i64 = 2 |
| 26 | const FGP_SP: i64 = 32 |
| 27 | const FGP_DOT: i64 = 46 |
| 28 | const FGP_X: i64 = 88 |
| 29 | const FGP_O: i64 = 79 |
functions
| 31 | func fgp_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 32 | func fgp_num(v: i64) -> i64 |
| 51 | func fgp_render(base: i64) -> i64 |
| 93 | func fgp_render_ids(base: i64) -> i64 |
| 115 | func fgp_readline(buf: *u8, cap: i64) -> i64 called by 1: main |
| 135 | func fgp_ints(buf: *u8, n: i64, out: *i64) -> i64 called by 1: main |
| 158 | func fgp_streq(a: *u8, b: *u8) -> i64 called by 1: main |
| 168 | func main(argc: i64, argv: *i64) -> i64 |