def __init__(
      self,
      model: language_model.LanguageModel,
      acting_player_names: Sequence[str],
      action_to_scores: Callable[[Mapping[str, str]], Mapping[str, float]],
      scores_to_observation: Callable[[Mapping[str, float]], Mapping[str, str]],
      event_resolution_component_key: str = (
          switch_act.DEFAULT_RESOLUTION_COMPONENT_KEY
      ),
      observation_component_key: str | None = (
          make_observation_component.DEFAULT_MAKE_OBSERVATION_COMPONENT_KEY
      ),
      memory_component_key: str | None = (
          memory_component.DEFAULT_MEMORY_COMPONENT_KEY
      ),
      scene_tracker_component_key: str | None = (
          scene_tracker.DEFAULT_SCENE_TRACKER_COMPONENT_KEY
      ),
      pre_act_label: str = '',
      verbose: bool = False,
  ):
    """Initialize a component for computing payoffs.

    Args:
      model: a language model
      acting_player_names: sequence of names of players whos actions influence
        the payoff.
      action_to_scores: function that maps a dictionary of actions by players to
        a dictionary of scores for each player
      scores_to_observation: function that maps a dictionary of scores for each
        player to a dictionary of observations for each player.
      event_resolution_component_key: The key of the event resolution component.
      observation_component_key: The key of the observation component to send
        observations to players. If None, no observations will be sent.
      memory_component_key: The key of the memory component to the observations
        by players. If None, no observations will be added to the memory.
      scene_tracker_component_key: The key of the scene tracker component, so
        that only participants in the current scene need to act.
      pre_act_label: Prefix to add to the output of the component when called in
        `pre_act`.
      verbose: whether to print the full update chain of thought or not
    """
    self._pre_act_label = pre_act_label

    self._model = model
    self._observation_component_key = observation_component_key
    self._memory_component_key = memory_component_key
    self._event_resolution_component_key = event_resolution_component_key
    self._acting_player_names = acting_player_names
    self._action_to_scores = action_to_scores
    self._scores_to_observation = scores_to_observation
    self._scene_tracker_component_key = scene_tracker_component_key

    self._verbose = verbose

    self._history = []
    self._player_scores = {name: 0.0 for name in self._acting_player_names}
    self._latest_action_spec_output_type = None

    self.reset()
Initialize a component for computing payoffs.

    Args:
      model: a language model
      acting_player_names: sequence of names of players whos actions influence
        the payoff.
      action_to_scores: function that maps a dictionary of actions by players to
        a dictionary of scores for each player
      scores_to_observation: function that maps a dictionary of scores for each
        player to a dictionary of observations for each player.
      event_resolution_component_key: The key of the event resolution component.
      observation_component_key: The key of the observation component to send
        observations to players. If None, no observations will be sent.
      memory_component_key: The key of the memory component to the observations
        by players. If None, no observations will be added to the memory.
      scene_tracker_component_key: The key of the scene tracker component, so
        that only participants in the current scene need to act.
      pre_act_label: Prefix to add to the output of the component when called in
        `pre_act`.
      verbose: whether to print the full update chain of thought or not
    
concordia/components/game_master/payoff_matrix.py