# Optional Contest 1: Hog Strategy

A function that makes

Ten thousand choices is a

Final strategy.

## Table of Contents

**This contest is completely optional!**

## Instructions

Submit a `hog.py`

file containing a function called `final_strategy`

and a name
called `final_bid`

bound to a non-negative integer, using the command:

`submit proj1contest`

A blank `hog.py`

file and simple tests for correct formatting can be downloaded
as a zip archive. Type `python3 ok`

to run the provided tests.

## Overview

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. The `final_bid`

of each player will be used to determine who
plays first and the starting scores of each player.

A submission scores a match point each time it has an expected win rate above
50%. The submissions with the most match points win. Ties are broken by the win
rate against an `always_roll(5)`

agent that plays first with a starting score
of 0 to 0.

Tree recursion may be helpful. An example use is described in
this video.

## Contest Rules

- The contest may be entered individually or in pairs. Two people submit a
single entry. 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 5 minutes. Less than 5 seconds is strongly preferred.
- Winning entries will receive 2 points of extra credit.
- Winners will also be recognized publicly in future offerings of CS 61A.