-
Notifications
You must be signed in to change notification settings - Fork 162
Open
Description
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:
- 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.
- 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
- 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
- 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
Labels
No labels