parameters: (self, game, population=None)
docstring: Constructor; should only be called by Game.new_initial_state.*.
  
      Args:
        game: MFGPredatorPreyGame for which a state should be created.
        population: ID of the population to create this state for. Must be in
          [0, num_players()) or None.
          States with population=None cannot be used to perform game actions.
docstring_summary: Constructor; should only be called by Game.new_initial_state.*.
docstring_tokens: Constructor ; should only be called by Game . new_initial_state . * .
function: def __init__(self, game, population=None):
      """Constructor; should only be called by Game.new_initial_state.*.
  
      Args:
        game: MFGPredatorPreyGame for which a state should be created.
        population: ID of the population to create this state for. Must be in
          [0, num_players()) or None.
          States with population=None cannot be used to perform game actions.
      """
      super().__init__(game)
      # Initial state where the initial position is chosen according to
      # an initial distribution.
      self._is_position_init = True
      self._player_id = pyspiel.PlayerId.CHANCE
      # Population this state corresponds to. Can be None, in which
      # case, ApplyAction() is forbidden.
      self._population = population
      if self._population is not None:
        assert 0 <= self._population < self.num_players()
      # When set, <int>[2] numpy array representing the x, y position on the grid.
      self._pos = None  # type: Optional[np.ndarray]
      self._t = 0
      self.size = game.size
      # Number of states in the grid.
      self.num_states = self.size**2
      self.horizon = game.horizon
      self.reward_matrix = game.reward_matrix
      self.geometry = game.geometry
      self._returns = np.zeros([self.num_players()])
  
      # Represents the current probability distribution over game states
      # (when grouped for each population). Initialized with a uniform
      # distribution.
      self._distribution = [1. / self.num_states] * (
          self.num_states * self.num_players())
function_tokens: def __init__ ( self , game , population = None ) : super ( ) . __init__ ( game ) # Initial state where the initial position is chosen according to # an initial distribution. self . _is_position_init = True self . _player_id = pyspiel . PlayerId . CHANCE # Population this state corresponds to. Can be None, in which # case, ApplyAction() is forbidden. self . _population = population if self . _population is not None : assert 0 <= self . _population < self . num_players ( ) # When set, <int>[2] numpy array representing the x, y position on the grid. self . _pos = None # type: Optional[np.ndarray] self . _t = 0 self . size = game . size # Number of states in the grid. self . num_states = self . size ** 2 self . horizon = game . horizon self . reward_matrix = game . reward_matrix self . geometry = game . geometry self . _returns = np . zeros ( [ self . num_players ( ) ] ) # Represents the current probability distribution over game states # (when grouped for each population). Initialized with a uniform # distribution. self . _distribution = [ 1. / self . num_states ] * ( self . num_states * self . num_players ( ) )