def sample_parameters(seed: int | None = None):
  """Samples a set of parameters for the world configuration."""
  seed = seed if seed is not None else random.getrandbits(63)

  config = haggling.WorldConfig(
      year=YEAR,
      location="Fruitville",
      premise=SCENARIO_PREMISE,
      scene_visuals=VISUAL_SCENE_OPENINGS,
      buyer_base_reward_min=2,
      seller_base_reward_max=5,
      supporting_player_parameters={
          "fixed_response_by_call_to_action": {
              "proposed 1 coin": "reject",
              "proposed 2 coins": "reject",
              "proposed 3 coins": "reject",
              "proposed 4 coins": "accept",
              "proposed 5 coins": "reject",
              "What price would {name} propose?:": "4 coins",
          },
          "specific_memories": [
              "{name} is a stubborn merchant. {name} will sell his items"
              " exactly for 4 coins no more and no less. He is very vocal"
              " about it."
          ],
          "explicit_preference_component": (
              "{name} is a stubborn merchant. {name} will sell his items"
              " exactly for 4 coins no more and no less. He is very vocal"
              " about it."
          ),
      },
      num_supporting_players=1,
      num_main_players=1,
      num_games=5,
      random_seed=seed,
      only_match_with_support=True,
  )
  rng = random.Random(config.random_seed)

  all_names = list(MALE_NAMES) + list(FEMALE_NAMES)

  rng.shuffle(all_names)
  config.people = all_names

  for _, name in enumerate(MALE_NAMES):
    config.person_data[name] = {"gender": "male"}
  for _, name in enumerate(FEMALE_NAMES):
    config.person_data[name] = {"gender": "female"}

  return config
Samples a set of parameters for the world configuration.
examples/deprecated/modular/environment/modules/vegbrooke_haggling_stubborn.py