Download docs/research/QVM_BOT_COLLISION_BATCH.md from nmarshall/urt-rs: direct link, hf CLI and curl.
- Browser
- Download file 6.69 kB
-
https://huggingface.co/nmarshall/urt-rs/resolve/main/docs/research/QVM_BOT_COLLISION_BATCH.md
- Command line
-
hf download hf://nmarshall/urt-rs/docs/research/QVM_BOT_COLLISION_BATCH.md
-
curl -L -o QVM_BOT_COLLISION_BATCH.md https://huggingface.co/nmarshall/urt-rs/resolve/main/docs/research/QVM_BOT_COLLISION_BATCH.md
Bot callbacks and spawn collision boundaries: RE-874–883
Ten separately committed tasks extend original QVM execution and Rust policies. These are bounded source contracts; they do not establish a complete playable game or native botlib/collision parity.
| Task | Original evidence / Rust port | Cases |
|---|---|---|
| RE-874 | Bot winner scan122143 | 64 |
| RE-875 | Rust winner policy | 64 |
| RE-876 | Breeding/reset121987 | 64 |
| RE-877 | Rust breeding policy | 64 |
| RE-878 | Post-map client dispatch249007 | 72 |
| RE-879 | Rust callback scheduling | 72 |
| RE-880 | Spawn overlap167638 | 32 |
| RE-881 | Rust overlap boundary | 32 |
| RE-882 | Rotation122230 with recovered bot children | 96 |
| RE-883 | Rust composed bot rotation | 96 |
Recovered behavior
Bot records have stride9108 and64 slots. Activity is read at35145324, the two counter bases are35151356/35151352, and the native handle base is35151852. The source shifts the first counter by1, subtracts the second with signed word wrapping, then converts to f32. Inactive slots produce -1. The write selection begins at score0, uses strict greater-than, and preserves the first tied winner. A winner supplies its handle and the filename pointer to native -546; an entirely nonpositive population requests no write.
The breeding body builds all64 fitness words before native -565 selection. On a nonzero supplied result it dispatches -566 with three selected handles, then -567 with the third handle and raw1.0. It then rereads activity and clears both counters only for active records. Supplied activation during selection changes which counters clear. Extreme counters, f32 precision, ties and inactive selected indices are included. The terms wins/losses, genome and breeding are descriptive interpretations of these fields and the observed bot_interbreedwrite context; exact native botlib implementation, genetic algorithm, serialization and counter-update semantics remain unverified.
The shared-state rotation fixtures execute122230,122143,121987 and36038. Enabled counters advance toward their threshold; at the boundary the supplied cvar refresh happens first. A nonempty refreshed filename requests winner selection and an engine clear, then breeding/reset. Empty names still breed/reset. Disabled/below-threshold paths preserve bot state. VM filename bytes remain after the captured engine clear. Optional child handlers were added to the existing source rotation helper without changing default capture behavior; existing rotation and normal-map fixtures also passed focused regression checks.
Post-map249007 iterates level count34992524, distinct from the max-clients cvar used in other paths. Each state2 client dispatches246746 followed by246963. Its second call remains unconditional even if the first disconnects that client. Supplied activation of later clients changes later dispatch. Rust supports this ordering through typed callbacks; callback changes to the count/base pointer, the two child bodies and engine integration remain open.
Spawn167638 adds six original f32 bounds constants to origin fields92/96/100, then requests native -33 with capacity1024. Any returned entity with nonzero pointer at offset520 causes an immediate true result. No health/team/activity check occurs in this body. Fixtures include repeated indices, negative/zero counts, signed nonzero client words, f32 rounding and a blocking client in the last of1024 results. Actual spatial query answers remain supplied. Rust validates finite bounds and positive result counts/indices before scanning; malformed native inputs are outside the source parity domain. The next batch integrates this query into fallback and camera fixtures; native world collision remains open.
Validation and storage
Each task used focused cargo xtask test-group <name> before its own commit, including selected report regeneration twice, source/Rust parity, scoped gameplay tests where applicable, asset storage policy, documentation links and whitespace checks. The ten groups are qvm-bot-best, rust-bot-best, qvm-bot-breed, rust-bot-breed, qvm-post-map-clients, rust-post-map-clients, qvm-spawn-overlap, rust-spawn-overlap, qvm-bot-rotation and rust-bot-rotation. The registry regression covers each source-report-to-Rust-report edge and each native_policy consumer. Shared Rust map-command changes also select composed bot rotation.
All Python processes use the already-resolved Nix Python declared by flake.nix, with explicit PYTHON inherited by xtask and Git hooks. Original assets remain in .cache; no asset payload was changed. After commit ten, cargo xtask test-full --since 40af75ff passed once: 1,723 Python tests and180 Rust tests (assets10, gameplay140, xtask30). All64 affected report producers regenerated twice deterministically. Storage policy, links across447 documentation files and whitespace checks passed, with no generated report drift. These validation notes were amended into task ten.
Follow-up work (expanded by RE-884–893)
- Integrate actual167638 overlap into actual168114 fallback and6717 camera fixtures; preserve query order, short-circuiting and query-result ownership.
- Connect Rust overlap queries to fallback selection through a typed spatial-query interface; then validate actual native broadphase and world collision.
- Compose actual249007 dispatch into6939 normal and series paths, recover246746/246963, and explicitly handle count/base changes during callbacks.
- Recover native -546/-565/-566/-567 implementations and confirm bot record counter semantics, selection domains and file ownership; integrate composed bot rotation into map flow.
- Recover221662 fallback map file parsing/commands and compose it with7188 and complete6939/readiness ownership.
- Reuse existing allocator277165/initializer277125 research when composing event construction, linking and lifetime; expand unsupported capacity/alias domains instead of duplicating existing work.
- Compose camera/respawn175123/slow setup156523 into complete begin-intermission, and join ranking, scoreboard publication and real network/configstrings.
- Validate Linux/macOS native gameplay and Bevy/Solari rendering. Full playable-game completion remains open.
RE-884–893 completes the bounded fallback/camera and normal persistence compositions. Its RE-894 list supersedes the historical follow-up list above.