More Random # Fun
- I made a visual pattern test program for the new PRNG.
Partly for fun and also because it does give some additional information.
I compare it against JS, RANDU(8), and the Mult13P1. (from the Ipso Facto
newsletter -- thanks for telling me about that one)
At this point, I am fairly confident that the new algorithm is a good one.
Probably usable for most anything anyone will do on an 1802 or other
8-bit CPU that isn't "important". (and it may even be good enough for that)
An equivalent 16-bit conversion would probably be equally valid and
usable. Some might even consider using this one, and replacing others,
if they are not as good. (in TB or other software)
I'll code the routine. (and it will be available on these pages)
- I was messing around with this stuff some more and can now report this:
(noted in the web page comments -- I think I'm officially done testing)
A more vigorous (real) test was added called the Frequency (Monobit)
random() function, which additionally suggests that the Unsigned
8-Bit XOR-Shift PRNG Algorithm is most-probably a valid and usable
PRNG. For additional information, see the NIST Special Publication
800-22 Revision 1a document, "A Statistical Test Suite for Random
and Pseudorandom Number Generators for Cryptographic Applications",
Section 2.1 from the Computer Security Division, Computer Security
Resource Center website. Most of the tests described in that
document are fairly difficult to implement, so only Monobit was chosen.
A (separate) periodicity test suggests (barring error, etc.) that the
Unsigned 8-Bit XOR-Shift PRNG Algorithm repeats on (or approximately,
or after?) 1,032,056,991 iterations. (over 1 billion, a little over
41 million less than 2^30) If this is true, then this is additional
proof that the algorithm is valid (-ish) and pretty good. (probably)
The only question at this point is how to properly seed the PRNG.
(so the same sequence of random numbers is not produced every time (from initial use))