File size: 1,972 Bytes
cebc517 485a836 cebc517 250cc97 485a836 cebc517 5401171 cebc517 c2392fe cebc517 5401171 7877562 cebc517 5401171 7877562 cebc517 5401171 cebc517 81e1c72 cebc517 270b042 81e1c72 cebc517 c2392fe 5401171 cebc517 7877562 270b042 cebc517 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
def fetch_prompt(prompt_name):
"""Fetches a static prompt."""
return prompts[prompt_name]
def format_prompt(prompt_name, **kwargs):
"""Fetches a template prompt and populates it."""
return fetch_prompt(prompt_name).format(**kwargs)
_game_rules = '''\
You are playing a social deduction game where every player pretends the be the same animal.
During the round players go around the room and make an "I"-statement as if they were the animal.
All players know what animal they are pretending to be, except one who is known as the Chameleon.
The Chameleon and must blend in by providing details about the animal using context from other players.
The other players must be careful not to give away too much information with their responses so that Chameleon cannot guess the animal.
After all players have spoken, they vote on who they think the Chameleon is. \
'''
_assign_herd = """\
You are a **{herd_animal}**, keep this secret at all costs and figure which player is not really a {herd_animal}
"""
_assign_chameleon = """\
"You are the **Chameleon**, remain undetected and guess what animal the others are pretending to be"
"""
_player_describe_animal = """It's your turn to describe yourself. Remember:
- Start your response with "I"
- Keep your response as short as possible
- Do not repeat responses from other players.
Your Response:"""
_chameleon_guess_animal = """\
What animal do you think the other players are pretending to be?
Player Responses:
{player_responses}
Your Guess:
"""
_vote_prompt = """\
Now it is time to vote. Choose from the other players who you think the Chameleon is.
Player Responses:
{player_responses}
Your Vote:
"""
prompts = {
"game_rules": _game_rules,
"assign_herd": _assign_herd,
"assign_chameleon": _assign_chameleon,
"player_describe_animal": _player_describe_animal,
"chameleon_guess_animal": _chameleon_guess_animal,
"response": "Your response:",
"vote": _vote_prompt
}
|