santiweight / poker-base

BSD 3-Clause "New" or "Revised" License
4 stars 0 forks source link

Add tests for 7-card evaluator #30

Open santiweight opened 2 years ago

santiweight commented 2 years ago

It will be important for us to find a ground-truth for 7-card evaluation, since we will have at least two evaluators that need testing...

Here's some links I am finding: https://forumserver.twoplustwo.com/45/general-software-discussion/7-card-hand-evaluators-597/index9.html https://github.com/tangentforks/TwoPlusTwoHandEvaluator https://forumserver.twoplustwo.com/48/computer-technical-help/twoplustwo-evaluator-question-1685353/

I think we can leave this out of the Hackage milestone, but it would be good to have a modicum of confidences. I think you'll be able to better comment on what the solution/timeline for this issue is! @tonyday567

tonyday567 commented 2 years ago

Happy to add some tests. I can think of nothing better than just adding 7-card hands that illustrate the corner cases of working out the hand rank.

Beyond this I suppose using a haskell alternative implementation, and just ripping through an entire enumeration of all 7-cards, as an experiement.

Those links are all about pre-evaluation lookups: not what this is. The old poker-eval was complicated - this handRank is easy(ish)!

santiweight commented 2 years ago

I am including these links for a future in which we decide we need a ground-truth implementation to test against - rest of your comment makes sense to me :)