For a given seed, any Random object initialized with that seed should always produce the same sequence of numbers. This works for most seeds, but Random objects initialized with a seed of 0 appear to give a different sequence of numbers every time they’re created.
^ command line output
This is consistently reproducible for me. I’m on Windows 8.
Description:
Creates a new Random object from the given seed. If a seed isn’t specified, one will automatically be pulled from an internal entropy source.
I wonder if it is considering 0 as nil and is pulling a seed from your machine, which is consistent?
That would be my guess. I think almost everyone would by default assume zero is as valid a seed as any, and is distinct from passing nil. So this behavior is a bit surprising (and I’m guessing not intentional). It just took me an hour to hunt down a bug in my game because I made this assumption.