original_docstring: Wraps an Atari 2600 Gym environment with some basic preprocessing.
  
    This preprocessing matches the guidelines proposed in Machado et al. (2017),
    "Revisiting the Arcade Learning Environment: Evaluation Protocols and Open
    Problems for General Agents".
  
    The created environment is the Gym wrapper around the Arcade Learning
    Environment.
  
    The main choice available to the user is whether to use sticky actions or not.
    Sticky actions, as prescribed by Machado et al., cause actions to persist
    with some probability (0.25) when a new command is sent to the ALE. This
    can be viewed as introducing a mild form of stochasticity in the environment.
    We use them by default.
  
    Args:
      game_name: str, the name of the Atari 2600 domain.
      sticky_actions: bool, whether to use sticky_actions as per Machado et al.
  
    Returns:
      An Atari 2600 environment with some standard preprocessing.
    
docstring: Wraps an Atari 2600 Gym environment with some basic preprocessing.
  This preprocessing matches the guidelines proposed in Machado et al. (2017),
  "Revisiting the Arcade Learning Environment: Evaluation Protocols and Open
  Problems for General Agents".
  
  The created environment is the Gym wrapper around the Arcade Learning
  Environment.
  
  The main choice available to the user is whether to use sticky actions or not.
  Sticky actions, as prescribed by Machado et al., cause actions to persist
  with some probability (0.25) when a new command is sent to the ALE. This
  can be viewed as introducing a mild form of stochasticity in the environment.
  We use them by default.
docstring_tokens: Wraps an Atari 2600 Gym environment with some basic preprocessing . This preprocessing matches the guidelines proposed in Machado et al . ( 2017 ) " Revisiting the Arcade Learning Environment : Evaluation Protocols and Open Problems for General Agents " . The created environment is the Gym wrapper around the Arcade Learning Environment . The main choice available to the user is whether to use sticky actions or not . Sticky actions as prescribed by Machado et al . cause actions to persist with some probability ( 0 . 25 ) when a new command is sent to the ALE . This can be viewed as introducing a mild form of stochasticity in the environment . We use them by default .
code: def create_atari_environment(game_name, sticky_actions=True):
    """Wraps an Atari 2600 Gym environment with some basic preprocessing.
  
    This preprocessing matches the guidelines proposed in Machado et al. (2017),
    "Revisiting the Arcade Learning Environment: Evaluation Protocols and Open
    Problems for General Agents".
  
    The created environment is the Gym wrapper around the Arcade Learning
    Environment.
  
    The main choice available to the user is whether to use sticky actions or not.
    Sticky actions, as prescribed by Machado et al., cause actions to persist
    with some probability (0.25) when a new command is sent to the ALE. This
    can be viewed as introducing a mild form of stochasticity in the environment.
    We use them by default.
  
    Args:
      game_name: str, the name of the Atari 2600 domain.
      sticky_actions: bool, whether to use sticky_actions as per Machado et al.
  
    Returns:
      An Atari 2600 environment with some standard preprocessing.
    """
    game_version = 'v0' if sticky_actions else 'v4'
    full_game_name = '{}NoFrameskip-{}'.format(game_name, game_version)
    env = gym.make(full_game_name)
    # Strip out the TimeLimit wrapper from Gym, which caps us at 100k frames. We
    # handle this time limit internally instead, which lets us cap at 108k frames
    # (30 minutes). The TimeLimit wrapper also plays poorly with saving and
    # restoring states.
    env = env.env
    env = preprocessing.AtariPreprocessing(env)
    return env
code_tokens: def create_atari_environment ( game_name , sticky_actions = True ) : game_version = 'v0' if sticky_actions else 'v4' full_game_name = '{}NoFrameskip-{}' . format ( game_name , game_version ) env = gym . make ( full_game_name ) env = env . env env = preprocessing . AtariPreprocessing ( env ) return env
short_docstring: Wraps an Atari 2600 Gym environment with some basic preprocessing.
short_docstring_tokens: Wraps an Atari 2600 Gym environment with some basic preprocessing .
comment: """Wraps an Atari 2600 Gym environment with some basic preprocessing.
  
    This preprocessing matches the guidelines proposed in Machado et al. (2017),
    "Revisiting the Arcade Learning Environment: Evaluation Protocols and Open
    Problems for General Agents".
  
    The created environment is the Gym wrapper around the Arcade Learning
    Environment.
  
    The main choice available to the user is whether to use sticky actions or not.
    Sticky actions, as prescribed by Machado et al., cause actions to persist
    with some probability (0.25) when a new command is sent to the ALE. This
    can be viewed as introducing a mild form of stochasticity in the environment.
    We use them by default.
  
    Args:
      game_name: str, the name of the Atari 2600 domain.
      sticky_actions: bool, whether to use sticky_actions as per Machado et al.
  
    Returns:
      An Atari 2600 environment with some standard preprocessing.
    """$SEP$# Strip out the TimeLimit wrapper from Gym, which caps us at 100k frames. We$SEP$# handle this time limit internally instead, which lets us cap at 108k frames$SEP$# (30 minutes). The TimeLimit wrapper also plays poorly with saving and$SEP$# restoring states.