Saturday, August 29, 2026

Faster hand combinations

Calculation with more than one hand dramatically increases the calculation effort. Ten hands is 1023 terms and finishes instantly. Forty hands is 1.1 trillion, which would take roughly 230 days of CPU time.

But many combinations of hands have zero chance of being drawn. 

The latest performance improvement spends much less time on these impossible hand combinations. One test case went from 38.9 seconds to 1.3 seconds. With a 7-card draw, only 1618 of its 2,097,151 combinations are actually possible and 99.9% of the work was never needed.  Another test case with forty hands went from impossible to 0.03 seconds.



No comments:

Post a Comment