sail-sg / envpool

C++-based high-performance parallel environment execution engine (vectorized env) for general RL environments.

Home Page:https://envpool.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] In Atari, noop_max=0 leads to a segmentation fault

mklissa opened this issue · comments

Describe the bug

A value of noop_max=0 leads to segmentation fault when creating an Atari environment.

To Reproduce

Running this minimal code with version envpool==0.8.1 leads to the error.

import envpool


envs = envpool.make(
    "Pong-v5",
    env_type="gym",
    noop_max=0,
    num_envs=1,
)

envs.reset()
Segmentation fault

Expected behavior

If I understand correctly the module, random_noop=0 should be an option as repeat_action_probability=0.25 (sticky actions) does a better job at stochasticity as per Machado et al. 2017. It is also the default in the high quality Dopamine implementation of DQN-style aglorithms for Atari.

System info

Describe the characteristic of your environment:

  • Describe how the library was installed (pip, source, ...)
  • Python version
  • Versions of any other relevant libraries
import envpool, numpy, sys
print(envpool.__version__, numpy.__version__, sys.version, sys.platform)

0.8.1 1.24.2 3.8.2 (default, May 15 2020, 20:21:35) 
[GCC 9.3.0] linux

Additional context

Add any other context about the problem here.

Reason and Possible fixes

If you know or suspect the reason for this bug, paste the code lines and suggest modifications.

Checklist

  • I have checked that there is no similar issue in the repo (required)
  • I have read the documentation (required)
  • I have provided a minimal working example to reproduce the bug (required)