A strategy is
A single function that makes
Ten thousand choices.

Instructions

This contest is completely optional!

Download a blank hog_contest.py file and simple tests for correct formatting as a zip archive. Type python3 ok to run the provided tests.

Submit a hog_contest.py file containing a function called final_strategy and a TEAM_NAME.

python3 ok --submit

Contest rules

Each submitted strategy will play against all other submissions. We will exactly compute the expected win rate for each player, so that the outcome of this tournament will be determined by strategy alone and not the roll of the dice. A submission scores a match point each time it has an expected win rate above 50.0001%. We will rank submissions based on the number of matches they won. Ties count as losses.

The top three submissions will earn the following:

  1. First place gets 3 points of extra credit
  2. Second place gets 2 points of extra credit
  3. Third place gets 1 point of extra credit

Winners will also be publicly recognized in future iterations of 61A!

The contest will use exactly the same Hog special rules as Project 1.

Some additional contest rules:

  • The contest may be entered individually or in pairs. Two people submit a single entry (make sure you register each other as partners on okpy.org). Each person in the course can only be associated with at most one entry.
  • All strategies must be deterministic, pure functions of the current player scores! Non-deterministic strategies or strategies based on the history of the game will be disqualified.
  • Calling your final_strategy function on every possible pair of scores should take less than 10 seconds. The provided tests check for this.