Random seed initialization with splitmix

I know that to use Xoshiro256++ is better to randomize the seed with a fast rng as splitmix. This enables us to generate the 4 states of xoshiro256++.
Is this done by default?

Yes:

Although I figured out a way to majorly simplify the splitmix algorithm so that it doesn’t require arithmetic in a prime modulus, all explained in that massive comment.

5 Likes

If you’re asking about the initial seeding rather than the task splitting, then we do way better and use SHA256 to go from user-provided seeds to create the actual RNG state.

2 Likes

Have you thought about putting that comment on arxiv?

7 Likes

A post was split to a new topic: Linear relationship between Xoshiro tasks

Yeah, I’ve thought about writing it up. But making something into a paper is always so much extra work…

3 Likes

Wow, this feels like a magic trick!

1 Like

It does, right?! But task forks are inherently binary—each task only forks one child at a time—so it really felt like there had to be some way to make the task coordinates binary. The tricky bit is that you have a choice of somewhat unintuitive ways of thinking about binary “pedigree” coordinates:

  1. The parent task’s coordinates changing every time it spawns a child—weird since shouldn’t a tasks have a fixed coordinate?
  2. Upon fork, parent task is actually replaced by two children—the actual child, and a replacement of itself that is in practice the same object, but is theoretically different with a longer coordinate tuple. This is also weird.
  3. Or each task has infinite coordinates, that are all zeros beyond some point. That’s how I formalize it in my proof in the other thread.

Despite the infinite part, I think the last option is the best: each task has a single, fixed (albeit infinite) coordinate tuple.

1 Like