-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wondering if it's easy to add non-made hands classification #20
Comments
The project is originally designed for efficient hand strength evaluation, so analytics such as probability calculation is not part of the scope. Classification is easy if it is classifying the best hand, which has only at most 7462 possibilities. But those classifications you mentioned, would be another story. It is still possible using the same algorithm, but the work is not trivial. Basically, we need to extend the hash table for 5-card and 6-card hands, and save these classification information in the hash table. Flush draw is an exception, which need to be determined in the stage checking whether it is a flush. Overpair, which requires context of other players, is not possible unfortunately. The hash table is huge, as you can see, so it will take some amount of work. |
I haven't decided to add this feature to the repository yet. But if you have a repository forked/ported from this one, and it is open-source, I can help you work on it. |
hi @HenryRLee , I also thought of adding it myself, realized that to generate the hash table, I need to have the truth of source as you mentioned you were using Cactus Kev's evaluator. I didn't find one to do the classification, then probably I need to write the classification testing logic first then generate the hash. |
You're right, there is no easy truth of source like Cactus Kev's evaluator. What I would do is: implement the classifier myself, calculate the classification for each hand, and put the value to the hash table. A few hints for the implementation: Flush draw is to count the number of cards in each suit. Pairs is to count the number of cards in each rank. Straight draw might be the trickiest, but since there are only 10 possible straights, then we can iterate each straight candidate and check if the hand fits the straight draw (e.g. for the straight 2-6, we can count the distinct number of cards in the range [2, 6] and check if it equals to 4). If this classifier satisfies your requirement (if you don't care about time performance), maybe you don't need the framework of PHEvaluator at all. Anyway, feel free to ask any questions if you are stuck or having troubles. |
Good work!
Wondering if it's easy to add non-made hands classification like these in Flopzilla,
flush-draw, straight draw, gutshot, backdoor draw, overpair, top pair, middle pair, weak pair
The text was updated successfully, but these errors were encountered: