[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

RE: [FWP] Perl Card Games



As a small note about the difference between a "good" shuffle and a "real"
shuffle. When the American Contract Bridge League started using computer
generated hands in the seventies, they had a bad reaction to those "crazy
computer hands". The problem it turned out was that the computer generated
deals were too good. They had perfect distribution, but people shuffling
decks had real shuffles. People were used to poor distribution.

You can also purposely generate bad shuffles. If a hand is passed out, you
stack the four hands after people sort them into suits, cut, and then deal
4-4-4-4, 5-5-5-5, 4-4-4-4. It is a goulash, or hungarian goulash deal.

Call it a human factor.  By the way, you only need 7 good shuffles to
maximize randomness. I can supply the source, but it sticks in my memory.

Mike

> -----Original Message-----
> From: owner-fwp@technofile.org [mailto:owner-fwp@technofile.org]On
> Behalf Of John Porter
> Sent: Wednesday, August 04, 1999 1:15 PM
> To: fwp@technofile.org
> Subject: Re: [FWP] Perl Card Games
>
>
>
> Hi y'all.
>
> Here is a routine which simulates a "real" shuffle,
> in which the deck is cut and the two halves are riffled
> together.  It also cuts a small part (about a quarter)
> from the top to the bottom of the array first.
> This is the sort of thing you would want to call several times
> in succession (at least four) before actually using the result.
> Even then, it is not a "good" shuffle; it is like a "real" shuffle!
>
> sub real_shuffle(@) {
>   @_ > 16 or die "TOO FEW";


==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe