[Testing] EngineRandom stream decorrelation is claimed in a comment and gated nowhere #409
Labels
No labels
Alpha Release Requirement
Bugfix
Demo Target
Documentation
Major Feature
Minor Feature
priority:tier1-active
priority:tier2-foundation
priority:tier3-future
priority:tier4-deferred
Refactoring & Cleanup
system:animation
system:documentation
system:grid
system:input
system:performance
system:procgen
system:python-binding
system:rendering
system:ui-hierarchy
Tiny Feature
workflow:blocked
workflow:needs-benchmark
workflow:needs-documentation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
john/McRogueFace#409
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found during review of #394 (commit
ac29b35onsim/integration). Reported by the owner as adeclared mutation survivor; reproduced independently by the reviewer.
src/EngineRandom.cppderives each subsystem stream from the master seed withstd::seed_seq seq{ s.master, static_cast<uint32_t>(i) }. Replacing that withstd::seed_seq seq{ s.master }makes every stream emit the identical rawmt19937sequence, andall three of #394's test files pass green with zero failed assertions:
What it is not. Not a replay or determinism defect. The streams remain independent generator
objects, so a draw from AUDIO still does not advance BEHAVIOR; every replay, divergence and
stream-independence property in #394 continues to hold.
src/EngineRandom.h's stated rationale forindependent streams — that an audio-on and an audio-off run at the same seed produce the same world —
is unaffected.
What it is. Entity movement and audio variation become perfectly correlated: the same underlying
numbers drive both. That is a statistical defect, and the header comment asserting decorrelation
("
std::seed_seqmixes, so adjacent masters do not produce correlated streams") is currently anunverified claim.
Why no gate exists today, and what one would have to look like. There is no deterministic
Python-observable relating two streams: BEHAVIOR is consumed through
uniform_int_distributionandAUDIO through
uniform_real_distribution, and nothing else consumes either. Relating a move choiceto a pitch offset would mean encoding libstdc++'s distribution internals, which is a worse asset than
an ungated line.
A distribution-free dependence test is constructible and would not encode internals: over a few
hundred seeds, record entity 0's first move index and the first drawn pitch, bin the pitch into as
many bins as there are candidate moves, and chi-square the two. Under the current implementation the
two are independent by construction; under the single-argument
seed_seqthey are stronglydependent (both are dominated by the same first raw output). It is a statistical test with a flake
surface, which is why it is filed rather than required.
Deferred deliberately. Recorded so that "16 of 17 mutations caught" is not later read as "every
property of
EngineRandomis gated."