Hi Nelson -

Nelson H. F. Beebe <be...@math.utah.edu> wrote:

> Thanks, Theo, for this good advice about random-number generators:

In this discussion, I made no comments about "random-number generators".

Instead I commented on "deterministic generators", which have been
incorrectly placed inside subsystems claiming to be random, but which
are not random at all.  I am continuing my efforts to discourage use of
such generator throughout the entire software ecosystem.

My past advice about random-number generators can found here:

    https://www.openbsd.org/papers/hackfest2014-arc4random/index.html

> >>     - if you need determinism, write your own.
> >>     - do not rely upon an external function which will make your seed
> >>       produce a different result approximately every 8 years.
> 
> I would add more points: 
> 
> * You MUST have portable source code for your generator (but you
>   probably don't need to, or should, write it yourself, unless
>   you are an expert in the field).

I have no interest in guiding programmers towards domain-specific
deterministic functions they may need for their shaders, Covid pandemic
bullshit simulations, or whatever.

> * If reproducibility of simulations matters (as it often does), set
>   the seed explicitly from your program source code or your input,
>   then print in your program output the first 50 to 100 random numbers
>   produced by your generator.  A similar list from a later run can
>   then be compared with the earlier one to verify that both use the
>   same sequence.

Wow, look what you just did.  You said a reproducible generator produces
random results.

Something cannot be random and reproduceable.  To be reproduceable, it
must be deterministic.  Deterministic is a term meaning the opposite of
random.

The very first sentence of "deterministic" in wikipedia hits the nail on
the head:

    In mathematics, computer science and physics, a deterministic system is
    a system in which no randomness is involved in the development of future
    states of the system.[1]

I am here to slowly destroy the academic culture of blending the two
concepts, because it has misled two generations of programmers to
accidentally misuse deterministic routines where they are unsuitable,
because randomness is what they actually desire.

> * Avoid generators that use floating-point arithmetic: they are
>   difficult, perhaps impossible, to make platform independent.

Even the existing integer ones (rand.3 and random.3 ) were platform
dependent, since they perform wrapping operations on a mix of 64-bit and
32-bit types.

> * Beware of old algorithms: there have been huge improvements in
>   random-number generators in the last two to three decades

None of those things are _random_ number generators.

You are clearly part of the problem!  It seems there is an academic
industry that cannot use words correctly.

> See the preamble comments in
> 
>       http://www.math.utah.edu/pub/tex/bib/prng.bib
>       http://www.math.utah.edu/pub/tex/bib/prng.html
> 
> for pointers to papers that show the extreme subtlety of long-range
> correlations in many generators that can derail simulations.

I see studies of determinism, constantly abusing the word "random".

Generations of programmers have skipped use of proper randomization
because the conversation is muddled by this garbage.  Far less than 1%
of algorithms need deterministic sequences, but it has poisoned the well
for the other >99% of use cases.


Reply via email to