Question: Problem 8 ( 1 pt ) . A strategy can also take advantage of the Swine swap rule. Implement swap _ strategy, which Rolls 0
Problem pt A strategy can also take advantage of the Swine swap rule. Implement swapstrategy, which
Rolls if it would cause a beneficial swap that gains points.
Rolls BASELINENUMROLLS if rolling would cause a harmful swap that loses points.
If rolling would not cause a swap, then do so if it would give at least BACONMARGIN points and roll BASELINENUMROLLS otherwise.
Test your implementation before moving on:
python hoggrader.py q
Once you have implemented this strategy, update runexperiments to evaluate your new strategy against the baseline. You should find that it performs even better than baconstrategy, on average.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
