2

I'm writing an odds calculator for Texas hold'em (assuming all players remain till showdown) and I'm unsure about how I should be tallying scores when taking into consideration ties.

Basically, if I am running the simulation for a thousand iterations I can increment a score counter by 1 for wins and leave it unchanged for losses. At the end of the simulation I would simply divide that number by the total number of simulations run.

However, I'm unsure on how to treat ties. My approach to this at the moment is to decrement the total number of simulations when a tie occurs (that is, stopping the simulation earlier at 999 iterations instead of 1000 simulations thus nullifying the round).

I also take into consideration that the tie might not be against all players. So if there are 3 opponents at showdown and my hand beats 2 and ties with 1, then the total number of simulations is not decremented by 1, which would be the case if there was an all around tie, but by 1/3.

4
  • Don't make your program complex just for this; Ties are rare and you'll find that they are occuring about 1% at best in all situations. You should treat ties as wins by all tied players (they get a share from the pot, aren't they?).
    – user1165
    Jul 19, 2015 at 18:19
  • My only interest is the players point of view because the opponent cards are unknown. I think disco beat's reply makes a lot of sense so I'm tallying ties separately. I'm also keeping separate tallies depending on how many opponents I tie with. The results would show the probability of a tie with 1,2,...,n opponents as separate results. Jul 20, 2015 at 10:10
  • 1
    1000 hands is not nearly enough to get accurate probabilities. You really ought to be simulating more on the order of millions. If your code isn't fast enough for that, consider using a library like my lcrocker.github.io/onejoker Jul 20, 2015 at 16:11
  • @StefanMallia That's good, you need that information to calculate the actual equity each player has: 100%*(numberOfWins + numerOfTwoWayTies/2 + numberOfThreeWayTies/3 + ...)/numberOfTrials
    – Paul
    Jul 20, 2015 at 18:16

1 Answer 1

3

Tie is neither win nor loss. Therefore, you should have a counter for ties the same way you have a counter for wins. In any case a round with a tie should be removed from your simulation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.