code wiki / _hdl_build / nx_practice_curriculum.nx

nx_practice_curriculum.nx

buildroot/runtime/_hdl_build/nx_practice_curriculum.nx

11850 B165 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_practice_curriculum.nx -- the NON-CHEATING PRACTICE LOOP (operator 2026-06-25: "help our tools practice without cheating to be able to do more than just linear arithmetic but truly grow"). RACI=train (teacher=A owns the curriculum+mastery; coach=R drills the stuck tier via nx_perf_rehearsal; referee=C is the cheat-proof grader; engineer=C builds the tools nx_evo_*/nx_nofloat_mlp). The anti-cheat is STRUCTURAL: every tool is scored ONLY on HELD-OUT examples it never trained on -- so memorizing the train set (the cheat) scores ZERO on the test, and a tool must GENUINELY GENERALIZE to advance. The curriculum is GRADUATED: T1 linear -> T2 non-linear (|x|), so a linear-only learner MASTERS T1 but is provably STUCK on T2 = the exact "grow beyond linear" signal the coach drills (the grown tool = a branch/MLP, which the team has: nx_evo_cf / nx_nofloat_mlp4 learns XOR). main() is the self-validating gate. Sovereign: nx_syscalls only. expect_exit: 0 license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_seg_store.nx nx_practice_curriculum.nx

imports: nx_syscalls.nxnx_seg_store.nx

imported by: nobody (leaf or entry point)

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

main pp sys_write sys_mmap pc_score pc_predict pn sys_mmap ↻ sys_write ↻ pc_coach_drill sys_mmap ↻ pc_itoa sys_mmap ↻ pc_drive sys_fork sys_mmap ↻ sys_openat_wr sys_dup3 sys_execve sys_exit sys_wait4 pc_cat ss_begin ss_begin_cap sys_mmap ↻ ss_add ss_add2 ss_w32 ss_len ss_commit ss_segid_ok sys_mmap ↻ ss_cat ss_catn sys_mmap ↻ sys_write ↻ ss_write_seg ss_segid_ok ↻ sys_mmap ↻ ss_cat ↻

structs

none

consts

none

functions

13func pp(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 1: main calls 1: sys_write
14func pc_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){dst[off+i]=s[i];i=i+1} return off+i }
called by 1: main
15func pn(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1} sys_write(1,bb,k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
19func pc_predict(lid: i64, x: i64, tx: *i64, ty: *i64, n: i64) -> i64
called by 1: pc_score
36func pc_score(lid: i64, tx: *i64, ty: *i64, n: i64, ex: *i64, ey: *i64, en: i64) -> i64
called by 1: main calls 1: pc_predict
46func pc_drive(tool: *u8, champ: *u8, target: *u8, seed: *u8) -> i64
64func pc_itoa(v: i64, out: *u8) -> i64 { var m: i64=v; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{out[i]=t[k-1-i];i=i+1} out[k]=0 as u8; return k }
called by 1: pc_coach_drill calls 1: sys_mmap
68func pc_coach_drill(tool: *u8, champ: *u8, target: *u8, max_tries: i64, won: *i64) -> i64
called by 1: main calls 3: sys_mmappc_itoapc_drive
79func main() -> i64