-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V2 has no way to seed the env #63
Comments
I'm not sure if it makes sense to add a seed to the api if rlgym itself doesn't use anything random. I'm more inclined towards these compatibility things being handled by the specific wrapper if necessary (PettingZoo in this particular case) since the randomness would come from the state mutator or the transition engine. I don't think PettingZoo has the best api, it inherited a lot of stuff from Gym that is not that good. For instance, a seed value may not be enough to deterministically set an environment, in rlgym v2 we're aiming more towards snapshots for that which also can contain config object metadata. This approach is more transparent to the user since you don't have to handle a seed value explicitly |
Per my original comment, there are already two uses of randomness in the RLGym source code (although one does appear to be dead code), and the RocketSim Arena can be seeded as well. I believe in the case of RLGym, the RocketSim seed would only impact demo spawns, but you'd need to check with @ZealanL for that. Regarding snapshots, I'm not sure if RocketSim exposes the internal state of the prng that it uses. Is it your expectation that snapshotting will be the primary mechanism for ensuring determinism, or will it be the only method? Or put differently, will it still be possible to pass a prng seed through to RocketSim or other future envs that make use of seeding to ensure determinism? So long as it's possible and not super cumbersome/inefficient to do so in the context of a PettingZoo wrapper, I'm happy with whatever semantics you decide on for the API. |
In v2 there's no mention of
seed
in the RLGym class. FWIW, PettingZoo passes it as an optional arg to the reset function.I'm also seeing two sources of randomness in the code so far. IIRC RocketSim also supports seeding its prng, so you'll likely want to support that.
Current use of PRNG in this code:
random.shuffle
in the KickoffMutatornp.random
, used inrand_vec3
andrand_uvec3
The text was updated successfully, but these errors were encountered: