bzier / gym-mupen64plus

An OpenAI Gym environment wrapper for the Mupen64Plus N64 emulator
MIT License
91 stars 39 forks source link

Validate step action #66

Open bzier opened 6 years ago

bzier commented 6 years ago

Currently the environment (including both game envs) does not validate the action value that is passed to the _step(action) call. It turns out that in certain circumstances, this could allow an agent to incorrectly 'escape' from the confines of the game, navigate menus, etc, which it shouldn't be able to do. See here for an example.

This should be added at the top of each overload of _step(action):

assert self.action_space.contains(action)