gjrand Statistical Test Suite
David Blackman's gjrand battery — a focused suite of 10 multi-dimensional collision, probability, distance, gap, and run-length tests designed specifically to expose weaknesses in modern high-speed PRNGs at 16-bit and 32-bit resolution.
gjrand Test Battery (GJ01–GJ10)
The gjrand battery evaluates PRNGs at both 16-bit and 32-bit output resolutions across five statistical dimensions — collision, probability, distance, gap, and run-length:
| ID | Test Name | Profile | Pass Criteria | Description |
|---|---|---|---|---|
| GJ01 | mcoll16 | 16-bit | Uniform collision | Multi-dimensional collision test at 16-bit output resolution (planned). |
| GJ02 | mcoll32 | 32-bit | Uniform collision | Multi-dimensional collision test at 32-bit output resolution (planned). |
| GJ03 | mprob16 | 16-bit | Byte probability | Byte-level probability uniformity test at 16-bit (planned). |
| GJ04 | mprob32 | 32-bit | Word probability | Word-level probability uniformity test at 32-bit (planned). |
| GJ05 | mdist16 | 16-bit | Distance distribution | Multi-dimensional distance metric at 16-bit (planned). |
| GJ06 | mdist32 | 32-bit | Distance distribution | Multi-dimensional distance metric at 32-bit (planned). |
| GJ07 | mgap16 | 16-bit | Gap distribution | Gap between successive equal values at 16-bit (planned). |
| GJ08 | mgap32 | 32-bit | Gap distribution | Gap between successive equal values at 32-bit (planned). |
| GJ09 | mrun16 | 16-bit | Run lengths | Ascending/descending run length distribution at 16-bit (planned). |
| GJ10 | mrun32 | 32-bit | Run lengths | Ascending/descending run length distribution at 32-bit (planned). |
[!NOTE]
All 10 tests are currently in specification stage and display asNOT IMPLEMENTEDin the dashboard. Full implementation is planned for an upcoming release.
Design Philosophy
gjrand is deliberately narrow in scope — it runs fewer tests than NIST or Dieharder but applies each at two resolutions (16-bit and 32-bit). This dual-resolution approach catches generators that pass 32-bit tests but fail when their output is folded to smaller word widths — a common failure mode for LCG variants.
When to Use gjrand
- High-Speed PRNG Validation: Rapid vetting of non-cryptographic generators (PCG, xoshiro256**, Mulberry32, SplitMix64) for game engines, simulations, and procedural generation where throughput matters more than cryptographic security.
- Reduced-Width Output Testing: Testing generators whose 64-bit internal state is folded down to 16-bit or 32-bit outputs — a common design in embedded systems and SIMD-vectorized code where alignment requirements reduce usable bits.
- xoshiro/xoroshiro Family Benchmarking: Evaluating the output of generators in the xoshiro/xoroshiro family specifically designed by Blackman & Vigna, which gjrand was crafted to complement.
- Game Engine RNG Auditing: Verifying that pseudo-random sequences used for procedural world generation, loot drops, and AI behavior do not exhibit low-dimensional correlation artifacts detectable at reduced bit widths.
NOT IMPLEMENTED for all entries until the WebAssembly backend is extended with gjrand’s multi-dimensional sampling algorithms.