nx_meta_verdict.nx
buildroot/runtime/nx_meta_verdict.nx
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
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
structs
| none |
consts
| 62 | const NX_MAGIC_16384: i64 = 16384 |
| 63 | const NX_MAGIC_25976: i64 = 25976 |
| 64 | const NX_MAGIC_32768: i64 = 32768 |
| 65 | const NX_MAGIC_38048: i64 = 38048 |
| 66 | const NX_MAGIC_42361: i64 = 42361 |
| 67 | const NX_MAGIC_46006: i64 = 46006 |
| 68 | const NX_MAGIC_49152: i64 = 49152 |
| 69 | const NX_MAGIC_51916: i64 = 51916 |
| 70 | const NX_MAGIC_54432: i64 = 54432 |
| 71 | const NX_MAGIC_56619: i64 = 56619 |
| 72 | const NX_MAGIC_58744: i64 = 58744 |
| 73 | const NX_MAGIC_60686: i64 = 60686 |
| 74 | const NX_MAGIC_62390: i64 = 62390 |
| 75 | const NX_MAGIC_63984: i64 = 63984 |
| 76 | const NX_MAGIC_65536: i64 = 65536 |
| 79 | const NX_MV_Q: nx_int = 16384 |
| 82 | const NX_MV_STRIDE: nx_int = 16 |
| 84 | const NX_MV_OFF_GRADE: nx_int = 0 |
| 85 | const NX_MV_OFF_N_LAYERS: nx_int = 1 |
| 86 | const NX_MV_OFF_WORST_LAYER_KIND: nx_int = 2 |
| 87 | const NX_MV_OFF_WORST_LAYER_GRADE: nx_int = 3 |
| 88 | const NX_MV_OFF_WORST_AXIS_Q14: nx_int = 4 |
| 89 | const NX_MV_OFF_N_LAYERS_S: nx_int = 5 |
| 90 | const NX_MV_OFF_N_LAYERS_A: nx_int = 6 |
| 91 | const NX_MV_OFF_N_LAYERS_BCD: nx_int = 7 |
| 92 | const NX_MV_OFF_N_LAYERS_F: nx_int = 8 |
| 93 | const NX_MV_OFF_MEAN_GRADE_Q14: nx_int = 9 |
| 94 | const NX_MV_OFF_GEO_AXIS_MEAN_Q14: nx_int = 10 |
| 95 | const NX_MV_OFF_N_LOSS_AXES: nx_int = 11 |
| 96 | const NX_MV_OFF_N_WIN_AXES: nx_int = 12 |
| 97 | const NX_MV_OFF_GOD_SAID_GOOD: nx_int = 13 |
| 98 | const NX_MV_OFF_REFINE_PRIORITY: nx_int = 14 |
| 101 | const NX_MV_MIN_AXIS_FLOOR_Q14: nx_int = 3277 // 0.2Q |
functions
| 104 | func _mv_log2_q14(bin: nx_int) -> nx_int called by 1: nx_meta_verdict_compose |
| 124 | func _mv_pow2_q14(x_q14: nx_int) -> nx_int called by 1: nx_meta_verdict_compose |
| 146 | func _mv_find_worst_layer_idx( called by 1: nx_meta_verdict_compose |
| 167 | func nx_meta_verdict_compose( |
| 332 | func nx_god_said_good(meta: *i64) -> nx_int called by 1: main |
| 337 | func main() -> i64 |