7 Card Poker Hand Evaluator

前端 未结 9 909
死守一世寂寞
死守一世寂寞 2021-01-30 01:30

Does anyone know a fast algorithm for evaluating 7 card poker hands? Something which is more efficient than simply brute-force checking a every 21 5-card combination of hands fr

9条回答
  •  天命终不由人
    2021-01-30 02:21

    Of course, if you want to do it very fast. The algorithm i put before is too slow.

    The table7462 shoul be in an array, not in a file.

    Then, you should precalculate every different 7cards hands and store it to a database. There are 133.784.560 different 7cards combinations.

    You should use this format (alphabeticall order):

    "2c2d2h2s3c3d3h" and rank it

    Store every 133.784.560 different combinations. You do 52C7 cicles, rank it and store it in a database. Maybe in a few days you have it ready. When you have it ready, you don´t need 21 combinations anymore, just put your hand sorted alphabetically and search for it in your database.

    If you do that, you´ll see that you can calculate your odds against your opponents in real time whenever you need.

    Believe me. I am not a programmer and i can do it. I know my odds at the flop in 3 seconds.

提交回复
热议问题