def play_human_custom(env): """ re-using default nes-py play human function https://github.com/Kautenja/nes-py/blob/1dda1ad37a84e3ca67dfbebd7cc0c2d8e4cf2489/nes_py/app/play_human.py """ play_human(env)
def main(): """The main entry point for the command line interface.""" # parse arguments from the command line (argparse validates arguments) args = _get_args() # build the environment with the given ID env = gym.make(args.env) # play the environment with the given mode if args.mode == 'human': play_human(env) else: play_random(env, args.steps)
def main(): """The main entry point for the command line interface.""" # parse arguments from the command line (argparse validates arguments) args = _get_args() # build the environment with the given ID env = gym.make(args.env) # wrap the environment with an action space if specified if args.actionspace != 'nes': # unwrap the actions list by key actions = _ACTION_SPACES[args.actionspace] # wrap the environment with the new action space env = JoypadSpace(env, actions) # play the environment with the given mode if args.mode == 'human': play_human(env) else: play_random(env, args.steps)
def main(): """The main entry point for the command line interface.""" # parse arguments from the command line (argparse validates arguments) args = _get_args() # build the environment with the given ID env = gym.make(args.env) # wrap the environment with an action space if specified if args.actionspace != 'nes': print(args.actionspace) # unwrap the actions list by key actions = _ACTION_SPACES[args.actionspace] # wrap the environment with the new action space env = BinarySpaceToDiscreteSpaceEnv(env, actions) # wrap the environment if specified if args.wrap: env = wrap(env, agent_history_length=None) # play the environment with the given mode if args.mode == 'human': play_human(env) else: play_random(env, args.steps)