Closed raymondchua closed 2 years ago
Try env.grid.set(i, j, None)
https://github.com/maximecb/gym-minigrid/blob/master/gym_minigrid/minigrid.py#L373
@maximecb does this also work for the agent? I would like to position the agent on certain tiles in training and on different ones in testing.
Thanks for the active involvment here!
There's a method place_agent
to do this. Would recommend using grep
to search through the source code for usage:
https://github.com/maximecb/gym-minigrid/blob/master/gym_minigrid/minigrid.py#L959
I tried the env.grid function but it did not work for my case. Maybe the none work (for removing an existing goal) but how can I set a new goal in the midst of training?
Take a look at how objects are placed in the code for the existing environments, and how these functions are defined: https://github.com/maximecb/gym-minigrid/blob/master/gym_minigrid/envs/empty.py
Hi! Is there a way I can remove objects? I would like to move the goal (ie. change the goal position) after some iterations of training.