Hasty Briefsbeta

Bilingual

Quasirandom sequences

a day ago
  • Pseudorandom number generators (PRNGs) produce clumpy values, which can be undesirable for exhaustive exploration of a space.
  • Quasirandom number generators (QRNGs) generate uniformly dense points, improving Monte Carlo simulations by avoiding grid search artifacts and converging faster (error proportional to 1/n vs 1/√n).
  • The author implemented a Rust crate for quasirandom sequences, using a generalized golden ratio method to generate d-dimensional points.
  • The method uses the golden ratio φ and its d-dimensional generalization φ_d, with the i-th point given by (i·φ_d^1, i·φ_d^2, ...) modulo 1.
  • The library precomputes φ_d values for up to 32 dimensions and uses Rust macros for efficient tuple generation.