You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to implement the same idea as you did, but then I had two concerns when designing this API:
We can see that sometimes the result isn't unique.
The evaluator is using a hash function targeting the ranks. Therefore, some information is lost in the process, particularly the suit information. This is somehow a drawback of the perfect hash algorithm.
Having said that, you can still calculate the original cards and tell whether it is from community or player, given the sample hand (e.g. "4 4 4 A K") and the rank category (we need to know whether it is a flush). If it is a flush, simply find the most common suit from the nine cards. Otherwise, for each rank in the sample hand, we can greedily check whether the player set has a card with that rank. If there is, the rank belongs to the player, otherwise, it belongs to the community. And then take that card out of the player/community set before checking the next rank. You won't lose the correct answer in each iteration. Because if you do (i.e. there is a rank supposed to belong to the community, but had been assigned to the player), then eventually they should be able to compose a better 5-card hand, contradicting the fact that the sample hand is the best 5-card hand.
If you have trouble implementing the calculation, let me know and I will help out.
Hi
I'm testing this for evaluating omaha winning hand. Everything is fine and I get short wining hand description as eg. "4 4 4 A K".
Is it any way to get or calculate "real" winning hand with ranks and suits from rank number? eg ( "4s 4c 4d Ac Kh" )
It would be very useful to see which are the winning cards from community and player cards.
The text was updated successfully, but these errors were encountered: