def __init__(
      self,
      model: language_model.LanguageModel,
      memory: associative_memory.AssociativeMemory,
      option_multipliers: Mapping[str, float],
      player_multipliers: Mapping[str, Mapping[str, float]],
      resolution_scene: str,
      players: Sequence[deprecated_agent.BasicAgent | entity_agent.EntityAgent],
      acting_player_names: Sequence[str],
      outcome_summarization_fn: OutcomeSummarizationFn,
      clock_now: Callable[[], datetime.datetime],
      relational_matrix: Mapping[str, Mapping[str, float]] | None = None,
      name: str = 'scoring function',
      verbose: bool = False,
  ):
    """Initialize a scoring function component.

    Args:
      model: a language model
      memory: an associative memory
      option_multipliers: per option multipliers of rewards
      player_multipliers: per player multipliers of rewards
      resolution_scene: on which scene type should this component be updated
        after the event, i.e. when to check the joint action and compute results
      players: sequence of agents (a superset of the active players)
      acting_player_names: sequence of names of players who act each stage
      outcome_summarization_fn: Function of joint actions, rewards, relational
        matrix and player multipliers which returns an outcome description
        message for each player
      clock_now: Function to call to get current time.
      relational_matrix: a matrix of relationships between players. The entry
        [i][j] specifies the value for player i of making the same choice as
        player j. Matrix is not assumed to be symmetric or having a particular
        value on the diagonal. If `None`, all players are assumed to have value
        of 1, including self relationships (diagonal).
      name: name of this component e.g. Possessions, Account, Property, etc
      verbose: whether to print the full update chain of thought or not
    """
    self._model = model
    self._memory = memory

    self._option_multipliers = option_multipliers
    self._player_multipliers = player_multipliers

    self._players = players
    self._acting_player_names = acting_player_names
    self._outcome_summarization_fn = outcome_summarization_fn
    self._clock_now = clock_now
    self._name = name
    self._verbose = verbose

    self._history = []
    self._state = ''
    self._partial_states = {player.name: '' for player in self._players}
    self._player_scores = {player.name: 0 for player in self._players}

    if relational_matrix is None:
      self._relational_matrix = {
          name: {name_b: 1.0 for name_b in self._acting_player_names}
          for name in self._acting_player_names
      }
      for name in self._acting_player_names:
        self._relational_matrix[name][name] = 0.0
    else:
      if len(relational_matrix) != len(self._acting_player_names):
        raise ValueError(
            'Relational matrix must have the same length as the number of'
            ' acting players.'
        )
      for _, row in relational_matrix.items():
        if len(row) != len(self._acting_player_names):
          raise ValueError(
              'Relational matrix rows must have the same length as the number'
              ' of acting players.'
          )
      self._relational_matrix = copy.deepcopy(relational_matrix)

    self._resolution_scene = resolution_scene
    self._current_scene = current_scene.CurrentScene(
        name='current scene type',
        memory=self._memory,
        clock_now=self._clock_now,
        verbose=self._verbose,
    )

    self.reset()
    # Set the initial state's string representation.
    self.update()
Initialize a scoring function component.

    Args:
      model: a language model
      memory: an associative memory
      option_multipliers: per option multipliers of rewards
      player_multipliers: per player multipliers of rewards
      resolution_scene: on which scene type should this component be updated
        after the event, i.e. when to check the joint action and compute results
      players: sequence of agents (a superset of the active players)
      acting_player_names: sequence of names of players who act each stage
      outcome_summarization_fn: Function of joint actions, rewards, relational
        matrix and player multipliers which returns an outcome description
        message for each player
      clock_now: Function to call to get current time.
      relational_matrix: a matrix of relationships between players. The entry
        [i][j] specifies the value for player i of making the same choice as
        player j. Matrix is not assumed to be symmetric or having a particular
        value on the diagonal. If `None`, all players are assumed to have value
        of 1, including self relationships (diagonal).
      name: name of this component e.g. Possessions, Account, Property, etc
      verbose: whether to print the full update chain of thought or not
    
concordia/components/game_master/deprecated/coordination_payoffs.py