Giter Club home page Giter Club logo

Comments (3)

ShaneFlandermeyer avatar ShaneFlandermeyer commented on September 23, 2024

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.

matteobettini avatar matteobettini commented on September 23, 2024

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.

ShaneFlandermeyer avatar ShaneFlandermeyer commented on September 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.