Quote:
Originally Posted by DeathAndTaxes
The only solution I see is the "slow one". I think this is what poker eval does.
Treat each player as having 6x 7 card hands.
With 4 holecards {a,b,c,d} and player must use exactly two each player has 6 combinations of hands: {a,b} {a,c} {a,d} {b,c} {b,d} {c,d}
Call the board z1-z5
So it is
{a,b,z1,z2,z3,z4,z5}
{a,c,z1,z2,z3,z4,z5}
....
{c,d,z1,z2,z3,z4,z5}
So for each player evaluate their 6x 7card hands. For full ring game you are talking about 60 hands. The best hand out of the 60 is winner.
The only thing that is confusing to me is I can't see why it would be 60x slower. It is ranking 60 hands vs ranking 10. That can't be 60x slower can it?
If poker eval is really is 60x slower then I imagine it is doing something less efficient and likely you could speed it up using algorithm similar to the above.
This sounds logical but if I recall correctly the twoplustwo evaluator uses a lookup table that doesn't require card sequences. Could it not be improved then by placing the board cards before the hole cards (i.e. {z1,z2,z3,z4,z5,c,d}) and 'bookmarking' the position in the lookup sequence at the conclusion of the board cards. The final iteration of 6 combinations of hole cards would loop for only the final two steps. That would have to be faster than doing 6 full 7 card lookups/evaluations.