code wiki / (root) / nx_folkgame_race_gate.nx

nx_folkgame_race_gate.nx

buildroot/runtime/nx_folkgame_race_gate.nx

7862 B167 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic folkgame
docsdependenciesstructsconstsfunctions

about

nx_folkgame_race_gate.nx -- GATE for the race (track) family of nx_folkgame_race_lib. THE LOAD-BEARING TOOTH IS T2/T3: the opening pip count is 167 PER SIDE. That is a published constant of the game -- two checkers 24 points from home, five 13, three 8, five 6 -- not a number this estate picked. It is checked for BOTH players because a single side proves almost nothing: an off-by-one in the track indexing, a reversed direction, or a pip formula that reads the wrong end would still let ONE side total 167 by luck. Both sides landing on it at once pins the direction, the indexing and the formula together. T6 IS THE OTHER HALF: a race is not deterministic but a REPLAY of one must be. The randomiser's seed lives inside the saved position, so the same seed must produce the same sequence -- and a SECOND seed must produce a different one, or the tooth would pass on a die that always returns the same face. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 2 imports · 0 importers

nx_folkgame_race_lib.nx nx_gate_verdict.nx nx_folkgame_race_gate.nx

imports: nx_folkgame_race_lib.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ fg_parse_named_file sys_mmap ↻ fg_read_spec sys_mmap ↻ ep_artifact_path sys_openat_rd sys_close ep_join fg_puts sys_write ↻ sys_read_file sys_openat_rd ↻ sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close ↻ fg_parse_named fg_parse_named_at fg_lineend

structs

none

consts

17const FGRG_SPEC: *u8 = "knowledge/compare/folkgames.race"
19const FGRG_PIP: i64 = 167
20const FGRG_TRACK: i64 = 24
21const FGRG_PIECES: i64 = 15
25const FGRG_SEED_A: i64 = 20260827
26const FGRG_SEED_B: i64 = 99999937
27const FGRG_ROLLS: i64 = 64
28const FGRG_PLIES: i64 = 200

functions

30func fgrg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: main
32func main() -> i64