Reproducible results with the RandomAgent #251
-
I try to achieve reproducible results with the RandomAgent. As I understand it, I should get the same results by specifying a seed, e.g.: agent = RandomAgent(
action_space=env.action_space, num_actions=env.max_allowed_actions, seed=42
) However, if I change the number of episodes I get different different results. Shouldn't the results be identical in every episode? What is the purpose of the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, Please find my answers below: However, if I change the number of episodes I get different different results. Shouldn't the results be identical in every episode? What is the purpose of the env seed that can be assigned in the def evaluate(...) method? What is the noop_values argument in the RandomAgent used for? |
Beta Was this translation helpful? Give feedback.
Hi,
Please find my answers below:
However, if I change the number of episodes I get different different results. Shouldn't the results be identical in every episode?
Not quite. The seed generation provides a starting point for an (infinite) sequence of random numbers. That is, every episode may use a different seed in generating randomness, but the sequence of random numbers and outcome should still be identical each time you run the experiment (if you find this is not working, let us know). The run_gym examples all fix the seed, if I recall. To get the reproducible results with random agent, you need to fix the environment seed and the random policy seed, since they each use their own RN…