original_docstring:  play one agent vs the other in modified gym-style loop. 
docstring: play one agent vs the other in modified gym-style loop.
docstring_tokens: play one agent vs the other in modified gym - style loop .
code: def rollout(env, policy_1):
    """ play one agent vs the other in modified gym-style loop. """
    obs_1, obs_2 = env.reset()
  
    done = False
    total_reward = 0
  
    while not done:
  
      action_1, action_2 = policy_1.predict(obs_1, obs_2)
      obs_arr, reward, done, _ = env.step([action_1, action_2])
      obs_1 = obs_arr[0]
      obs_2 = obs_arr[1]
  
      total_reward += reward
  
    return total_reward
code_tokens: def rollout ( env , policy_1 ) : obs_1 , obs_2 = env . reset ( ) done = False total_reward = 0 while not done : action_1 , action_2 = policy_1 . predict ( obs_1 , obs_2 ) obs_arr , reward , done , _ = env . step ( [ action_1 , action_2 ] ) obs_1 = obs_arr [ 0 ] obs_2 = obs_arr [ 1 ] total_reward += reward return total_reward
short_docstring: play one agent vs the other in modified gym-style loop.
short_docstring_tokens: play one agent vs the other in modified gym - style loop .
comment: """ play one agent vs the other in modified gym-style loop. """