def add_choice_scene_spec(
    model: language_model.LanguageModel,
    game_master_memory: associative_memory.AssociativeMemory,
    players: Sequence[entity_agent_with_logging.EntityAgentWithLogging],
    clock: game_clock.MultiIntervalClock,
    player_configs: Sequence[formative_memories.AgentConfig],
    scene_type_name: str,
    verbose: bool = False,
) -> tuple[scene_lib.SceneTypeSpec, SchellingPayoffs]:
  """Add a minigame scene spec.

  Args:
    model: the language model to use.
    game_master_memory: the game master memory to use.
    players: the players to use.
    clock: the clock to use.
    player_configs: the player configs to use.
    scene_type_name: the name of the scene type.
    verbose: whether to print verbose output or not.

  Returns:
    choice_scene_type: the choice scene type.
  """
  defection_option = 'yes'
  cooperation_option = 'no'
  action_spec = agent_lib.choice_action_spec(
      call_to_action=('Would {name} eat the fruit of the ' + f'{TREE}?'),
      options=(defection_option, cooperation_option),
      tag='choice',
  )
  num_players = len(player_configs)

  def cooperator_reward_fn(num_cooperators: int) -> float:
    """A cataclysmic effect if even one player defects."""
    num_defectors = num_players - num_cooperators
    if num_defectors > 0:
      return -10.0
    else:
      return 1.0

  def defector_reward_fn(num_cooperators: int) -> float:
    """Defectors get a mild benefit from defecting but cause a big bad event."""
    num_defectors = num_players - num_cooperators
    if num_defectors > 0:
      return -9.0
    raise ValueError(
        f'defector_reward_fn called when num_defectors = {num_defectors}'
    )

  schelling_payoffs = gm_components.schelling_diagram_payoffs.SchellingPayoffs(
      model=model,
      memory=game_master_memory,
      cooperative_option=cooperation_option,
      resolution_scene=DECISION_SCENE_TYPE,
      cooperator_reward_fn=cooperator_reward_fn,
      defector_reward_fn=defector_reward_fn,
      players=players,
      acting_player_names=[cfg.name for cfg in player_configs],
      outcome_summarization_fn=outcome_summary_fn,
      clock_now=clock.now,
      name='scoring function',
      verbose=verbose,
  )
  decision_env = game_master.GameMaster(
      model=model,
      memory=game_master_memory,
      clock=clock,
      name=f'{scene_type_name} decision environment',
      players=players,
      components=[schelling_payoffs],
      action_spec=action_spec,
      update_thought_chain=[thought_chains_lib.identity],
      randomise_initiative=True,
      player_observes_event=False,
      concurrent_externalities=False,
      verbose=verbose,
  )
  choice_scene_type = scene_lib.SceneTypeSpec(
      name=scene_type_name,
      premise={
          'Alice': [f'Alice notices the {TREE}.\n'],
          'Bob': [f'Bob notices the {TREE}.\n'],
          'Charlie': [f'Charlie notices the {TREE}.\n'],
      },
      action_spec=action_spec,
      override_game_master=decision_env,
  )
  return choice_scene_type, schelling_payoffs
Add a minigame scene spec.

  Args:
    model: the language model to use.
    game_master_memory: the game master memory to use.
    players: the players to use.
    clock: the clock to use.
    player_configs: the player configs to use.
    scene_type_name: the name of the scene type.
    verbose: whether to print verbose output or not.

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