Re: Card dealing and random repetition
- From: pete <pfiland@xxxxxxxxxxxxxx>
- Date: Fri, 31 Mar 2006 12:56:34 GMT
Gerry Quinn wrote:
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? array
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, array
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) array
by bending the cards
and releasing each deck next to each other.array
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, array
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. 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.
"A perfect shuffle" sounds like
it would be a bad thing in a card game.
--
pete
.
- Follow-Ups:
- Re: Card dealing and random repetition
- From: Arthur J. O'Dwyer
- Re: Card dealing and random repetition
- From: toby
- Re: Card dealing and random repetition
- References:
- Re: Card dealing and random repetition
- From: Simaldeff Blaldieri
- Re: Card dealing and random repetition
- From: Gerry Quinn
- 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
|