def add_choice_scene_spec(
    *,
    model: language_model.LanguageModel,
    game_master_memory: associative_memory.AssociativeMemory,
    scene_name: str,
    players: Sequence[entity_agent_with_logging.EntityAgentWithLogging],
    clock: game_clock.MultiIntervalClock,
    player_configs: Sequence[formative_memories.AgentConfig],
    option_multiplier: Mapping[str, float],
    scene_type_name: str,
    pubs: Sequence[str],
    rng: random.Random,
    relationship_matrix: Mapping[str, Mapping[str, float]] | None,
    verbose: bool = False,
) -> tuple[scene_lib.SceneTypeSpec, CoordinationPayoffs]:
  """Add a minigame scene spec.

  Args:
    model: the language model to use.
    game_master_memory: the game master memory to use.
    scene_name: the name of the scene
    players: the players to use.
    clock: the clock to use.
    player_configs: the player configs to use.
    option_multiplier: the option multipliers to use.
    scene_type_name: the name of the scene type.
    pubs: the pubs to use.
    rng: the random number generator to use.
    relationship_matrix: whether to use relational matrix or not.
    verbose: whether to print verbose output or not.

  Returns:
    choice_scene_type: the choice scene type.
  """
  action_spec = agent_lib.choice_action_spec(
      call_to_action=_CALL_TO_ACTION,
      options=pubs,
      tag='choice',
  )
  player_multipliers = {
      cfg.name: cfg.extras['preference'] for cfg in player_configs
  }

  names = [cfg.name for cfg in player_configs]

  coordination_payoffs = CoordinationPayoffs(
      model=model,
      memory=game_master_memory,
      option_multipliers=option_multiplier,
      player_multipliers=player_multipliers,
      resolution_scene=DECISION_SCENE_TYPE,
      players=players,
      acting_player_names=[cfg.name for cfg in player_configs],
      outcome_summarization_fn=outcome_summary_fn,
      relational_matrix=relationship_matrix,
      clock_now=clock.now,
      name='scoring function',
      verbose=verbose,
  )
  decision_env = game_master.GameMaster(
      model=model,
      memory=game_master_memory,
      clock=clock,
      name=scene_name,
      players=players,
      components=[coordination_payoffs],
      action_spec=action_spec,
      update_thought_chain=[thought_chains_lib.identity],
      randomise_initiative=True,
      player_observes_event=False,
      concurrent_externalities=False,
      verbose=verbose,
  )

  if relationship_matrix:
    friendship_statements = generate_relationship_statements(
        names, relationship_matrix, rng
    )
  else:
    friendship_statements = {name: [''] for name in names}

  premise = {
      player.name: [
          f'{player.name} realises it is time to go watch the game at a pub.\n'
      ] + friendship_statements[player.name]
      for player in players
  }

  choice_scene_type = scene_lib.SceneTypeSpec(
      name=scene_type_name,
      premise=premise,
      action_spec=action_spec,
      override_game_master=decision_env,
  )
  return choice_scene_type, coordination_payoffs
Add a minigame scene spec.

  Args:
    model: the language model to use.
    game_master_memory: the game master memory to use.
    scene_name: the name of the scene
    players: the players to use.
    clock: the clock to use.
    player_configs: the player configs to use.
    option_multiplier: the option multipliers to use.
    scene_type_name: the name of the scene type.
    pubs: the pubs to use.
    rng: the random number generator to use.
    relationship_matrix: whether to use relational matrix or not.
    verbose: whether to print verbose output or not.

  Returns:
    choice_scene_type: the choice scene type.
  
examples/deprecated/modular/environment/pub_coordination.py