urt-rs / docs /research /QVM_SLIDE_PLANES.md
nmarshall's picture
qvm: slide solver
b452d03
|
Raw History Blame Contribute Delete
7.52 kB
# Game-QVM plane registration and first velocity candidates
RE-477–479 / F-217–219. [qvm-slide-planes.json](qvm-slide-planes.json) retains plane-gate/candidate/scan-loop instruction slices,61 gate probes,135 candidate probes and40 first-contact continuations. Reproduce with `python3 scripts/analyze_qvm_slide_planes.py`; check with `python3 scripts/test_qvm_slide_planes.py`.
This continues [slide preparation and first contact](QVM_SLIDE_PREFIX.md) from its explicit stop at58312. The new work evaluates capacity, duplicate handling, plane append and the first selected candidate only. It does not execute secondary-plane rejection, crease solving, candidate commit or later bumps. Native trace/root inputs remain supplied in contact chains. No original executable, complete QVM, native collision, physics or rendering executes. Synthetic array/normal/velocity domains and complete gameplay/platform behavior remain open.
## PLANE-001 — Capacity, duplicate threshold and nudge (RE-477)
At58312 the slide checks signed plane count against5. Count>=5 zeros all PS velocity components and returns1 immediately, before duplicate search or normal insertion. This branch bypasses the slide's normal common exit. It is recovered as an early return at this boundary, not as a claim that every seeded standalone count is reachable in real movement.
Below capacity, it scans the existing plane array in order and computes rounded dot(incoming trace normal, stored plane). The first value **strictly greater than binary32 0.99** selects the duplicate path. It adds the incoming normal component-wise to PS velocity, leaves the array/count unchanged and jumps to59637, immediately before the bump counter advances. This is an unscaled normal addition; there is no extra epsilon coefficient in this source branch.
With no match, the helper appends the raw incoming normal and increments count, then starts the candidate scan. It does not normalize that incoming normal here. A count4 can append to5; another contact at count5 would take the capacity return before even checking for a duplicate. Exact0.99 does not match;0.9901 does in the isolated fixtures.
The61 gate probes combine counts0/1/4/5, five normal X values and three velocities, plus a two-plane example whose match is at index1. Empty arrays and non-unit threshold vectors are synthetic control probes, not legal-domain evidence. Tests verify exact order, capacity priority, array/count retention or insertion, nudge words and return/continuation boundary.
## PLANE-002 — First approach gate, impact maximum and two clips (RE-478)
After append, the source scans stored planes from index0. For each plane it computes rounded dot(current PS velocity, plane). Values greater than or equal to binary32 0.1 are skipped. The **first value strictly below0.1** selects candidate generation. No eligible plane ends the outer scan at59637 without generating a candidate.
For a selected plane, global35024000 is updated only when the negated approach dot exceeds its supplied current value. The report calls this the impact maximum as a candidate role; actual scratch reset, meaning and later consumers are not composed. Standalone probes supply initial values0/5/100. Contact chains explicitly supply0 rather than claiming an evaluated reset.
The helper clips two vectors independently against the selected plane:
- Current PS velocity produces local candidate116/120/124.
- End velocity148/152/156 produces local candidate128/132/136.
Each clip recomputes its own rounded dot. Negative dot uses exact coefficient word1065361605 (approximately1.00100005); nonnegative dot uses1065336456 (approximately0.999001026). Each resulting component is `round32(component - round32(normal_component * biased_dot))`. The end clip does not reuse the current vector's sign/coefficient choice.
The analyzer stops at58790, before the inner secondary-plane scan. These are **local candidates**, not committed PS velocity. A skipped scan likewise stops before bump advance. Tests verify PS velocity remains unchanged by this candidate slice, maximum retention/update, independent clipping signs and exact float words. They cover exact0.1 versus0.099, selected later planes and exhausted scans.
The135 standalone fixtures combine three plane arrays, five velocities, three end vectors and three initial maximum values. Legal contact normals, complete solver acceptance and exceptional/alias/control-state domains remain open.
## PLANECHAIN-001 — Actual first-contact state to plane/candidate slices (RE-479)
Forty chains evaluate the preceding slide preparation, supplied first native trace, contact flag/normal stores, actual39253 touch registration and remaining-time update, then continue its resulting memory from58312 through the plane gate. They use gravity0/1, supplied ground-plane0/1, five incoming normals and moving/zero velocity.
The gate receives the actual working velocity and seeded plane array from that earlier prefix, plus the normal from its supplied trace. A duplicate leaves the chain at the bump-advance boundary with nudged PS velocity and no candidate. An appended plane continues the actual scan, preserving array order, until the first candidate or scan exhaustion. End-velocity data comes directly from the evaluated gravity prefix. This connects three producer/consumer regions rather than re-seeding their vectors independently.
The selected plane need not be the newly appended contact plane. For example, a supplied ground plane may be the first plane with approach below0.1 after the earlier ground clip, while other cases skip prior separating planes and select a later one. Tests check source order and exact data flow without asserting final acceptance by the unrecovered inner solver.
Every chain reports `completed_slide=false` and `return_word=null`. Capacity's isolated early return is tested separately; these first-contact chains begin with the previously recovered one/two seed planes and do not reach capacity. They do not complete repeated bumps, committed clipping, crease motion, native contacts or a full step/wrapper/mode/main simulation.
## Validation and next tasks
Eight independent tests verify61 gate outputs and strict thresholds/order/capacity priority,135 candidate scans/maximums/both clipped vectors, unchanged PS velocity,40 real prefix-to-gate/scan transfers, source hash/slice boundaries and explicit scope. The direct slide-prefix report regenerates unchanged; the new report reproduces twice byte-identically. Full-suite/storage/link/whitespace outcomes are recorded in the ledger.
RE-476 remains open for the complete solver. RE-480 tracks secondary-plane acceptance/reclipping, cross-product/crease normalization and additional-plane rejection, candidate commit/end-velocity updates, repeat-bump loop/time/returns; impact maximum reset/consumers, legal normal/count/basis domains and native collision/ABI; complete contact/step/wrapper/mode/main state and gameplay/macOS/Linux/Rust/Bevy/Solari. Other modes/actions/suffix/resource/playback/packet/entity/player/snapshot/rendering milestones remain open.
Follow-up: [secondary-plane solver](QVM_SLIDE_SOLVER.md) completes bounded RE-481–483, extending the earlier partial candidates through reclip, crease projection and commit or third-plane return. Its new40 contact chains include three complete early returns; this report retains its original partial boundaries. Repeated bumps/native collision/full runtime remain open under RE-480/484.