This game of chance for one person is loosely based on one round of the TV game show The Weakest Link. For comparison, each unit is, again loosely, based on $1000 on the show. This game of chance is done for only one round and only one person is playing.
The rules of the game of chance:
You roll a die 27 times, or until you win a 128-unit prize. Each roll is scored as a Loss if the die comes up 1 or 2; a Win otherwise.
The game starts off at stage 0. A Win advances to the next stage; a Loss reverts the stage to 0.
Before any roll, at your discretion you may say "Bank", which results in your winnings being increased by an amount equal to 2^(s-1) where s is the stage number, except nothing in stage 0: 1 unit if in stage 1, through 128 units in stage 8, but when you Bank, the stage reverts to 0 again.
If you get a Win in stage 8, not only is 128 added to any previous winnings, but the game ends even if 27 rolls have not yet taken place. Getting a stage-8 Win and banking are the only two ways of adding to your winnings.
If you get a Win on the 27th (last) roll you keep the value for that stage (an automatic bank after your successful roll).
Is it ever advantageous to Bank?
What's the expected value of the game, given optimal strategy?
Here are two runs of a simulation listing threshold to bank against expectation value. Threshold "8" is, as per the rules, different than the other thresholds since reaching stage 8 ends the game (as does reaching the 27th roll). The results of two sims are consistent, and argue for never "banking" and getting an expectation value of about 32.94.
lord@rabbit-3 12335 % ga
1 18.00
2 14.47
3 15.17
4 17.57
5 21.32
6 28.29
7 31.37
8 32.94
lord@rabbit-3 12335 % ga
1 17.99
2 14.48
3 15.18
4 17.57
5 21.31
6 28.30
7 31.37
8 32.95
lord@rabbit-3 12335 % more ga.f
program ga
implicit none
integer roll,sim,simmax,thresh,iseed,bank,stage,winnings
real ex(8)
data ex/8*0./
simmax=100000
iseed=time8()
call srand(iseed)
do thresh=1,8
do sim=1,simmax*thresh**3
stage=0
bank=0
do 100 roll=1,27
if(3*rand().gt.2)then
stage=0
go to 100
endif
stage=stage+1
winnings=2**(stage-1)
if(roll.eq.27)then
bank=bank+winnings
go to 100
endif
if(thresh.lt.8.and.stage.eq.thresh)then
bank=bank+winnings
stage=0
endif
if(stage.eq.8)then
bank=bank+128
go to 105
endif
100 continue
105 continue
ex(thresh)=ex(thresh)+ (1.*bank)
/(simmax*thresh**3)
enddo
enddo
do thresh=1,8
print 200,thresh,ex(thresh)
200 format(i1,2x,f5.2)
enddo
end
Edited on December 29, 2020, 2:46 am