-
Notifications
You must be signed in to change notification settings - Fork 463
reset mask bug #673
Copy link
Copy link
Open
Description
Minimal reproducing script:
1 from ale_py.vector_env import AtariVectorEnv
2 import numpy as np
3 envs = AtariVectorEnv(game='breakout', num_envs=2)
4
5 mask = np.array([False, True])
6 envs.reset(options=dict(reset_mask=mask))running this gives the following error:
Traceback (most recent call last):
File "/home/hpan/project/tmp/bug.py", line 6, in <module>
envs.reset(options=dict(reset_mask=mask))
File "/home/hpan/project/pan/.venv/lib/python3.11/site-packages/ale_py/vector_env.py", line 170, in reset
reset_indices, _ = np.where(reset_mask)
^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 1)
I also tried calling envs.ale.reset directly, but then the script just hangs.
(something like envs.ale.reset(np.arange(1), np.arange(1)))
My goal is to implement the starting state decorrelation method described in https://arxiv.org/abs/1803.02811, which was found to stabilize training for parallel environments. Currently, I think there's no easy way to do this because step is always applied to all environments.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels