Giter VIP home page Giter VIP logo

Comments (6)

maximecb avatar maximecb commented on July 24, 2024

You're not the first to bring this up, which suggests it's probably a good idea to add this information to observations.

Your analysis of the options is pretty spot on, and it's good that you take code breakage into account, most people pay no attention to this.

I think I might lean towards option 2. The unseen cell type could take integer value 0, and everything else would be shifted up by 1. It probably won't break code. Actually, the upside is that a neural network (or other algorithm) trained with this new observation format should be able to take advantage of the extra information without any changes to the code.

from minigrid.

abaisero avatar abaisero commented on July 24, 2024

Good point, I agree option 2 is both the least invasive and requires less changes to models to exploit the new info: "unseen" (or "n/a") can just be a separate value in the observation image. I assume this new value would be used in all three channels, i.e. the other channels would also be shifted by one?

Related: The third channel is currently only used to indicate whether a door is open or closed, but I tend to think of it as a more general "cell/object state". Do you share this view? If new objects with a modifiable state were to be introduced, would their state also inhabit the third channel?

from minigrid.

abaisero avatar abaisero commented on July 24, 2024

This might require a new Object to be defined; Grid.encode() only has access to the objects in the grid (with None taking a special meaning), and not the agent itself.

The least invasive way seems to add an Unseen / Unknown cell type, but this seems backwards to me: If anything, an Empty cell is more of an actual physical property of the grid, compared to an Unseen. This may require more work to carefully make sure nothing breaks, but what do you think about either:

  1. Letting None mean "not applicable" and adding a new Empty cell type; or
  2. Adding both an Unknown cell type and an Empty cell type; this way the grid contents are homogeneous and always WorldObj.

I prefer number 1, but I obviously lack a lot of understanding in how this may influence and break everything else, so it's your choice.

from minigrid.

maximecb avatar maximecb commented on July 24, 2024

In terms of the least code breakage, it would be best not to add new cell types.

I would encode Unseen as (0, 0, 0) on all 3 channels and increment the existing cell type integer values by 1.

For Grid.encode(), we might want to pass the visibility mask as an optional argument.

from minigrid.

abaisero avatar abaisero commented on July 24, 2024

Just to be clear, you're suggesting that the encodings for the second and third channels should not change, right? i.e. In the color channel, 0 should remain red, which at the same time means that both empty cells and unseen cells will be encoded as having the same code as red?

from minigrid.

maximecb avatar maximecb commented on July 24, 2024

Yes

from minigrid.

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.