(self, task, player)
Adds observables to a player for the given task.

    Args:
      task: A `soccer.Task` instance.
      player: A `Walker` instance to which observables will be added.
Adds observables to a player for the given task.
Adds observables to a player for the given task .
def __call__(self, task, player):
    """Adds observables to a player for the given task.

    Args:
      task: A `soccer.Task` instance.
      player: A `Walker` instance to which observables will be added.
    """
    # Enable proprioceptive observables.
    self._add_player_proprio_observables(player)

    # Add egocentric observations of soccer ball.
    self._add_player_observables_on_ball(player, task.ball)

    # Add egocentric observations of others.
    teammate_id = 0
    opponent_id = 0
    for other in task.players:
      if other is player:
        continue
      # Infer team prefix for `other` conditioned on `player.team`.
      if player.team != other.team:
        prefix = 'opponent_{}'.format(opponent_id)
        opponent_id += 1
      else:
        prefix = 'teammate_{}'.format(teammate_id)
        teammate_id += 1

      self._add_player_observables_on_other(player, other, prefix)

    self._add_player_arena_observables(player, task.arena)

    # Add per player game statistics.
    self._add_player_stats_observables(task, player)
def __call__ ( self , task , player ) : # Enable proprioceptive observables. self . _add_player_proprio_observables ( player ) # Add egocentric observations of soccer ball. self . _add_player_observables_on_ball ( player , task . ball ) # Add egocentric observations of others. teammate_id = 0 opponent_id = 0 for other in task . players : if other is player : continue # Infer team prefix for `other` conditioned on `player.team`. if player . team != other . team : prefix = 'opponent_{}' . format ( opponent_id ) opponent_id += 1 else : prefix = 'teammate_{}' . format ( teammate_id ) teammate_id += 1 self . _add_player_observables_on_other ( player , other , prefix ) self . _add_player_arena_observables ( player , task . arena ) # Add per player game statistics. self . _add_player_stats_observables ( task , player )