D4RL icon indicating copy to clipboard operation
D4RL copied to clipboard

Issue with a BFS search in maze environment

Open dgumenyuk opened this issue 1 year ago • 0 comments

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

list_too_big e](https://github.com/Farama-Foundation/d4rl/issues) in the repo (required) repetitive_entires

dgumenyuk avatar Feb 27 '23 16:02 dgumenyuk