During a popular daytime TV game show called "The Price is Right", three contestants take turns spinning a large wheel to score points to go on to the game finale. Called the Showcase Showdown, the wheel spinning game is primarily just random luck. However, players do have some minor control over the outcome. I won't bother repeating the rules of the game here since you can easily find them online. However, I wondered if there was an optimum way to play the game and wrote a program that would simulate it to find out. There aren't that many ways the game plays out and ultimately one of the three players wins quickly so I figured that it couldn't be that hard.
The first player spins the wheel and then decides if they want to spin again to achieve a score equal to the total of the two spins. There is incentive to score exactly 1.00 as well as just getting close to 1.00 but not going over to beat the other players. So obviously if the first spin is 0.05 or some other low number you would spin again. Likewise if you spun 0.85 or other higher number you would definitely stand. However, what do you do with a score around 0.50? You have a 50-50 chance of losing by going over 1.00 with the second spin but also a high chance of being beaten by one of the two remaining players if you don't have a higher score. In the program I make t1 the threshold value for the first player's second spin. The second player has a similar dilemma in that they could spin a number good enough to beat the first player, but still low enough to be easily beaten by the third player. I have t2 as the second players second spin threshold but don't expect it to do very much since the situation only comes up in less than 3% of the games.
Here is the code for the first player spinning:
p1 = random.choice(wheel)
if p1 < t1:
s2 = random.choice(wheel)
p1 = p1 + s2
Player 3 doesn't have any choice. They must spin to win. However, they can win without even spinning since both 1 and 2 could go over 1.00 before 3 even spins. Much like the dealer in blackjack, player 3 has a slight advantage no matter what. So the question is, what value of t1 and t2 maximize the chances of player 1 or 2 winning.
Python Program Click the V to see code ---------->
import random
wheel = [5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100]
d = False #set True for debug
t1 = 70 #P1 threshold
t2 = 60 #p2 threshold
c1 = 0
c2 = 0
c3 = 0
runs = 10000
for i in range(runs):
if d: print(" ")
p1 = random.choice(wheel)
if d: print("P1 spin 1 =",p1)
if p1 < t1:
s2 = random.choice(wheel)
p1 = p1 + s2
if d: print("P1 spin 2 =",s2,"Total =",p1)
if p1 > 100:
if d: print("P1 out")
p1 = 0
p2 = random.choice(wheel)
if d: print("P2 spin 1 =",p2)
if p2 < p1 or p2 < t2:
s2 = random.choice(wheel)
p2 = p2 + s2
if d: print("P2 spin 2 =",s2,"Total =",p2)
if p2 > 100 and p1 == 0:
if d: print("P2 out so P3 wins")
c3 += 1
elif p2 > 100 or p2 < p1:
if d: print("P2 out")
p3 = random.choice(wheel)
if d: print("P3 spin 1 =",p3)
if p3 < p1:
s2 = random.choice(wheel)
p3 = p3 + s2
if d: print("P3 spin 2 =",s2,"Total =",p3)
if p3 > 100:
if d: print("P1 wins")
c1 += 1
elif p3 > p1:
if d: print("P3 wins")
c3 += 1
elif p3 < p1:
if d: print("P1 wins")
c1 += 1
else:
if d: print("P1 and P3 tie")
if random.random() > 0.5:
c1 += 1
if d: print("P1 wins")
else:
c3 += 1
if d: print("P3 wins")
elif p2 == p1:
if d: print("P1 and P2 tie")
p3 = random.choice(wheel)
if d: print("P3 spin 1 =",p3)
if p3 < p1:
s2 = random.choice(wheel)
p3 = p3 + s2
if d: print("P3 spin 2 =",s2,"Total =",p3)
if p3 > 100:
p3 = 0
if d: print("P3 out")
if p3 > p2:
if d: print("P3 wins")
c3 += 1
if p3 < p2:
if d: print("P1 and P2 tie")
if random.random() > 0.5:
c1 += 1
if d: print("P1 wins")
else:
c2 += 1
if d: print("P2 wins")
if p3 == p2:
if d: print("Three way tie")
q = random.random()
if q > 2/3:
c1 += 1
if d: print("P1 wins")
elif q > 1/3:
c2 += 1
if d: print("P2 wins")
else:
c3 += 1
if d: print("P3 wins")
elif p2 > p1:
if d: print("P2 beats P1")
p3 = random.choice(wheel)
if d: print("P3 spin 1 =",p3)
if p3 < p2:
s2 = random.choice(wheel)
p3 = p3 + s2
if d: print("P3 spin 2 =",s2,"Total =",p3)
if p3 > 100:
p3 = 0
if d: print("P3 out")
if p3 > p2:
c3 += 1
if d: print("P3 wins")
if p3 < p2:
c2 += 1
if d: print("P2 wins")
if p3 == p2:
if d: print("P2 and P3 tie")
if random.random() > 0.5:
c2 += 1
if d: print("P2 wins")
else:
c3 += 1
if d: print("P3 wins")
if d: input("Hit Enter")
print('P1={0:4.1f}% P2={1:4.1f}% P3={2:4.1f}%'.format(c1/runs*100, c2/runs*100, c3/runs*100))
I happen to be programming Python on a Raspberry Pi. You might have a Python environment on a Windows or Mac computer, but the code would be the same for all three. For those of you that want to run the program and don't want to bother with installing Python there is even an online tool that will run it. Clicking the following link will take you to the online version: Programiz Online Python Compiler .
The window shown above will open with a three line example program already typed in. Select these lines and delete them. Then cut the entire program listing in the box above and paste it into the online compiler web page. Hitting the Run button will print out the probabilities for winning for each of the three players given the current values of t1 and t2. You might not get the same values shown since they depend on the specific random numbers used. The two threshold values are easily changed and the program rerun to see their effect. The statistics are based on 10,000 simulated games. You could increase that, but it will take longer to get the results. The results are about as predicted: Player 1 wins the least often at about 31% of the time, player 2 about 33%, and player 3 the most at 36%.
The variable d can be set to True to turn on a debug mode. When run, the program will printout each step and after each game you hit the enter key to go on. Obviously you wouldn't want to hit enter 10,000 times so you generally have d=False. This just gives you a chance to see how the simulation is deciding the winner.
P1 spin 1 = 80
P2 spin 1 = 35
P2 spin 2 = 90 Total = 125
P2 out
P3 spin 1 = 60
P3 spin 2 = 75 Total = 135
P1 wins
Hit Enter
P1 spin 1 = 20
P1 spin 2 = 80 Total = 100
P2 spin 1 = 15
P2 spin 2 = 95 Total = 110
P2 out
P3 spin 1 = 50
P3 spin 2 = 40 Total = 90
P1 wins
Hit Enter
P1 spin 1 = 25
P1 spin 2 = 100 Total = 125
P1 out
P2 spin 1 = 40
P2 spin 2 = 100 Total = 140
P2 out so P3 wins
Hit Enter
The chart below shows the effect of changing t1 and the probability player 1 will win. First of all notice that the chances don't really change that much and player 1 has only about a 29% to 31% chance of winning no matter what the threshold is. However, deciding to spin again if the total is less than 70 gives player 1 the best chance of winning over all. In other words, spin again on 65 or less. My guess is that, if the wheel had more positions, we would see that the threshold should be 2/3 or 67. I'd also say that most people would probably stand on 65 even though it appears to have slightly better odds to spin again.
T1 vs Probability Player 1 Will Win
Now given that player 1 is doing the right thing, player 2 should have an optimal threshold too. The chart below shows how player 2's chance of winning peaks at t2 equal to 60. That is spin again on a 55. Again, I think if there were more spaces on the wheel, we would see that the number is probably just a little over 50.
T2 vs Probability Player 2 Will Win