poker-odds icon indicating copy to clipboard operation
poker-odds copied to clipboard

--Iterations dont work

Open Doaxan opened this issue 6 years ago • 4 comments

./node_modules/.bin/poker-odds AsTh .... --board AhKdJc --iterations 99999

  board
  Ah Kd Jc

  hand      win     tie
  As Th   83.3%    5.8%
  .. ..   10.8%    5.8%

  1081 iterations in 43ms

1081 iterations always

Doaxan avatar Apr 07 '18 15:04 Doaxan

Hi @Doaxan Iterations seem to be limited by number of cards to be dealed:

For 3 cards (flop board) 1081 iterations will be performed, For 4 (turn) - 46 interations For 5 (river) - 1 iteration (always 100% or 0%..)

That doesn't seem to be affected by number of players at all. So, if we have X people playing and we are on the river or turn (with unknown cards .... .... .... ). it won't do proper simulations, hence it will give you wrong win/tie odds.

@CookPete, shouldn't it rather calculate against all possible players holdings, limited to "--Iterations" param? Thanks.

paulwalczewski avatar Jul 31 '18 21:07 paulwalczewski

Hey @paulwalczewski and @Doaxan,

Yeah I must admit that the "unknown cards" feature was shoehorned in to the library after I had written most of it. It will perform the same number of iterations as if the cards are known, and just pick random cards for each iteration.

Fixing this properly (ie iterating through every possible hand) will require a big refactor of the logic. It's definitely possible, and I can look into it when I get some spare time.

cookpete avatar Aug 01 '18 15:08 cookpete

It's worth noting that in it's current state, poker-odds is still not far off the results from http://www.propokertools.com/simulations.

image

image

cookpete avatar Aug 07 '18 15:08 cookpete

Hi @CookPete.

Yes, with flop stage it gives more or less acceptable results (gets bit worse with more players, couple % differences usually between simulations). But it gets pretty useless on turn or river :(

Whenever you get that spare time to look into it I would be really appreciated! Thanks!

paulwalczewski avatar Aug 11 '18 12:08 paulwalczewski