urt-rs / docs /research /QVM_SPREAD_SAMPLING.md
nmarshall's picture
qvm: hitscan rejection sampling
cd3dd4c
|
Raw History Blame Contribute Delete
1.38 kB

Hitscan rejection sampling and RNG consumption

RE-611. Reproduce with python3 scripts/analyze_qvm_spread_sampling.py; check with python3 scripts/test_qvm_spread_sampling.py. The machine report retains source identity and bounded fixtures.

The sampler executes actual290995–291078 with actual36717 for every call. Two sums of centered low15-bit samples form x/y; both radius boundaries are strict. Source291079 loops back to290995 when rejected; the bounded harness restarts at that exact point and retains RNG state. It stops at291081 when accepted. The actual parameter/speed prefixes establish local40; the intervening290969–290994 branch only alters local44 and is outside this sampler, so this does not establish the later trigonometric offset path. Seed0 remains0, produces x=y=−1 and rejects radius²2 forever in the source; the harness reports budget exhaustion after32 attempts, never a successful return. This does not prove zero is a legal runtime seed. Tests reconstruct all candidate draws, f32 components, radius and final RNG state independently. Native trig, endpoint and contact remain pending.

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.