Farama-Foundation / Minigrid

Simple and easily configurable grid world environments for reinforcement learning
https://minigrid.farama.org/
Other
2.13k stars 611 forks source link

Agent rotation based on FullyObsWrapper #167

Closed MarcoMeter closed 2 years ago

MarcoMeter commented 2 years ago

Hi!

I made a custom environment that is wrapped using the FullyObsWrapper. Now I'm working on setting up my custom observation one-hot encoding. I've got a question concerning the agent's rotation.

The FullyObsWrapper provides the agent's position inside obs["image"]. Given the agent's position by some obs["image"][i,j], I get this piece of information [10, 0, 1] . 10 refers to the object ID. Does 1 refer to the agent's rotation?

maximecb commented 2 years ago

Hi Marco. Yes it does: https://github.com/maximecb/gym-minigrid/blob/master/gym_minigrid/wrappers.py#L241

Though maybe that should be better explained in the comments.

MarcoMeter commented 2 years ago

Thank you for the clarification!