RandomSeeding

RandomSeeding

is an option that specifies what seeding of pseudorandom generators should be done inside the operation of a function.

Details

  • Possible settings are:
  • Automaticautomatically reseed every time the function is called
    Inheriteduse externally seeded random numbers
    seeduse an explicit integer or string as a seed

Examples

open allclose all

Basic Examples  (1)

Give an explicit random seeding for FindInstance:

The result will always be the same with this seeding:

With the default Automatic seeding, a different seed is used for each instance:

Scope  (1)

Use externally seeded random numbers for FindInstance:

Repeated evaluations with no intervening use of randomness will give the same result:

If randomness is requested between evaluations, the state will change:

RandomSeeding->Inherited causes FindInstance to effectively use BlockRandom:

Properties & Relations  (1)

RandomSeeding->Inherited uses the current random state:

RandomSeeding->Automatic completely ignores the current random state:

Introduced in 2017
 (11.2)