pkel / cpr

consensus protocol research
8 stars 2 forks source link

Seed OCaml random state from Python #38

Open pkel opened 1 year ago

pkel commented 1 year ago

For reproducible evaluations it would be great if we can set the RL-engine's (OCaml) random state from the Python API.

# Option 1
env = gym.make("cpr_gym:cpr-v0", seed=42)
# Option 2
env.reset(seed=42)
# Option 3
env.set_random_state(42)

Option 3 is most versatile. We could call set_random_state from reset and make/__init__ already calls reset.