Azzera filtri
Azzera filtri

Identify flop hand categories in poker (combinatorics using cell arrays)

3 visualizzazioni (ultimi 30 giorni)
I guess that others have done it before me, but I would like to learn it from scratch anyway (I cannot find any tutorial or tips/tricks anywhere though).
Say we are given the hand range:
handrange={'AA','KK','AKs','QQ','AKo'};
pokerterms where s stands for suited and o denotes offsuit. Each pair ('AA', 'KK', and 'QQ') has 6 variations (heart/club, heart/diamond, heart/spade, club/diamond, club/spade, diamond/spade) and nonpairs ('AK' which consists of 'AKs' and 'AKo') have 16 combinations of which 12 are offsuit and 4 are suited.
The flop cards:
Ace [club] King [heart] 3 [heart], i.e.:
flop={'Ac','Kh','3h'};
in a no limit texas holdem game.
How do we, given the handrange and flop cards, actually identify the various categories: pair, straight draws, flush draws, and so forth?
pokerterms For a straight and flush draw, one card is missing to make the hand. A straight is a hand that contains five cards in sequence e.g. 5 [heart], 6 [club], 7 [spade], 8 [spade]). A flush is a hand that contains five cards all of the same suit e.g. Ace [heart], Jack [heart], 9 [heart], 3 [heart] and 2 [heart].
I guess one needs to compare strings in some kind of way?

Risposte (0)

Categorie

Scopri di più su Card games in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by