Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Log the random seed; use a random seed (#74)
Per report in Zulip, it seems like one Recurser has repeatedly been the odd-one-out, i.e. the Recurser at the end of the list. Prior to this change, the only entropy came from the start time. I don't know whether that is considered a "good" seed; I'm suspicious that it will have many bits the same from one day to another, and that could result in some of the weirdness mentioned by a recurser. With this change: - Get a seed from the default randomness source. - Log the seed, so (if we need to later debug a shuffle) we can patch it in. (In principle - ofc we'd have to run Pairing Bot locally for that...) - Use that seed to create the shuffling RNG. As I understand it, "seed a thread-local RNG from a thread-safe RNG" is a pretty standard practice, and is relatively entropy-preserving.
- Loading branch information