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
I developed an algorithm for 7-card hand evaluation without iterating all 21 combinations.
Basically, it splits the 7-card hand into two categories: flush and not a flush. If it's a flush, it would be easy to look up the value in a table of 8192 entries. If it's not a flush, it'll run a hash function with techniques of dynamic programming, and then look up the value in a hash table of 49205 entries.
If you are interested, please check my work at github.
https://github.com/HenryRLee/PokerHandEvaluator