I think there may be something to this and I will look at it in the simulation. The thing is not about Nash Eq though I think, but imagine another situation: you are not competing against just one other player, but a billion players. You still get two rolls. Obviously now you reroll unless you get 100. So the number of players matters and it’s not just maximizing your score.
The chances of you winning with the best strategy are at least one in a billion and the chances of not one of the billion players beating 51 or 62 or whatever are much less than 1 in a billion.
Excel spreadsheet with frequency of each result, cumulative frequency of higher results for the opponent, odds of loss and tie for each final roll, multiply to get number of losses and ties for each final roll value, sum columns for overall record.
Well, if when you’re up for it, publish your Excel formulas or whatever goes into an Excel thingy. I will publish the python code tonight. I want to say “try to publish”, but as Yoda said, do or do not, there is no try.
You don’t really need to code a full sim here to disprove the maximize EV theory. Focus on your strategy for one number (say, 51). Half the time, your opponent gets a number they will reroll. In those cases, you win 1% less often by rerolling, because you would win 51% of the time by staying, and you win half the times you both roll. The other half of the time, they have a number that is 51 or higher. In those cases, you increase your win rate from 1% to 25% by rerolling. Rerolling 51s is much, much better than staying on them. Half the time you go from infinitesimally better than a coinflip to a coinflip, and the other half of the time you go from a near-certain loss to a fighting chance. Your EV goes down a tiny bit, but it’s almost all in situations where you were already losing.
Does this link work? I’m getting old, I don’t know the best way to share files anymore. I don’t want to use my Google drive since it exposes my email. I could register a burner but if this free option works that would be easier. Hopefully it doesn’t attach a virus and/or steal bank logins somehow.
It did work and opened fine in Numbers (spreadsheet on my comp).
Bob,
I don’t think a full simulation will be that much more work than any program that does anything and I can vary the number of players too. I won’t do it in Rust though.
You only stay on 52 and your opponent stays on 51. It’s only one changed decision out of a hundred for you and how often is it wrong?
That’s the chances your opponent ends up with 51 or less, right?
50/100 * 51/100 = 2550/10000
which agrees with you - though not sure if that’s a proof or not.
Not sure what else, if anything, I will do with it yet, but 58 seems to give the best results against an opponent’s level 0 strategy of “Reroll on 50.” 62 vs 50 gives an equity of 50.42%
I don’t have much time until later and without posting the results so as not to bias anyone - this program is meant to compare stopping at 2 vs 1 and then 3 vs 2 and then 4 vs 3 etc to see when the winner flips.
# python3
def get_score(player_stop_at, rolls):
i, j = rolls
if i >= player_stop_at:
return i
else:
return j
def play(x):
sum_a = 0
sum_b = 0
for i in range(1, 101):
for j in range(1, 101):
sum_a = sum_a + get_score(x+1, [i, j])
sum_b = sum_b + get_score(x, [i, j])
if sum_a > sum_b:
print(f'{x+1} beats {x}')
else:
print(f'{x} beats {x+1}')
for stopping_point in range (1,100):
play(stopping_point)
and it does show x+1 beating x for a while and then at some point and from then on x beats x+1.
I made a change so I could roll numbers more than one apart from each other case by case and got a result. Not the same result as you…but I’m hoping people will look at the code/logic here without knowing results
# python3
def get_score(player_stop_at, rolls):
i, j = rolls
if i >= player_stop_at:
return i
else:
return j
def play(x, y=0):
if y == 0:
y = x + 1
sum_a = 0
sum_b = 0
for i in range(1, 101):
for j in range(1, 101):
sum_a = sum_a + get_score(x, [i, j])
sum_b = sum_b + get_score(y, [i, j])
if sum_a > sum_b:
print(f'{x} beats {y}')
else:
print(f'{y} beats {x}')
for stopping_point in range (1,100):
play(stopping_point)
play(62, 50)
I’m not sure what that first sentence means and would probably need a Ben Garrison explanation for it.
I’m not a coder so I can’t really comment intelligently on your python code, but the logic in my spreadsheet seems pretty sound to me, so I’d be curious to hear what’s wrong with the numbers if they indeed are wrong.
It looks like your program is effectively comparing the expected value of the dice rolls of the two strategies (that is what incrementing the sum_a and sum_b variables seems to be doing).
But that doesn’t necessarily correspond to how frequently each strategy wins against the other.
Ah that makes sense, yeah it’s true that maximizing Die Roll EV is not the same as maximizing your chance of winning the game.
Die Roll EV is maximized by using the “Reroll 50” strategy (Die EV is then 63) and decreases in the same way whether you go up or down (“Reroll 60” has the same Die EV as “Reroll 40” etc), but the chance of winning the game doesn’t change equally in either direction (and is more complex to answer since it depends not only on the distribution of your own die rolls, but also the distribution of your opponent’s die rolls.)