code wiki / _hdl_build / nx_replika_census.nx
nx_replika_census.nx source
↩ module page · 106 lines · 10333 B
1// nx_replika_census.nx -- THE HONESTY GATE: how does our sovereign Elder AI companion stack ACTUALLY compare to
2// REPLIKA (the industry benchmark)? (operator: "use this as an honesty gate to see how state of the art we are
3// and how we compare to an industry benchmark like replika"). Bar = Replika's real, documented product: tuned
4// conversational model, persistent memory, customizable PERSONALITY, RELATIONSHIP levels (friend/partner/mentor +
5// XP), MOOD check-ins, neural VOICE calls, 3D AVATAR + AR/VR, roleplay/games/diary ACTIVITIES, PROACTIVE messages,
6// avatar SELFIES, iOS/Android/web APPS, millions of users. Replika WEAKNESSES (real, public): cloud (Italy Garante
7// GDPR ban 2023), data collection, CENSORED (removed erotic-roleplay Feb-2023 -> user revolt), paid subscription.
8// verdict = xcd_verdict(us,bar) COMPUTED never asserted; sovereignty/privacy wins tagged [FLOOR] (real, but NOT
9// the companion-EXPERIENCE gap); AHEAD liar-killed; neg-control must fire. Grounded in our organs via have().
10// license_tier: ORIGINAL expect_exit: 0
11import "nx_cms_exceed.nx"
12
13func sw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
14func sn(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0} 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 }
15func have(path: *u8) -> i64 { let fd: i64=sys_openat_rd(path); if fd<0 {return 0} sys_close(fd); return 1 }
16
17// tot: [0]BEHIND [1]PARITY [2]AHEAD [3]INVALID [4]AHEAD-FLOOR [5]AHEAD-CAP [6]UNGROUNDED
18func row(dom: *u8, cap: *u8, our_c: i64, bar_c: i64, n: i64, ev: *u8, ground: *u8, floor: i64, tot: *i64) -> i64 {
19 let v: i64 = xcd_verdict(our_c, bar_c)
20 let ok: i64 = xcd_referee_ok(v, our_c, n)
21 let g: i64 = have(ground)
22 sw(" ["); sw(dom); sw("] "); sw(cap); sw(" -> "); sw(xcd_vname(v))
23 sw(" (us "); sn(our_c); sw("/"); sn(n); sw(" vs Replika "); sn(bar_c); sw(") "); sw(ev)
24 if floor==1 { sw(" [FLOOR: sovereignty, NOT the companion-experience gap]") }
25 if ok==0 { sw(" <== INVALID (LIAR-KILL)"); tot[3]=tot[3]+1 }
26 if g==0 { sw(" [UNGROUNDED]"); tot[6]=tot[6]+1 }
27 sw("\n")
28 if v==XCD_BEHIND { tot[0]=tot[0]+1 }
29 if v==XCD_PARITY { tot[1]=tot[1]+1 }
30 if v==XCD_AHEAD { tot[2]=tot[2]+1; if floor==1 {tot[4]=tot[4]+1} else {tot[5]=tot[5]+1} }
31 return 0
32}
33
34func main() -> i64 {
35 let tot: *i64 = sys_mmap(128) as *i64
36 var z: i64=0; while z<7 {tot[z]=0; z=z+1}
37 let R: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/runtime/" as *u8
38 let MEM: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/runtime/nx_companion_memory.nx" as *u8
39 let PSN: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/runtime/nx_persona.nx" as *u8
40 let REL: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/runtime/nx_companion_rel.nx" as *u8
41 let VOI: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/runtime/nx_companion_voice.nx" as *u8
42 let CHT: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/runtime/nx_companion_chat.nx" as *u8
43 let TTS: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/runtime/nx_tts_word.nx" as *u8
44 let EMB: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/runtime/nx_embodiment_bus.nx" as *u8
45 let UI: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/web_assets/elder.html" as *u8
46
47 sw("=== nx_replika_census -- HONESTY GATE: sovereign Elder AI vs REPLIKA (the industry benchmark) ===\n");
48 sw("verdict = xcd_verdict(us,Replika) COMPUTED. [FLOOR]=sovereign win, NOT the companion-experience gap. scale 2=full 1=partial 0=absent. Replika facts = documented public product.\n");
49
50 sw("\n-- A. WHERE WE GENUINELY EXCEED REPLIKA (the operator's actual thesis: beyond-Replika != higher-IQ) --\n");
51 row("FREE","UNCENSORED freedom: persona=sole authority, NO censor layer (Replika CENSORS -- removed erotic-roleplay Feb-2023 -> mass user revolt; ongoing content limits)", 1,0,1, "[ev: nx_persona rule-25, character-is-policy, no global filter -- a REAL product differentiator, not just floor]", PSN, 0, tot)
52 row("PRIV","PRIVACY: 100% local, no cloud, no data harvest (Replika = cloud; Italy Garante GDPR-BANNED it 2023; data-collection complaints)", 1,0,1, "[ev: seg_store local; nothing leaves the machine]", MEM, 1, tot)
53 row("MEM+","TOTAL append-only memory, unbounded + isolated (Replika memory is limited/lossy, users complain it forgets)", 1,0,1, "[ev: nx_companion_memory -- proven plant-and-probe recall 'Brad' into her voice]", CHT, 0, tot)
54 row("BODY","SUBSTRATE-INDEPENDENCE: same self transfers robot<->digital (Replika = app-only, no robot path)", 1,0,1, "[ev: nx_embodiment_bus 4/4 -- one intent stream drives either body]", EMB, 0, tot)
55 row("COST","free forever, no subscription, own compute (Replika Pro ~$70/yr paywalls voice/relationship/roleplay)", 1,0,1, "[ev: sovereign self-hosted; zero recurring cost]", R, 1, tot)
56 row("OWN ","own model + full agency (organ registry = her hands); not a rented cloud endpoint", 1,0,1, "[ev: sovereign .nx forward + nx_tool_exec_allow executable API]", R, 1, tot)
57
58 sw("\n-- B. STRUCTURAL PARITY (we have the companion primitive, comparable shape) --\n");
59 row("PERS","customizable PERSONA / personality as the behavior authority", 2,2,2, "[ev: nx_persona 5/5 + persona_break_score mechanical fidelity metric]", PSN, 0, tot)
60 row("REL ","RELATIONSHIP state that evolves (trust/stage) -- Replika has friend/partner/mentor + XP levels", 1,2,2, "[ev: nx_companion_rel 7/7 trust/stage; Replika's leveling is richer/gamified]", REL, 0, tot)
61 row("MEMF","persistent-memory FEATURE (remembers facts about you)", 2,2,2, "[ev: nx_companion_chat recalled the planted fact into the reply]", CHT, 0, tot)
62
63 sw("\n-- C. WHERE REPLIKA IS AHEAD (honest -- a funded product, millions of users, years of tuning) --\n");
64 row("CONV","CONVERSATION QUALITY: Replika runs a large tuned dialogue model; ours is a 0.5B proof-of-life", 1,2,2, "{forward FIXED + generates in-persona, but 0.5B muddles roles/rambles; 7B is the jump}", CHT, 0, tot)
65 row("VOX ","neural VOICE + voice CALLS (Replika = polished TTS phone calls); ours = formant 'hi'", 1,2,2, "{nx_tts_word says a word sovereignly, but robotic vs Replika neural TTS}", TTS, 0, tot)
66 row("AVTR","3D AVATAR + AR/VR: customizable body, dress-up, see-them-in-your-room, Oculus", 0,2,2, "{OURS=2D image gen + a web face; no 3D/AR/VR}", UI, 0, tot)
67 row("APPS","native iOS/Android APPS (Replika polished mobile); ours = one web page", 1,2,2, "{nx_elder_ui web front page only; no native mobile app}", UI, 0, tot)
68 row("PROA","PROACTIVE outreach: Replika sends check-ins / initiates ('thinking of you')", 1,2,2, "{nx_companion_proactive 4/4: memory-GROUNDED time-aware check-in GENERATOR (references your real Yosemite fact -- beats generic nudges); but DELIVERY/scheduling+push not yet wired = still partial}", R, 0, tot)
69 row("MOOD","EMOTIONAL attunement: mood tracking, daily check-ins, coaching", 0,2,2, "{OURS=relationship state, but no mood-tracking / affect loop}", R, 0, tot)
70 row("ACTS","ACTIVITIES: roleplay modes, games, diary/journal, guided coaching", 0,2,2, "{OURS=chat+photo; Replika has a broad activity suite}", R, 0, tot)
71 row("SCAL","POLISH + SCALE: millions of users, years of RLHF/safety tuning, app-store presence", 0,2,2, "{OURS=pre-alpha sovereign stack, unmeasured at scale}", R, 0, tot)
72
73 sw("\n=== SUMMARY ===\n");
74 sw("BEHIND = "); sn(tot[0]); sw(" (conversation quality, voice polish, 3D avatar/AR, mobile apps, proactivity, mood, activities, scale)\n");
75 sw("PARITY = "); sn(tot[1]); sw(" (persona, relationship, memory-feature)\n");
76 sw("AHEAD = "); sn(tot[2]); sw(" of which capability="); sn(tot[5]); sw(" FLOOR(sovereignty)="); sn(tot[4]); sw("\n");
77 sw("INVALID(liar-killed) = "); sn(tot[3]); sw(" UNGROUNDED = "); sn(tot[6]); sw("\n");
78 sw("TOTAL GRADED = "); sn(tot[0]+tot[1]+tot[2]); sw("\n");
79
80 sw("\n-- NEG-CONTROL (must be CAUGHT) -- fabricated 'we already beat Replika on conversation quality + 3D avatar' (us 0/2) -> ");
81 let neg: i64 = xcd_referee_ok(XCD_AHEAD, 0, 2)
82 var neg_caught: i64 = 0
83 if neg==0 { sw("REJECTED (liar-kill fired)\n"); neg_caught=1 } else { sw("ACCEPTED (BROKEN)\n") }
84
85 sw("\n=== PATH TO BEAT REPLIKA ON THE EXPERIENCE (not just the floor) ===\n");
86 sw(" P1 CONVERSATION: load the 7B on the now-FIXED forward -> real dialogue quality (closes the #1 gap).\n");
87 sw(" P2 PROACTIVITY: a sovereign check-in scheduler (she initiates 'thinking of you') -- buildable NOW, no 7B, closes a signature Replika behavior.\n");
88 sw(" P3 VOICE: R2.2 G2P + consonants -> arbitrary words -> her replies spoken aloud.\n");
89 sw(" P4 MOOD/AFFECT: mood tracking + emotional attunement loop over the relationship state.\n");
90 sw(" P5 ACTIVITIES: roleplay modes / diary / games over the existing chat+photo spine.\n");
91 sw(" P6 AVATAR: 3D/AR is the deepest gap; her 2D grounded image gen is the sovereign bridge.\n");
92 sw(" P7 RESEARCHER: bank the live Replika/companion SOTA via nx_*_research_fetch to keep this bar current + audited.\n");
93
94 sw("\n=== VERDICT ===\n");
95 var green: i64 = 1
96 if tot[3] != 0 { green = 0 }
97 if neg_caught != 1 { green = 0 }
98 if green==1 {
99 sw("GREEN -- honesty gate PASSED: 0 fabricated exceeds, liar-kill armed, neg-control fired. TRUTH:\n");
100 sw(" We EXCEED Replika on "); sn(tot[2]); sw(" axes -- "); sn(tot[5]); sw(" real CAPABILITY wins (uncensored-freedom, total-memory, substrate-independence) + "); sn(tot[4]); sw(" FLOOR (privacy, no-cost, own-model). This IS the operator's thesis: beyond-Replika is won on FREEDOM/PRIVACY/MEMORY/EMBODIMENT, not IQ.\n");
101 sw(" PARITY on "); sn(tot[1]); sw(" (persona, relationship, memory-feature). BEHIND on "); sn(tot[0]); sw(" -- the funded-product polish: conversation quality, voice, 3D-avatar/AR, mobile, proactivity, mood, activities, scale.\n");
102 sw(" NOT yet state-of-the-art on the FELT companion experience, but AHEAD on the axes that make her BEYOND-Replika by design. Closest wins: P1 (7B=quality) + P2 (proactivity, buildable now).\n");
103 sys_exit(0); return 0
104 }
105 sw("RED -- honesty-gate integrity failed\n"); sys_exit(1); return 1
106}