Thanks Robert :-) Stable as usual !! I will have a look at your code and get back to you with questions.
" I don't understand what you're trying to do in your simulation. What strategy is Player 2 supposed to be using?"
As you might have noticed I am a bit confussed when it comes to this problem. I read in the pdf file
that: "Player 2 is assumed to know the value of x1". Hence in my simulation code I had 1-pp
c1 := Sample(RandomVariable(Bernoulli(pp)), 1): # selection player 1
c2 := Sample(RandomVariable(Bernoulli(1-pp)), 1): # selection player 2
but that code did not work very well. I have another piece of code that shows that the maximum occurs
when player one randomly (p=0.5) is switching between Action2 and Action4.
The expected value player1 is given by:
[Expected Value Player 1] Player2=pass Player2=play
Player1=Action2 [ +1 ] [ 0 ]
Player1=Action4 [ 0 ] [ 0.5 ]
Hence when Player1 selects Action2 most of the time Player2 will play ( otherwise expected value player2 =-1)
and when Player1 selects Action4 most of the time Player2 will pass ( otherwise expected value player2 =-0.5)
unless player1 is "bluffing" which is unlikely but it can happen. I am not sure it is correct though hummm
X := proc (pp) local c1, c2, cc, E1, E2;
c1 := Sample(RandomVariable(Bernoulli(pp)), 1):
c2 := Sample(RandomVariable(Bernoulli(1-pp)), 1):
E1 := 0:
if c1 = 0 and c2 = 1 then E1 := 0: # Player1=Action2 Player2=Play -> Player1 Expected Value=0
elif c1 = 0 and c2 = 0 then E1 := 1; end if: # Player1=Action2 Player2=Pass -> Player1 Expected Value= +1 (Bluffing)
if c1 = 1 and c2 = 0 then E1 := 0; # Player1=Action4 Player2=Pass -> Player1 Expected Value=0
elif c1 = 1 and c2 = 1 then E1 := .5; end if: # Player1=Action4 Player2=Play -> Player1 Expected Value= +0.5 (Bluffing)
listplot([seq([pp, ExpectedValue([seq(X(pp), i = 1 .. 200)])], pp = 0 .. 1, 0.5e-1)], color = red, thickness = 3, title = "Player1 \n", titlefont = [times, roman, 16], labels = ["Probability Action4", "Expected Value"], labelfont = [times, roman, 14], labeldirections = [horizontal, vertical]);
The only two ways that I can think of that player1 can bluff and gain an advantage are:
1.A) Player1 select Action2; Play on head and Play on Tail
1.B) When he gets tail he pass instead of betting (ie Action4); Player1=-1 and Player2=+1
1.D) If Player1 would not have bluffed the outcome would have been; Player1=-2 and Player2=+2
1.E) Which means that Player1 has gained +1 by bluffing.
2.A) Player1 select Action4; Play on head and Pass on Tail
2.B) When he gets tail he bets instead of passing (ie Action2)
2.C) Player2 thinks player1 sticks to Action4 so player2 pass; Player1=+1 and Player2=-1
2.D) If Player1 would not have bluffed the outcome would have been; Player1=-1 and Player2=+1
2.E) Which means that Player1 has gained +2 by bluffing.