We have had a number of requests for the ability to make our current Java Random deterministic. However, since we support cross-language binary capability of our sketches, having a PRNG that is deterministic only in one language is not really very useful. What is called for is a PRNG that can be made deterministic and is supported by at least the major languages, C++ and Java. In addition, if the PRNG algorithm is freely available, it could be implemented in most any language.This suggested requirement pretty much rules out the Java internal Random, which is based on the Linear Congruential Method (Knuth, The Art of Computer Programming, Vol 2, 3rd Ed. Chapter 3.2.1). This algorithm is pretty old and has been supplanted by later algorithms. And, most importantly, it doesn’t seem to be implemented by other languages or libraries.The standard PRNG in C++ is the Mersenne Twister std::mt19937. But even this has been supplanted by newer, faster, and better performing PRNGs such as the Scrambled Linear Pseudorandom Number Generators (SLPRNG) ( https://arxiv.org/pdf/1805.01407.pdf). This is a series of generators by David Blackman and Sebastiano Vigna that are in the public domain and available in a number of languages. For example, the Apache Commons-rng implements a wide variety of PRNGs including all of the variants of the newer SLPRNG family.By adopting a widely recognized, open-source, and implemented PRNG that is already available in multiple languages seems like it might be a good idea.We tend to shy away from creating dependencies in our library in order to simplify integration into multiple different platforms. But this case might be different.I welcome thoughts from the community. (edited)
