def configure_scenes(
    model: language_model.LanguageModel,
    game_master_memory: associative_memory.AssociativeMemory,
    players: Sequence[entity_agent_with_logging.EntityAgentWithLogging],
    clock: game_clock.MultiIntervalClock,
    main_player_configs: Sequence[formative_memories.AgentConfig],
    rng: random.Random,
) -> tuple[
    Sequence[Mapping[str, Sequence[scene_lib.SceneSpec]]],
    game_master.GameMaster | None,
    SchellingPayoffs,
]:
  """Configure the scene storyboard structure.

  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.
    main_player_configs: configs for the main characters
    rng: the random number generator to use.

  Returns:
    scenes: a sequence of scene specifications
  """
  happy_scene_premise = rng.choice(HAPPY_SCENE_PREMISES)
  scene_specs = {
      'happy': scene_lib.SceneTypeSpec(
          name='happy',
          premise={
              'Alice': [happy_scene_premise],
              'Bob': [happy_scene_premise],
              'Charlie': [happy_scene_premise],
          },
      ),
      'bad': scene_lib.SceneTypeSpec(
          name='bad',
          premise={
              'Alice': [BAD_SCENE_PREMISE],
              'Bob': [BAD_SCENE_PREMISE],
              'Charlie': [BAD_SCENE_PREMISE],
          },
      ),
      'worse': scene_lib.SceneTypeSpec(
          name='bad',
          premise={
              'Alice': [WORSE_SCENE_PREMISE],
              'Bob': [WORSE_SCENE_PREMISE],
              'Charlie': [WORSE_SCENE_PREMISE],
          },
      ),
  }
  scene_specs[DECISION_SCENE_TYPE], schelling_payoffs = add_choice_scene_spec(
      model=model,
      game_master_memory=game_master_memory,
      players=players,
      clock=clock,
      player_configs=main_player_configs,
      scene_type_name=DECISION_SCENE_TYPE,
  )

  scenes = [
      {
          'happy': [
              scene_lib.SceneSpec(
                  scene_type=scene_specs['happy'],
                  start_time=START_TIME + 0 * datetime.timedelta(hours=2),
                  participant_configs=main_player_configs,
                  num_rounds=1,
              ),
              scene_lib.SceneSpec(
                  scene_type=scene_specs[DECISION_SCENE_TYPE],
                  start_time=START_TIME + 1 * datetime.timedelta(hours=2),
                  participant_configs=main_player_configs,
                  num_rounds=1,
              ),
          ]
      },
      {
          'happy': [
              scene_lib.SceneSpec(
                  scene_type=scene_specs['happy'],
                  start_time=START_TIME + 2 * datetime.timedelta(hours=2),
                  participant_configs=main_player_configs,
                  num_rounds=1,
              ),
              scene_lib.SceneSpec(
                  scene_type=scene_specs[DECISION_SCENE_TYPE],
                  start_time=START_TIME + 3 * datetime.timedelta(hours=2),
                  participant_configs=main_player_configs,
                  num_rounds=1,
              ),
          ],
          'bad': [
              scene_lib.SceneSpec(
                  scene_type=scene_specs['bad'],
                  start_time=START_TIME + 2 * datetime.timedelta(hours=2),
                  participant_configs=main_player_configs,
                  num_rounds=1,
              ),
              scene_lib.SceneSpec(
                  scene_type=scene_specs[DECISION_SCENE_TYPE],
                  start_time=START_TIME + 3 * datetime.timedelta(hours=2),
                  participant_configs=main_player_configs,
                  num_rounds=1,
              ),
          ],
      },
      {
          'happy': [
              scene_lib.SceneSpec(
                  scene_type=scene_specs['happy'],
                  start_time=START_TIME + 4 * datetime.timedelta(hours=2),
                  participant_configs=main_player_configs,
                  num_rounds=1,
              ),
              scene_lib.SceneSpec(
                  scene_type=scene_specs[DECISION_SCENE_TYPE],
                  start_time=START_TIME + 5 * datetime.timedelta(hours=2),
                  participant_configs=main_player_configs,
                  num_rounds=1,
              ),
          ],
          'bad': [
              scene_lib.SceneSpec(
                  scene_type=scene_specs['bad'],
                  start_time=START_TIME + 4 * datetime.timedelta(hours=2),
                  participant_configs=main_player_configs,
                  num_rounds=1,
              ),
              scene_lib.SceneSpec(
                  scene_type=scene_specs[DECISION_SCENE_TYPE],
                  start_time=START_TIME + 5 * datetime.timedelta(hours=2),
                  participant_configs=main_player_configs,
                  num_rounds=1,
              ),
          ],
          'worse': [
              scene_lib.SceneSpec(
                  scene_type=scene_specs['worse'],
                  start_time=START_TIME + 4 * datetime.timedelta(hours=2),
                  participant_configs=main_player_configs,
                  num_rounds=1,
              ),
              scene_lib.SceneSpec(
                  scene_type=scene_specs[DECISION_SCENE_TYPE],
                  start_time=START_TIME + 5 * datetime.timedelta(hours=2),
                  participant_configs=main_player_configs,
                  num_rounds=1,
              ),
          ],
      },
  ]

  return (
      scenes,
      scene_specs[DECISION_SCENE_TYPE].override_game_master,
      schelling_payoffs,
  )
Configure the scene storyboard structure.

  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.
    main_player_configs: configs for the main characters
    rng: the random number generator to use.

  Returns:
    scenes: a sequence of scene specifications
  
examples/deprecated/modular/environment/forbidden_fruit.py