Comments (6)
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.
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.
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:
- Letting None mean "not applicable" and adding a new Empty cell type; or
- Adding both an
Unknown
cell type and anEmpty
cell type; this way the grid contents are homogeneous and alwaysWorldObj
.
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.
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.
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.
Yes
from minigrid.
Related Issues (20)
- [Question] Difference between Minigrid and BabyAI envs HOT 1
- [Question] Is `ActionBonus` wrapper correct ? HOT 1
- [Question] How to build custom environment with custom action space HOT 1
- Python 3.11 support is missing from the README
- [Proposal] Update documentation HOT 3
- [Proposal] Add relevant project
- [Proposal] Discrete observations
- [Bug Report] ViewSizeWrapper ignored with RGBImgPartialObsWrapper HOT 1
- [Question] Get demonstration for 'MiniGrid-MultiRoom-N4-S5-v0' HOT 1
- [Bug Report] Cannot decode obs['image'] because of no implementation of agent in minigrid/core/world_object.py
- Accessing Specific Mission in BabyAI HOT 2
- [Question] Is there any existing expert agent that can provide correct demonstration? HOT 2
- Possible bug when generating non-square DoorKey environments. HOT 4
- Relational Deep RL for minigrid HOT 2
- [Bug Report] Docu link to `minigrid/core/constants.py` broken HOT 3
- [Bug Report] FlatObsWrapper lets to Crashes Due to Concatenation of uint8 and float32 Arrays in observation Method HOT 2
- [Bug Report] Incorrect Registered Configuration in UnlockPickupEnv Documentation
- Making a specific structure in babyai env grid
- [Bug Report] Cannot run example code: TypeError: 'module' object is not callable HOT 5
- fixing position of random distractors in env
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 minigrid.