![contra nes contra nes](https://cdn11.bigcommerce.com/s-0kvv9/images/stencil/1280x1280/products/327701/533991/pf-kcm-101__62897.1611587701.jpg)
Note:The reward is clipped into the range (-15, 15).
#Contra nes for free
These environments allow 3 attempts (lives) to play in the game. Contra is an online retro game which you can play for free here at It has the tags: action, shooting, classic, and was added on Dec 15, 2014.
![contra nes contra nes](https://2.bp.blogspot.com/-NcfjOZw6X48/VJ9Ies9hpBI/AAAAAAAAAaM/n5Vdin6fIyQ/s1600/Contra_NES.png)
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.
![contra nes contra nes](https://tcrf.net/images/a/a6/Contra_NES_US_Lv2Boss.png)
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.
#Contra nes install
The preferred installation of Contra is from pip: pip install gym-contra on The Nintendo Entertainment System (NES) using the nes-py emulator.