The Royal Flushers - Multiplayer

100 tokens = $1.00
Join the Game
Select your name and click "Join Game" to enter.

Fisher-Yates Shuffle Algorithm

History & Origins

The Fisher-Yates shuffle was originally described by Ronald Fisher and Frank Yates in their 1938 book "Statistical Tables for Biological, Agricultural and Medical Research." The modern computer-optimized version was developed by Richard Durstenfeld in 1964 and popularized by Donald Knuth in "The Art of Computer Programming."

How It Works

The algorithm iterates from the last element to the first. For each position i, it randomly selects an element from positions 0 to i and swaps them.

for i from n-1 down to 1:
    j = random integer where 0 <= j <= i
    swap array[i] with array[j]

Python Implementation

def fisher_yates_shuffle(deck):
    for i in range(len(deck) - 1, 0, -1):
        j = random.randint(0, i)
        deck[i], deck[j] = deck[j], deck[i]
    return deck

Why 7 Shuffles?

Mathematician Persi Diaconis proved that 7 riffle shuffles are needed to adequately randomize a 52-card deck. This relates to mixing time in Markov chains.

Mathematical Properties

Time Complexity: O(n) | Space: O(1) | Permutations: 52! = 8.07 x 1067

Poker Hand Rankings

Ranked from lowest (1) to highest (11). Higher beats lower!

1. High Card

No matching cards. Highest card plays.

A K 9 7 2

2. One Pair

Two cards of the same rank.

K K 9 7 2

3. Two Pair

Two different pairs.

K K 9 9 2

4. Three of a Kind

Three cards of the same rank.

9 9 9 K 2

5. Straight

Five consecutive ranks (any suits).

5 6 7 8 9

6. Flush

Five cards of the same suit.

A K 9 7 2

7. Full House

Three of a kind + a pair.

9 9 9 K K

8. Four of a Kind

Four cards of the same rank.

9 9 9 9 K

9. Straight Flush

Straight + flush combined.

5 6 7 8 9

10. Royal Flush

A-K-Q-J-10 all same suit. Rarest hand!

A K Q J 10

11. Five of a Kind

Wild cards only! Five cards of same rank.

K K K K Q(wild)

Queens are always wild in Follow the Queen!

Wild Cards in Follow the Queen

Queens are always wild. When a Queen is dealt face-up, the next face-up card's rank also becomes wild. Wild cards can substitute for ANY card to make the best hand!

Low Hand Rankings (Hi-Lo & Lo Games)

In low games, the lowest hand wins. Aces play low. Straights and flushes don't count against you!

1. The Wheel (Best Low)

A-2-3-4-5 - The perfect low hand!

A 2 3 4 5

2. Six-Four Low

A-2-3-4-6 - Second best low.

A 2 3 4 6

3. Six-Five Low

A-2-3-5-6 or A-2-4-5-6

A 2 3 5 6

4. Seven Low

Any 5 unpaired cards, 7-high.

A 2 3 4 7

5. Eight Low (Qualifier)

Any 5 unpaired cards, 8-high. Required to qualify in most Hi-Lo games!

A 2 4 6 8

No Low / No Qualifier

Pairs, or cards 9+ disqualify a low hand in "8-or-better" games.

A 2 3 3 5 X

How Low Hands Work

Reading low hands: Compare from highest card down. A-2-3-4-6 beats A-2-3-5-6 because 4 < 5.

Eight-or-better: To qualify for low, all 5 cards must be 8 or lower with no pairs. If no one qualifies, the high hand wins the entire pot.

Scooping: The same hand can win both high and low! A-2-3-4-5 is both the best low AND a straight for high.

Pot: 0 tokens ($0.00)
Phase: -
Pot: 0 tokens ($0.00)
Phase: -
Pot: 0 tokens
Phase: -

Winner!

FOLD

FOLDED!