Re: Card dealing and random repetition
- From: Gerry Quinn <gerryq@xxxxxxxxxxxxxxxxxxx>
- Date: Fri, 31 Mar 2006 10:07:34 +0100
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
.
- Follow-Ups:
- Re: Card dealing and random repetition
- From: pete
- Re: Card dealing and random repetition
- References:
- Re: Card dealing and random repetition
- From: Simaldeff Blaldieri
- Re: Card dealing and random repetition
- Prev by Date: Re: returning lvalue in C vs C++
- Next by Date: Re: returning lvalue in C vs C++
- Previous by thread: Re: Card dealing and random repetition
- Next by thread: Re: Card dealing and random repetition
- Index(es):
Relevant Pages
|