Closed JustinS6626 closed 1 year ago
You need to look at the _gen_grid
function which is run in __init__.py
https://github.com/Farama-Foundation/Minigrid/blob/8cba7942292f7ae2d44bf6130a9c18ed12fbf9c2/minigrid/envs/dynamicobstacles.py#L111
Then the obstacles are updated in the step
function https://github.com/Farama-Foundation/Minigrid/blob/8cba7942292f7ae2d44bf6130a9c18ed12fbf9c2/minigrid/envs/dynamicobstacles.py#L145
Thanks for getting back to me! I looked at those functions earlier as well, but I am only seeing the deterministic obstacle behaviour. At what lines are the randomization function calls occurring?
The place_obs
function https://github.com/Farama-Foundation/Minigrid/blob/8cba7942292f7ae2d44bf6130a9c18ed12fbf9c2/minigrid/minigrid_env.py#L310
In particular, on line 344 of the function
That makes sense now. Thanks for your help!
Question
I am a doctoral student hoping to use both the standard and random version of the dynamic obstacle gridword for an experiment, and I would like to be able to describe correctly in my write-up the process by which random obstacle behaviour is implement. I am therefore wondering what approach you are using for that, as I have been unable to locate it in the code. Thank you very much for your help.