qvm: model multi-hit ordering
Browse files- docs/ASSET_PIPELINE_TODO.md +3 -0
- docs/FINDINGS.md +3 -0
- docs/PROVISIONAL_TODO.md +3 -0
- docs/RESEARCH_LEDGER.md +5 -0
- docs/REVERSE_ENGINEERING_TODO.md +3 -0
- docs/research/QVM_MODEL_MULTI_HITS.md +7 -0
- docs/research/README.md +3 -0
- docs/research/qvm-model-multi-hits.json +0 -0
- scripts/analyze_qvm_model_multi_hits.py +32 -0
- scripts/test_qvm_complete_leaf.py +1 -1
- scripts/test_qvm_model_multi_hits.py +29 -0
docs/ASSET_PIPELINE_TODO.md
CHANGED
|
@@ -736,3 +736,6 @@ Research progress: RE-687 [report](research/QVM_GEOMETRIC_HIERARCHY.md); remaini
|
|
| 736 |
|
| 737 |
|
| 738 |
Research progress: RE-688 [report](research/QVM_COMPLETE_MODEL_HIT.md); remaining native/content/runtime/platform scope stays open.
|
|
|
|
|
|
|
|
|
|
|
|
| 736 |
|
| 737 |
|
| 738 |
Research progress: RE-688 [report](research/QVM_COMPLETE_MODEL_HIT.md); remaining native/content/runtime/platform scope stays open.
|
| 739 |
+
|
| 740 |
+
|
| 741 |
+
Research progress: RE-689 [report](research/QVM_MODEL_MULTI_HITS.md); remaining native/content/runtime/platform scope stays open.
|
docs/FINDINGS.md
CHANGED
|
@@ -1082,3 +1082,6 @@ Bounded qagame paths recover bomb-plant/inactivity correction requests, direct f
|
|
| 1082 |
|
| 1083 |
|
| 1084 |
**RE-688 — Complete model-hit helper through geometry and publication:** Complete144766 now executes actual pose/hierarchy/leaf geometry/classification/sorting and returns geometric hit0/1 with exact trace publication. [Evidence](research/QVM_COMPLETE_MODEL_HIT.md).
|
|
|
|
|
|
|
|
|
|
|
|
| 1082 |
|
| 1083 |
|
| 1084 |
**RE-688 — Complete model-hit helper through geometry and publication:** Complete144766 now executes actual pose/hierarchy/leaf geometry/classification/sorting and returns geometric hit0/1 with exact trace publication. [Evidence](research/QVM_COMPLETE_MODEL_HIT.md).
|
| 1085 |
+
|
| 1086 |
+
|
| 1087 |
+
**RE-689 — Complete multi-part model hits and priority ordering:** Actual star/nested model hierarchies generate categories1/3/5/6, then source sorting can prioritize torso3 over a nearer arm5/6 without changing context nearest vectors. [Evidence](research/QVM_MODEL_MULTI_HITS.md).
|
docs/PROVISIONAL_TODO.md
CHANGED
|
@@ -1065,3 +1065,6 @@ Research progress: RE-687 [report](research/QVM_GEOMETRIC_HIERARCHY.md); remaini
|
|
| 1065 |
|
| 1066 |
|
| 1067 |
Research progress: RE-688 [report](research/QVM_COMPLETE_MODEL_HIT.md); remaining native/content/runtime/platform scope stays open.
|
|
|
|
|
|
|
|
|
|
|
|
| 1065 |
|
| 1066 |
|
| 1067 |
Research progress: RE-688 [report](research/QVM_COMPLETE_MODEL_HIT.md); remaining native/content/runtime/platform scope stays open.
|
| 1068 |
+
|
| 1069 |
+
|
| 1070 |
+
Research progress: RE-689 [report](research/QVM_MODEL_MULTI_HITS.md); remaining native/content/runtime/platform scope stays open.
|
docs/RESEARCH_LEDGER.md
CHANGED
|
@@ -1092,3 +1092,8 @@ Complete23092 now produces actual geometry-derived context records through packe
|
|
| 1092 |
## 2026-10-21 — RE-688 Complete model-hit helper through geometry and publication (separate task commit)
|
| 1093 |
|
| 1094 |
Complete144766 now executes actual pose/hierarchy/leaf geometry/classification/sorting and returns geometric hit0/1 with exact trace publication. 16 full model compositions independently check pose, every leaf context, actual hit/miss, recognized categories, source child order and final trace words. Full suite: 1210 tests pass. Report regenerates byte-identically (575367 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1092 |
## 2026-10-21 — RE-688 Complete model-hit helper through geometry and publication (separate task commit)
|
| 1093 |
|
| 1094 |
Complete144766 now executes actual pose/hierarchy/leaf geometry/classification/sorting and returns geometric hit0/1 with exact trace publication. 16 full model compositions independently check pose, every leaf context, actual hit/miss, recognized categories, source child order and final trace words. Full suite: 1210 tests pass. Report regenerates byte-identically (575367 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
|
| 1095 |
+
|
| 1096 |
+
|
| 1097 |
+
## 2026-10-21 — RE-689 Complete multi-part model hits and priority ordering (separate task commit)
|
| 1098 |
+
|
| 1099 |
+
Actual star/nested model hierarchies generate categories1/3/5/6, then source sorting can prioritize torso3 over a nearer arm5/6 without changing context nearest vectors. Eight whole-model fixtures independently check every leaf, complete sorted context, geometric category sets, misses and distance-order changes from actual hits. Full suite: 1214 tests pass. Report regenerates byte-identically (524843 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
|
docs/REVERSE_ENGINEERING_TODO.md
CHANGED
|
@@ -1108,3 +1108,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
|
|
| 1108 |
|
| 1109 |
|
| 1110 |
- [x] RE-688 Complete model-hit helper through geometry and publication ([report](research/QVM_COMPLETE_MODEL_HIT.md)).
|
|
|
|
|
|
|
|
|
|
|
|
| 1108 |
|
| 1109 |
|
| 1110 |
- [x] RE-688 Complete model-hit helper through geometry and publication ([report](research/QVM_COMPLETE_MODEL_HIT.md)).
|
| 1111 |
+
|
| 1112 |
+
|
| 1113 |
+
- [x] RE-689 Complete multi-part model hits and priority ordering ([report](research/QVM_MODEL_MULTI_HITS.md)).
|
docs/research/QVM_MODEL_MULTI_HITS.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Complete multi-part model hits and priority ordering
|
| 2 |
+
|
| 3 |
+
RE-689. Reproduce with `python3 scripts/analyze_qvm_model_multi_hits.py`; check with `python3 scripts/test_qvm_model_multi_hits.py`. The [machine report](qvm-model-multi-hits.json) retains source identity and bounded fixtures.
|
| 4 |
+
|
| 5 |
+
Complete144766 now traverses explicit star/nested model tables, actual pose/sample transforms and packed geometry for four recognized surfaces. The record stream is generated by source intersection, then checked against independent stable-key sorting and the source type3 priority swap. Nearest context vectors remain unchanged by record priority, so trace publication and first record category can refer to different source choices. Hit/miss returns, source point arithmetic and all context words are checked. These tables are fixture hierarchies, not a claimed original skeleton; native math/zero fill remain models and damage/runtime parity remain open.
|
| 6 |
+
|
| 7 |
+
No original executable/full QVM/native collision/physics/rendering executes. Native responses and legal input domains are supplied or unverified where stated; full runtime/macOS/Linux Rust/Bevy/Solari gameplay remains open.
|
docs/research/README.md
CHANGED
|
@@ -666,3 +666,6 @@ The extension collector adds five focused tests for native tail calls, command-r
|
|
| 666 |
|
| 667 |
|
| 668 |
[RE-688: Complete model-hit helper through geometry and publication](QVM_COMPLETE_MODEL_HIT.md). Reproduce with `python3 scripts/analyze_qvm_complete_model_hit.py`; check with `python3 scripts/test_qvm_complete_model_hit.py`.
|
|
|
|
|
|
|
|
|
|
|
|
| 666 |
|
| 667 |
|
| 668 |
[RE-688: Complete model-hit helper through geometry and publication](QVM_COMPLETE_MODEL_HIT.md). Reproduce with `python3 scripts/analyze_qvm_complete_model_hit.py`; check with `python3 scripts/test_qvm_complete_model_hit.py`.
|
| 669 |
+
|
| 670 |
+
|
| 671 |
+
[RE-689: Complete multi-part model hits and priority ordering](QVM_MODEL_MULTI_HITS.md). Reproduce with `python3 scripts/analyze_qvm_model_multi_hits.py`; check with `python3 scripts/test_qvm_model_multi_hits.py`.
|
docs/research/qvm-model-multi-hits.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
scripts/analyze_qvm_model_multi_hits.py
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Complete model helper through multi-part hierarchy and actual priority sorting."""
|
| 3 |
+
import itertools
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
from qvm_research_support import source
|
| 6 |
+
from analyze_qvm_complete_model_hit import prepare,complete
|
| 7 |
+
from analyze_qvm_model_transforms import BUFFERS
|
| 8 |
+
from analyze_qvm_geometric_hierarchy import attach
|
| 9 |
+
from analyze_qvm_acceleration import word
|
| 10 |
+
from analyze_qvm import write_json
|
| 11 |
+
NAMES=['h_head','u_arml','u_armr','u_torso']
|
| 12 |
+
|
| 13 |
+
def hierarchy(m,bs,layout):
|
| 14 |
+
a,b,c,d=BUFFERS;children={a:[b,c,d] if layout=='star' else [b],b:[c,d] if layout=='nested' else [],c:[],d:[]};names=dict(zip(BUFFERS,NAMES))
|
| 15 |
+
for index,node in enumerate(BUFFERS):
|
| 16 |
+
for o in [100,104,108]:m[node+o]=0
|
| 17 |
+
model=m[node+88];adj=children[node];m[node+92]=0x79010000+256*index if adj else 0;m[node+96]=0 if index==0 else (b if layout=='nested' and index>1 else a);m[model+80]=len(adj);tag_data=0x79000000+16384*index;m[model+96]=tag_data-model
|
| 18 |
+
for child_index,child in enumerate(adj):
|
| 19 |
+
m[m[node+92]+4*child_index]=child
|
| 20 |
+
for frame in range(23):
|
| 21 |
+
sample=tag_data+(frame*len(adj)+child_index)*112
|
| 22 |
+
for o in range(64,112,4):m[sample+o]=0
|
| 23 |
+
m[sample+72]=word([.75,.5,.25][child_index]);m[sample+76]=word(1);m[sample+92]=word(1);m[sample+108]=word(1)
|
| 24 |
+
attach(m,bs,node,0x78f00000+4096*index,NAMES[index],frame_count=23)
|
| 25 |
+
return names
|
| 26 |
+
|
| 27 |
+
def main():
|
| 28 |
+
q,raw,h,ins=source();rows=[]
|
| 29 |
+
for layout,animation,hit in itertools.product(['star','nested'],[0,22],[False,True]):
|
| 30 |
+
m,bs,args,names=prepare(raw,h,animation,0,hit);names=hierarchy(m,bs,layout);m,r=complete(ins,m,bs,args,names);r['fixture']={'layout':layout,'animation':animation,'hit':hit};rows.append(r)
|
| 31 |
+
write_json(Path('docs/research/qvm-model-multi-hits.json'),{'source':q['source'],'sha256':q['sha256'],'probes':rows,'limits':'Complete144766 with actual packed hierarchy/geometry and record sorting. Star/nested metadata are explicit fixtures, not validated original skeletons. Native math/zero fill modeled; no world collision/damage/reference parity.'})
|
| 32 |
+
if __name__=='__main__':main()
|
scripts/test_qvm_complete_leaf.py
CHANGED
|
@@ -14,7 +14,7 @@ def expected(p):
|
|
| 14 |
b=[[n(x) for x in row] for row in matrix(a['basis_chain'])];o=list(map(n,a['node_origin']));vertices=[[word(f(f(f(f(n(v[0])*b[0][c])+f(n(v[1])*b[1][c]))+f(n(v[2])*b[2][c]))+o[c])) for c in range(3)] for v in vertices]
|
| 15 |
c={'vertices':vertices,'origin':a['origin'],'direction':a['direction']};hit,det,u,v,t=candidate(c)
|
| 16 |
if not hit:continue
|
| 17 |
-
c.update({'u':u,'v':v,'parameter':t});normal,edges,point=geometry({'candidate':c});category={'h_head':1,'u_torso':3,'l_rfoot':14,'g_vest':4}.get(s['name'],a['null_word4'])
|
| 18 |
if n(t)<n(near):near=t;r[3:6]=point;r[9:12]=normal;r[15]=index
|
| 19 |
if n(t)>n(far):far=t;r[:3]=point;r[6:9]=normal;r[14]=index
|
| 20 |
count=r[16]
|
|
|
|
| 14 |
b=[[n(x) for x in row] for row in matrix(a['basis_chain'])];o=list(map(n,a['node_origin']));vertices=[[word(f(f(f(f(n(v[0])*b[0][c])+f(n(v[1])*b[1][c]))+f(n(v[2])*b[2][c]))+o[c])) for c in range(3)] for v in vertices]
|
| 15 |
c={'vertices':vertices,'origin':a['origin'],'direction':a['direction']};hit,det,u,v,t=candidate(c)
|
| 16 |
if not hit:continue
|
| 17 |
+
c.update({'u':u,'v':v,'parameter':t});normal,edges,point=geometry({'candidate':c});category={'h_head':1,'u_torso':3,'l_rfoot':14,'g_vest':4,'u_arml':5,'u_armr':6}.get(s['name'],a['null_word4'])
|
| 18 |
if n(t)<n(near):near=t;r[3:6]=point;r[9:12]=normal;r[15]=index
|
| 19 |
if n(t)>n(far):far=t;r[:3]=point;r[6:9]=normal;r[14]=index
|
| 20 |
count=r[16]
|
scripts/test_qvm_model_multi_hits.py
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json,unittest
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
from test_qvm_ground import n
|
| 4 |
+
from test_qvm_complete_leaf import expected as leaf
|
| 5 |
+
|
| 6 |
+
def sorted_context(before):
|
| 7 |
+
out=before[:];count=out[16];rows=[out[17+5*j:22+5*j] for j in range(count)];rows=sorted(rows,key=lambda row:n(row[4]))
|
| 8 |
+
if len(rows)>1 and rows[0][0] in [5,6]:
|
| 9 |
+
candidate=next((j for j,row in enumerate(rows[1:],1) if row[0]==3),None)
|
| 10 |
+
if candidate is not None:rows[0],rows[candidate]=rows[candidate],rows[0]
|
| 11 |
+
for j,row in enumerate(rows):out[17+5*j:22+5*j]=row
|
| 12 |
+
return out
|
| 13 |
+
class ModelMultiHitTests(unittest.TestCase):
|
| 14 |
+
@classmethod
|
| 15 |
+
def setUpClass(cls):cls.rows=json.loads(Path('docs/research/qvm-model-multi-hits.json').read_text())['probes']
|
| 16 |
+
def test_independent_every_actual_leaf_geometry(self):
|
| 17 |
+
self.assertEqual(len(self.rows),8)
|
| 18 |
+
for p in self.rows:
|
| 19 |
+
for r in p['hierarchies'][0]['leaf_reports']:self.assertEqual(r['effect']['after'],leaf(r['effect']))
|
| 20 |
+
def test_full_sort_context_and_type_priority_from_actual_hits(self):
|
| 21 |
+
for p in self.rows:
|
| 22 |
+
r=p['sorts'][0];self.assertEqual(r['after'],sorted_context(r['before']));self.assertEqual(p['context'],r['after'])
|
| 23 |
+
def test_actual_hit_category_sets_and_numeric_return(self):
|
| 24 |
+
for p in self.rows:
|
| 25 |
+
expected={1,3,5,6} if p['fixture']['hit'] else set();self.assertEqual({p['context'][17+5*j] for j in range(p['context'][16])},expected);self.assertEqual(p['execution']['return'],int(p['fixture']['hit']))
|
| 26 |
+
def test_priority_can_break_distance_order_without_changing_nearest_header(self):
|
| 27 |
+
hit=[p for p in self.rows if p['fixture']['hit']];self.assertTrue(any([n(p['context'][21+5*j]) for j in range(p['context'][16])]!=sorted(n(p['context'][21+5*j]) for j in range(p['context'][16])) for p in hit))
|
| 28 |
+
for p in self.rows:self.assertEqual(p['sorts'][0]['before'][:17],p['sorts'][0]['after'][:17])
|
| 29 |
+
if __name__=='__main__':unittest.main()
|