parameters: (self)
return_statement: return 0.0
docstring: Reward for the player for this state.
docstring_summary: Reward for the player for this state.
docstring_tokens: Reward for the player for this state .
function: def _rewards(self):
      """Reward for the player for this state."""
      if self._player_id == pyspiel.PlayerId.DEFAULT_PLAYER_ID:
        dist_mean = (self.distribution_average() - self.x)
  
        move = self.action_to_move(self._last_action)
        action_reward = self.dt / 2 * (-move**2 + 2 * self.cross_q * move *
                                       dist_mean - self.kappa * dist_mean**2)
  
        if self.is_terminal():
          terminal_reward = -self.terminal_cost * dist_mean**2 / 2.0
          return action_reward + terminal_reward
        return action_reward
  
      return 0.0
function_tokens: def _rewards ( self ) : if self . _player_id == pyspiel . PlayerId . DEFAULT_PLAYER_ID : dist_mean = ( self . distribution_average ( ) - self . x ) move = self . action_to_move ( self . _last_action ) action_reward = self . dt / 2 * ( - move ** 2 + 2 * self . cross_q * move * dist_mean - self . kappa * dist_mean ** 2 ) if self . is_terminal ( ) : terminal_reward = - self . terminal_cost * dist_mean ** 2 / 2.0 return action_reward + terminal_reward return action_reward return 0.0