code wiki / (root) / nx_dr_elo_cli.nx

nx_dr_elo_cli.nx

buildroot/runtime/nx_dr_elo_cli.nx

3879 B81 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind tooltopic dr
docsdependenciesstructsconstsfunctions

about

nx_dr_elo_cli.nx -- the callable MCP/API surface for the sovereign Elo tournament ranker (DR-1). Feeds pairwise-critique match outcomes through the deterministic integer Elo engine and emits the ranking as JSON. Any caller -- a research conductor (DR-4), the Reflection/Critic (DR-2), a workstream, a session -- ranks candidate research vectors without re-implementing Elo; sovereign, integer, same bits on every machine. nx_dr_elo <n> [a b o]... n = #players (0..n-1); each match = 3 ints: a,b = player ids, o = A's score permille (1000/500/0) e.g. nx_dr_elo 3 2 0 1000 2 1 1000 0 1 1000 -> {"tool":"nx_dr_elo","n":3,"matches":3,...,"ranking":[{"rank":1,"id":2,...}]} license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 0 importers

nx_dr_elo.nx nx_itoa_lib.nx nx_syscalls.nx nx_dr_elo_cli.nx

imports: nx_dr_elo.nxnx_itoa_lib.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main el_puts sys_write el_key el_q sys_mmap sys_write ↻ el_puts ↻ el_q ↻ sys_exit el_atoi sys_mmap ↻ el_make_etab sys_mmap ↻ el_run_tournament el_expected el_update el_rank sys_mmap ↻ el_num nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap

structs

none

consts

15const K_MAGIC_1500: i64 = 1500

functions

17func el_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: el_keymain calls 1: sys_write
18func el_q() -> i64 { let b: *u8 = sys_mmap(1); b[0] = 34 as u8; sys_write(1, b, 1); return 0 }
called by 2: el_keymain calls 2: sys_mmapsys_write
19func el_key(name: *u8) -> i64 { el_q(); el_puts(name); el_q(); el_puts(":" as *u8); return 0 }
called by 1: main calls 2: el_qel_puts
24func el_num(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
25func el_atoi(a: *u8) -> i64
called by 1: main
35func main(argc: i64, argv: *i64) -> i64