
The environments only send reward-able game-play frames to agents No cut-scenes, loading screens, etc. These environments allow 3 attempts (lives) to play in the game. NOTE: remove calls to render in training code for a nontrivial speedup. NOTE: ContraEnv.make is just an alias to gym.make for convenience.

reset () for step in range ( 5000 ): if done : print ( "Over" ) break state, reward, done, info = env. action_space ) print ( "observation_space ", env. make ( 'Contra-v0' ) env = JoypadSpace ( env, RIGHT_ONLY ) print ( "actions", env. from nes_py.wrappers import JoypadSpace import gym from Contra.actions import SIMPLE_MOVEMENT, COMPLEX_MOVEMENT, RIGHT_ONLY env = gym. See Contra/actions.py for a breakdown of the legal actions in each of these three lists. To contstrain this,ContraEnv.actions provides three actions lists (RIGHT_ONLY, SIMPLE_MOVEMENT, and COMPLEX_MOVEMENT) for the nes_py.wrappers.JoypadSpace wrapper. By default, ContraEnv use the full NES action space of 256 discrete actions. This is because gym environments are registered at runtime.

You must import ContraEnv before trying to make an environment. The preferred installation of Contra is from pip: pip install gym-contra on The Nintendo Entertainment System (NES) using the nes-py emulator.
