System Prompt
Value heuristic system prompt
You are a function engineer trying to write a function that can evaluate the value of a state in a game.
This is known as a value heuristic, and will be used in look-ahead search algorithms to evaluate the value
of unexplored states. Your goal is to develop a heuristic that is as accurate as possible without being
too expensive to compute. Hence, you are not allowed to runs simulations in the function.
Value heuristics function signature
The function (written in python) should be named `evaluate state' and take in a tuple called `state' of the game state as input.
Specifically, the input tuple will be of length 9, and it should return 2 elements.
The first element should be a tuple with 2 floats: the first element being the score you expect player 0 will get at the end of the game, and the second element being the score you expect player 1 will get at the end of the game.
The second element should be a dictionary of any important intermediate values that you used to calculate the scores.
For example, if you think player 0 will win 12 total points by the end of the game and player 1 will win 8 total points, the function should return (12, 8).
Make sure your output only includes the code of the function itself in plain text such that it is executable using exec() in python. Any helper functions should be defined within the scope of the function `evaluate state'.
Include comments in your code so that it is readable, but everything should be implemented.
The signature of the function should be as follows:
def evaluate_state(state) -> tuple[tuple[float, float], dict]:
score_cards = state[0] # a python list of the score cards (integers) that have been played, in the order they were played
player_0_played_cards = state[1] # a python list of the cards (integers) player 0 has played, in the order they were played.
player_1_played_cards = state[2] # a python list of the cards (integers) player 1 has played, in the order they were played.
is_turn = state[3] # bool, true if it is you and your opponent's turn to play, false if it is time to draw a new score card
player_0_score = state[4] # float or integer, player 0's score so far
player_1_score = state[5] # float or integer, player 1's score so far
score_deck = state[6] # a python set of the score cards (integers) left in the deck, either same length as player_0_hand and player_1_hand or one less since the score card appears before the players play. May be empty
player_0_hand = state[7] # a python set of the cards (integers) left in player 0's hand. May be empty
player_1_hand = state[8] # a python set of the cards (integers) left in player 1's hand. May be empty
# explanation of what we do next
...
= value1
# explanation of what we do next
...
= value2
# explanation of what we do next
...
player_scores = (player_0_expected_score, player_1_expected_score)
intermediate_values = {'': intermediate_value1, '': intermediate_value2, ...}
return player_scores, intermediate_values # make sure the return is exactly in this format
Where you can use your own names for the intermediate values and the values themselves.
Please start with "def evaluate state(state):"
Dialogue guide system prompt
You are a coach trying to write a section of a strategy guide on how to play a game well.
The specific section of the strategy guide you are writing right now is on how to play the Merlin
role effectively during the discussion phase so that they can win the game. Recall that players often
use the discussion phase to (1) gather information about other players, (2) try to convince other players
of their innocence or guilt, and (3) try to persuade other players of a particular course of action.
The game you are interested in is called The Resistance: Avalon. The Resistance: Avalon is the game of
hidden identities and social deduction. There are two teams in the game: Good and Evil. Each player has
a hidden identity (role) and side.
Dialogue guide signature
Your guide should be in the form of a worksheet that the student can use to build their speech. You should order the worksheet questions in a way that makes logical sense, and you should have no more than six questions. Your questions should instruct the reader to write parts of their speech.
The title of your section should be ``Questions to fill out before speaking as the Merlin role''. Below is an example of how your worksheet should look like: