Random Number Generators in Modeling and Simulation

Authors

  • Shreya Rachakonda Westfield High School, Chantilly, Virginia
  • Raahim Javaid Centreville High School, Clifton, Virginia
  • Hamdi Kavak Department of Computational and Data Sciences, George Mason University, Fairfax, VA

DOI:

https://doi.org/10.13021/jssr2025.5216

Abstract

Random number generation is essential to data science, operations research, cryptography, and especially modeling and simulation. Specifically, it is used in seeding experiments in operations research, generating safe keys in cryptography, and characterizing stochastic model behavior in simulations. This study investigates true random number generators (TRNGs), which create non-deterministic outputs based on physical processes like quantum tunneling. While pseudo-random number generators (PRNGs) like the Mersenne Twister (MT) and Linear Congruential Generator (LCG) are frequently used for their accessibility and speed, based on our research, TRNG's utilization in ABM remains unexplored. Our analysis compares PRNGs (MT, LCG) and TRNGs (SwiftRNG Z, SwiftRNG LE, TrueRNG 3, InfNoise) through both statistical testing and simulation-based experimentation. We first employed the NIST SP 800-22 statistical test suite of 15 tests (from frequency to linear complexity), applied on a thousand independent samples each with two million 64-bit binary numbers per RNG. Our best performing TRNG (SwiftZ) and PRNG (MT) showed consistent p-value uniformity (~0.48-0.52) with all tests passing the NIST threshold (≥965/1000), indicating high-quality randomness. The Non-Overlapping Template Test, which ran 148 tests per file, confirmed robust results with pass rates above 98.5 percent and an average p-value of 0.50. Subsequently, we created a Schelling Segregation Model on NetLogo with different parameters, and then built our own segregation model on Python which plugged in data from the TRNGs. Comparing the percent similar over time from both models using a variety of parameters, we found that both NetLogo and the model based on TRNG data produced the same graphs. Our findings from the observation of ABM and the NIST results emphasize the importance of true randomness in hardware generation for enhancing the realism and unpredictability of complex ABM.

Published

2025-09-25

Issue

Section

College of Science: Department of Computational and Data Sciences