entity-neural-network / entity-gym

Standard interface for entity based reinforcement learning environments.
Other
35 stars 5 forks source link

Add method to set environment random seed #5

Open cswinter opened 2 years ago

cswinter commented 2 years ago

Discussion from discord:

Bam4d — 05/11/2022 It doesnt look like we have a way to seed environments at the moment?

SentientMatter — 05/11/2022 that's a good point maybe reset should take a seed argument which the parallel envs set on the first reset call, derived from a seed and the env index?

Bam4d — 05/11/2022 yeah that seems reasonable.. or we can just have a seed() function which we call when the envs are created (then do the calc within there)?

SentientMatter — 05/11/2022 makes sense, it's a bit more flexible if we don't tie it into reset. so we'd just (optionally) call the seed method before the first reset in that case. [9:07 AM] probably the VecEnv probably should have a seed method as well? [9:08 AM] we'd want to ensure that all VecEnv implementations do seeding calculations in the same way, so the seeding is still the same irregardless of whether you use ListEnv or ParListEnv [9:09 AM] we can just implement one function that calculates the seed for an environment given root seed and environment index, and then require that it's used by all the implementations

Bam4d — 05/11/2022 yeah sounds good

Bam4d — 05/11/2022 we also want to be able to set the environment eval seed separately [9:32 AM] common thing to do in procgen is use a subset of seeds for training and then allow all seeds in evaluation