Re: Cutting a deck of cards

2013-05-31 Thread Lee Crocker
Why on Earth would you want to? "Cutting" a deck makes no sense in software. 
Randomize the deck properly (Google "Fisher-Yates") and start dealing. Cutting 
the deck will not make it any more random, and in fact will probably make it 
worse depending on how you choose the cutpoint.

The purpose of "cutting" cards is to make it more difficult for human dealers 
to stack a deck. Simulating it in software makes no more sense than simulating 
the cigars you smoke while playing.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Cutting a deck of cards

2013-06-01 Thread Lee Crocker

>> and in fact will probably make it worse depending on how you choose
>> the cutpoint.
 
> I'm pretty sure it won't. Otherwise you'd be lowering entropy by doing
> a random thing to a random thing.

Doing a random thing to a random thing usually *does* lower entropy when
the "random" things are actually deterministic algorithms that may have 
unexpected correlations. That's why you don't write your own PRNG unless
you have a very good understanding of the math.

If you are shuffling the deck with, say, numbers from random.org (which uses 
atmospheric noise), then cutting the deck afterward will have precisely 0 
effect, since the (51 * 52!) possible outcomes include 51 copies of each of the 
52! orderings, and so the odds of each end up the same. But if you're choosing 
the cutpoint by getting a value from the same PRNG you used to shuffle, there 
might very well be a correlation that makes some arrangements more likely
than others.
-- 
http://mail.python.org/mailman/listinfo/python-list