Re: Card dealing and random repetition



In article <%0AVf.32718$nz4.4826@xxxxxxxxxxxxxxxxxxxxx>,
simaldeff@xxxxxxxxx says...
I though about something while reading your post.
Have you ever seen someone shuffle a deck? it's quite interesting, and
inspiring for an 'elegant' way to simulate a shuffle.
example 1 : Poker dealer "show off"
The dealer divide the deck in two parts, trying to make them equally big
(but I estimate the error margin being between 1 to 5 cards from the
count of 26 cards per half-deck). Then he shuffle them trying to
alternate 1 card from the right-half-deck and one from the
left-half-deck (here there is a slight probability of 2 card staying
stuck together and not being separated during the shuffle, the
probability of 3 staying unseparated is even slighter and 4 cards is
nearly impossible if the dealer is good at this) by bending the cards
and releasing each deck next to each other.Then repeat 1 to 3 time and
then deal.
SO doesn't it look simple to emulate in a program?
Take your array of 52 cards.
Divide it in 2 sub arrays, with a random error of 1 to 5 cards difference.
Shuffle : adding a random probability of the next card on the array
being picked instead of the next of the other array. This probability go
decreasing if this already happened in the previous card.
Repeat it as much as you want.

I think this method looks funnier. Could it have any utility? It's a
direct emulation of the real-world card shuffling.

But mainly it emulates the defects of real-world card shuffling. A
perfect shuffle has no structure of the kind you describe.

- Gerry Quinn
.



Relevant Pages

  • Re: Shuffling less is often good enough. (LSJ Query)
    ... deck, and then cut the deck enough times so that you have no clue as ... to where that card is. ... Eliminating your knowledge of the order is not the same as randomizing ... No matter how much I shuffle, God will always know the order the cards ...
    (rec.games.trading-cards.jyhad)
  • Re: Algorithm for card shuffling
    ... Select the first card at random from the entire deck, ... > typedef Deck::const_iterator ConstDeckIterator; ... > void Shuffle ...
    (comp.programming)
  • Re: HELP
    ... Take a deck of cards in random order. ... cut the card from the top. ... then the bottom card from the bottom section,etc. ... What does it mean to shuffle a deck? ...
    (comp.lang.java.programmer)
  • Re: I pee in the open
    ... card from an initially ordered deck in a few lines of C code: ... deck with an inexact cut without under/overflow from each half of the deck? ... you don't want a truly random shuffle. ... rand() is usually implemented as pseudo-random number generator ...
    (alt.lang.asm)
  • Re: Card dealing and random repetition
    ... and inspiring for an 'elegant' way to simulate a shuffle. ... The dealer divide the deck in two parts, trying to make them equally big (but I estimate the error margin being between 1 to 5 cards from the count of 26 cards per half-deck). ... adding a random probability of the next card on the array being picked instead of the next of the other array. ...
    (comp.programming)