RLBench icon indicating copy to clipboard operation
RLBench copied to clipboard

Consistent resetting through np.random.Generator

Open eugeneteoh opened this issue 1 year ago • 2 comments

Currently, resetting is not consistent due to two things:

  • Sampled boundary is random and depends on global np seed (https://github.com/stepjam/RLBench/blob/master/rlbench/backend/spawn_boundary.py#L159)
  • max_attempts introduces more samples. Even if a global seed is set, objects are not guaranteed to be in the same position (https://github.com/stepjam/RLBench/blob/master/rlbench/backend/scene.py#L127)\

By using np.random.Generator, we can have a seed for a Scene instance, allowing potentially allowing more determinism. https://github.com/Farama-Foundation/Gymnasium/blob/main/gymnasium/utils/seeding.py

eugeneteoh avatar Jun 13 '24 19:06 eugeneteoh

Great, I also find that even if I have set global random seed, the boundary and object position varies.

xsw1208 avatar Jun 23 '24 05:06 xsw1208

Is this still active?

vonHartz avatar Jul 30 '25 13:07 vonHartz