Used Gym Retro Functions: - legokor/reinforcement_learning GitHub Wiki

retro.make

  • Returns an environment based on the name, where action space is not restricted, in the given state(you can preset any state, with any characters) and with two players.
  • example: retro.make(env_name, use_restricted_actions=retro.Actions.ALL, state=str(state_path), players=2)

env.reset

  • Restarts the environment.

env.render

  • Makes a visual output, you can see the game itself.

env.step

  • Takes 24 digit binary number as a String.
  • Returns values of "observation, reward, done, info = env.step(x)"
    • observation: Returns an image in the format of [224][300][3] matrix.
    • reward: Rewards of the left character, based on successful hits.
    • done: True if player 1 or player 2 wins 2 rounds.
    • info: dictionary[rounds_won, wins, enemy_health, health, enemy_rounds_won]
  • example: observation, reward, done, info = env.step(f'{128:012b}'+f'{128:012b}')