Skip to content

Determine policy for controlling entropy #33

@fsaad

Description

@fsaad

As it stands, Gen programs draw random bits from the global entropy store. Going forward some control over the random seed is required --- for debugging, reproduciblity, and independence of Gen code from other libraries.

The granularity of entropy control is a design choice. Some possibilities include:

  1. Continue using global seed which is set using Random.seed!(n)
    • pros: approach requiring least work
    • cons: unpredictable, no separation, harder to reproduce/debug results.
  2. Furnish each Gen method that makes random choices with an (optional) a formal parameter prng
    • pros: composes easily, reproducible, predictable, modular, adds minimal API complexity, each random procedure becomes deterministic given its inputs.
    • cons: needs implementation and design
  3. Design a special Monadic construct for the RandomSeed
    • pros: potentially more transparent to the user / designer of Gen library
    • cons: Julia does not have good native support for Monadic computation
  4. Design a single global entropy source for Gen only
    • pros: less complex than 2 and 3, separates Gen from other libraries.
    • cons: less modular, and should check if/how to implement such an object in Julia.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions