Page 1 of 1

poor random shuffle

Posted: Dec 15, 2012
by steup
The shuffle algorithm is very poor! To observe this play sea towers. Repeatedly deal (don't play) New - Esc, New - Esc etc.
Observe the locations of the aces. They fall predominately in the top row, decreasing toward the bottom. Also note that lower value cards also are predominate in the upper rows. If you keep score of aces by row and apply statistical tests to the result it significantly non-random. It is expected that the aces ( or any other card ) should be fairly evenly distributed among all five rows.

In playing sea towers this makes it more difficult than it should be with a thoroughly shuffled deck.

There are many good random number generator algorithms available. Yours needs improvement.

Re: poor random shuffle

Posted: Dec 17, 2012
by Aidan
The shuffle algorithm starts with a sorted deck, then it swaps two randomly picked cards in the deck 70000 times.

I would imagine this would suffice, but I could be wrong.

I just started 10 new games of Sea Towers to check and did not see any problem - the Aces were evenly distributed most times.