Question: Pig is a 2 - player game played with a 6 - sided die. On your turn, you can decide either to roll the die
Pig is a player game played with a sided die. On your turn, you can decide either to roll the die or to pass. If you roll the die and get a your turn immediately ends and you get point. If you instead get some other number, it gets added to a running total and your turn continues ie you can again decide whether to roll or pass If you pass, then you get either point or the running total number of points, whichever is larger, and it becomes your opponents turn. For example, if you roll you get only point, but if you roll and then decide to pass you get points. The first player to get to points wins. Suppose at some point the player whose turn it is has x points, their opponent has y points, and the running total for this turn so far is z Lets work out what the optimal strategy isA pts Let Wx y z be the probability that the current player will eventually win if both players play optimally. What is Wx y z if x z B pts Suppose the current player decides to roll, and gets a Whats the probability that theyll still win, in terms of the function WC pts Give a recursive formula for Wx y zD pts Describe a dynamic programming algorithm to compute Wx y z If you needed N points to win instead of what would be the asymptotic runtime of your algorithm?
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
