D4RL
D4RL copied to clipboard
Issue with a BFS search in maze environment
Proposal
Add the following lines to the maze_env.py:
if not(next_rowcol in next_visit): next_visit.append(next_rowcol)
This should be added to the lines 338 and 339 respectively.
Motivation
In my experiments on larger maps (40x40 rows and columns) sometimes the BFS search starts adding the same nodes to the to_visit list. The to visit list grows to large, containing billions of elements.
Pitch
I suggest a simple fix to check if the element already exists in the to_visit list before adding it to the list.
Additional context
e](https://github.com/Farama-Foundation/d4rl/issues) in the repo (required)