Farama-Foundation / Minigrid

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

Width and height cannot be less than 3 #166

Closed epignatelli closed 2 years ago

epignatelli commented 2 years ago

Hey Maxime, I just noticed that Grid does not allow for observations of 1 cell. https://github.com/maximecb/gym-minigrid/blob/6116191b15aec9e09e4b48edd16f144e31b412fa/gym_minigrid/minigrid.py#L338-L339

Given that a 1-cell grid does not make much sense, Grid is also used for defining agent views. Any reason why that is not:

        assert width >= 1
        assert height >= 1

?

maximecb commented 2 years ago

Fair enough, we could change that to 1. Feel free to open a PR.