code wiki / (root) / nx_meta_verdict.nx

nx_meta_verdict.nx

buildroot/runtime/nx_meta_verdict.nx

18387 B422 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic meta
docsdependenciesstructsconstsfunctions

about

nx_meta_verdict.nx -- META "God saw it was good" composer over layer verdicts. Per user 2026-05-16: "always layer by layer and overall meta have a god is this good and it should do that based on the math like we were building in the elder ai for images and video and sound" Genesis 1:31 -- "And God saw every thing that he had made, and, behold, it was very good." This primitive ships the SABBATH-LEVEL VERDICT: given N per-layer LAYER_VERDICT records (from nx_layer_verdict.nx), compute a single overall META verdict that says whether the whole world is "good" or not. Mathematical posture (matches Elder AI's overall-quality grader): 1. Hard floor rule: ANY layer at F -> META F (one broken layer breaks the world; you cannot polish a turd). 2. Sabbath rule: ALL layers >= A AND no failing axis below MARGINAL across the whole set -> META = min(layer grades). 3. Geometric-mean rule: otherwise, the META grade is computed from the geometric-mean axis score across ALL layers, penalised by the count of below-threshold axes. 4. Min-axis floor: if any single axis across any layer is below 0.2Q, the META grade is capped at C (one terrible axis drags the whole world down). These mathematical rules implement "God saw" -- a deterministic pass/fail that the iterative procgen loop can use to decide whether to refine, accept, or regenerate. META_VERDICT layout (16 i64): m[0] overall_grade F=0..S=5 m[1] n_layers total input layers m[2] worst_layer_kind sealed enum (the dragging layer) m[3] worst_layer_grade its grade m[4] worst_axis_q14 lowest axis score across all layers m[5] n_layers_S m[6] n_layers_A m[7] n_layers_BCD B + C + D counts m[8] n_layers_F hard-failures m[9] mean_grade_q14 average grade across layers

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_layer_verdict.nx nx_meta_verdict.nx

imports: nx_syscalls.nxnx_tier.nxnx_layer_verdict.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap nx_layer_verdict_write nx_layer_verdict_init nx_layer_verdict_finalize nx_layer_grade_from_axes nx_lv_axis_verdict nx_meta_verdict_compose nx_lv_axis_verdict ↻ _mv_log2_q14 _mv_pow2_q14 _mv_find_worst_layer_idx nx_god_said_good

structs

none

consts

62const NX_MAGIC_16384: i64 = 16384
63const NX_MAGIC_25976: i64 = 25976
64const NX_MAGIC_32768: i64 = 32768
65const NX_MAGIC_38048: i64 = 38048
66const NX_MAGIC_42361: i64 = 42361
67const NX_MAGIC_46006: i64 = 46006
68const NX_MAGIC_49152: i64 = 49152
69const NX_MAGIC_51916: i64 = 51916
70const NX_MAGIC_54432: i64 = 54432
71const NX_MAGIC_56619: i64 = 56619
72const NX_MAGIC_58744: i64 = 58744
73const NX_MAGIC_60686: i64 = 60686
74const NX_MAGIC_62390: i64 = 62390
75const NX_MAGIC_63984: i64 = 63984
76const NX_MAGIC_65536: i64 = 65536
79const NX_MV_Q: nx_int = 16384
82const NX_MV_STRIDE: nx_int = 16
84const NX_MV_OFF_GRADE: nx_int = 0
85const NX_MV_OFF_N_LAYERS: nx_int = 1
86const NX_MV_OFF_WORST_LAYER_KIND: nx_int = 2
87const NX_MV_OFF_WORST_LAYER_GRADE: nx_int = 3
88const NX_MV_OFF_WORST_AXIS_Q14: nx_int = 4
89const NX_MV_OFF_N_LAYERS_S: nx_int = 5
90const NX_MV_OFF_N_LAYERS_A: nx_int = 6
91const NX_MV_OFF_N_LAYERS_BCD: nx_int = 7
92const NX_MV_OFF_N_LAYERS_F: nx_int = 8
93const NX_MV_OFF_MEAN_GRADE_Q14: nx_int = 9
94const NX_MV_OFF_GEO_AXIS_MEAN_Q14: nx_int = 10
95const NX_MV_OFF_N_LOSS_AXES: nx_int = 11
96const NX_MV_OFF_N_WIN_AXES: nx_int = 12
97const NX_MV_OFF_GOD_SAID_GOOD: nx_int = 13
98const NX_MV_OFF_REFINE_PRIORITY: nx_int = 14
101const NX_MV_MIN_AXIS_FLOOR_Q14: nx_int = 3277 // 0.2Q

functions

104func _mv_log2_q14(bin: nx_int) -> nx_int
124func _mv_pow2_q14(x_q14: nx_int) -> nx_int
146func _mv_find_worst_layer_idx(
167func nx_meta_verdict_compose(
332func nx_god_said_good(meta: *i64) -> nx_int
called by 1: main
337func main() -> i64