-
Notifications
You must be signed in to change notification settings - Fork 262
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Tutorial for custom env with complex shapes #1896
Comments
We can document this better. Examples: If you have a batched env with 2 agents it could have a batch size [2]. This is what will happen with a ParallelEnv for instance. All its specs will have a leading shape of Final case: your env has no batch size but it simulates several groups of agents (MARL setting). A first group named agents1 has 3 identical members and a second, agents2 has 4. The first outputs images from its steps and the second outputs a state vector of shape 5. Here's how to build it: full_observation_spec = CompositeSpec(
agents1=CompositeSpec(pixels=SomeSpec(3, 3, 64, 64), shape=[3]),
agents2=CompositeSpec(state=SomeOtherSpec(4, 5), shape=[4]),
shape=[]) I hope that clarifies things a tiny bit |
馃殌 The feature, motivation and pitch
I am totally unable to create a
EnvBase
subclass, where the*_spec
attribute have complex shapes.For example, I have a state with shape
(8,8,13)
, what shape/batch size should i give to theobservation_spec
? If I have an action of shape(8,18)
, what value to the batch size ofaction_spec
?Would this work?
Solution
A tutorial where the
shape
attribute/argument is better explored will suffice. Just give examples of all edge cases, for how to useshape
.The text was updated successfully, but these errors were encountered: