Off by one error
aswin-raghavan opened this issue · 1 comments
_agent_i_obs = [pos[0] / self._grid_shape[0], pos[1] / (self._grid_shape[1] - 1)] # coordinates
Should be
_agent_i_obs = [pos[0] / (self._grid_shape[0] - 1), pos[1] / (self._grid_shape[1] - 1)] # coordinates
Hi @aswin-raghavan,
Thanks for finding this bug. I would be happy to receive a PR on this.
Note for others : This is a normalization factor to get the position coordinates in the range of [0,1]. In the current state, It's off by 1 which would give us position coordinates in the range of [0,0.8]. Implying, we still had one to one mapping from normalized form to actual position coordinates justifying the trainability of the agents. At the same time, it should be normalized in the correct range as suggested.