Problem 11 (200pts)
A strategy can also take advantage of the Swine Swap rules.
Implement swine_strategy
, which returns 0 if rolling 0 dices gives the player at least threshold
points in this turn.
In other cases, the strategy rolls num_rolls
.
Before writing any code, unlock the tests to verify your understanding of the question.
$ python ok -q 11 -u
Once you are done unlocking, begin implementing your solution. You can check your correctness with:
$ python ok -q 11
Once you have implemented this strategy, update run_experiments
to evaluate your new strategy against the baseline.