Comments (3)
I see the VMAS errors above have been fixed in the nightly package. However, advice would still be appreciated for observation spaces that vary on each step. Judging by #1463, I'm guessing padding the observation is the only way.
from rl.
Thanks for the comments! Here is my take on this.
The heterogeneity discussed in the comments you linked was within a single timestep. Heterogeneity through time is a little more tricky and I think the choice of not allowing it is deliberate. @vmoens maybe can say a few things about this
I think right now the only way to have an observation space with a shape that changes through time is using padding. I.e. you create the space of size Max_N x K. You can pad the non available observations with 0s or any other value of your choice. You can also output a mask among the obs, which tells what obs in the set are valid.
This is what we do for actions spaces with available actions changing through time. There, a mask is output by the env to make the specs know what actions are to be considered available. A similar thing could be done for obs.
This is similar to what we go in PettingZoo when there is a varying number of agents each step or the game is turn-based. You can check out the PettingZoo wrapper for more info on this.
from rl.
Thanks for the comments! Here is my take on this.
The heterogeneity discussed in the comments you linked was within a single timestep. Heterogeneity through time is a little more tricky and I think the choice of not allowing it is deliberate. @vmoens maybe can say a few things about this
I think right now the only way to have an observation space with a shape that changes through time is using padding. I.e. you create the space of size Max_N x K. You can pad the non available observations with 0s or any other value of your choice. You can also output a mask among the obs, which tells what obs in the set are valid.
This is what we do for actions spaces with available actions changing through time. There, a mask is output by the env to make the specs know what actions are to be considered available. A similar thing could be done for obs.
This is similar to what we go in PettingZoo when there is a varying number of agents each step or the game is turn-based. You can check out the PettingZoo wrapper for more info on this.
Thank you! That's what I figured. This isn't a major problem for my application, so I'll close the issue now.
from rl.
Related Issues (20)
- [BUG] rollout with non-uniform tensors no longer supported HOT 7
- [Feature Request]
- [Feature Request] Integration for OpenSpiel environments HOT 3
- [BUG] "Run in Colab" button in tutorials not working
- [BUG] MultiDiscreteTensorSpec .to("mps")
- [Feature Request] DynamicTensorSpec a TensorSpec for sequential data HOT 1
- [BUG] Done/Reset not initiated when using PettingZooWrapper with Custom PettingZoo environment HOT 6
- [BUG] TruncatedNormal returns wrong values in case of asymmetric bounds HOT 1
- [Feature Request] multiple GPUs on a single machine HOT 2
- [Feature Request] ProbabilisticActor in a Composite Action Space Environment HOT 1
- [BUG] NonTensorSpec calls NonTensorData with unexpected shape argument HOT 3
- [BUG] NonTensorData disappears from environment after step_mdp() HOT 2
- [BUG] broken link in docs HOT 3
- [BUG] Default Value Mismatch Between Documentation and Implementation of the ProbabilisticActor class
- [BUG] ParallelEnv does not work with PettingZooEnv.
- [BUG] `empty_net_` in `MultiAgentNetBase` seemingly interferes with `MultiSyncDataCollector` HOT 2
- BRAX: Possible versioning issue HOT 1
- [BUG] BRAX: batch size issue HOT 5
- [BUG] Incorrect Calculation of Mode for TanhNormal Distribution HOT 8
- [BUG] `LazyTensorStorage` allocates storage on wrong device
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rl.