Community

 
Jump Menu:
Post Reply
Page 2 of 180  •  Prev 1 2 3 4 5 6 ... 180 Next
Switch to Forum Live View The Shuffler Thread For a New Generation
8 years ago  ::  Oct 20, 2005 - 8:05PM #11
scaught
Date Joined: Oct 30, 2003
Posts: 5

bubba0077]I just thought it would be nice if a new one were started that had all the *good* technical information up front where everyone would see it.


So why include the post from Chris Green? It's nothing but tech-speak cloaked misinformation and does more to harm LL's programming credibility and instill doubt into the legitimacy of the shuffler than it does to qu wrote:

I just thought it would be nice if a new one were started that had all the *good* technical information up front where everyone would see it.[/quote]
So why include the post from Chris Green? It's nothing but tech-speak cloaked misinformation and does more to harm LL's programming credibility and instill doubt into the legitimacy of the shuffler than it does to quash it.

Quick Reply
Cancel
8 years ago  ::  Oct 20, 2005 - 8:39PM #12
zombiegleemax
Date Joined: Aug 10, 2009
Posts: 470,906
Uh oh! Zyto is going to be mad at you!!
He contacted me via pm a few days back asking me if it would be ok to make essentially this very thread. You have taken away his one chance at getting a thread started by him that would go over 100 posts.

I even fear his wrath.

/me goes into hiding.
Quick Reply
Cancel
8 years ago  ::  Oct 20, 2005 - 9:46PM #13
bubba0077
  • Volunteer Community Lead
  • blame me for the weather
Date Joined: Feb 27, 2002
Posts: 9,801

scaught]So why include the post from Chris Green? It's nothing but tech-speak cloaked misinformation and does more to harm LL's programming credibility and instill doubt into the legitimacy of the shuffler than it does to quash it.


Because it is the only original, official statement we have on the matter. Besides, I find it difficult to understand how you know there is misinformation unless you have access to the actual code.

Furthermore, I haven't been able to reconcile your complaints from the end of previous thread. Of course, it might help if I actually had a copy of Knuth to reference to see exactly what Algorithm A does. What I do know is random hardware and client packet information is commonly used in RNGs in other applications where actual randomness is important, such as virtual casinos, and I would think LL implemented a similar wrote:

So why include the post from Chris Green? It's nothing but tech-speak cloaked misinformation and does more to harm LL's programming credibility and instill doubt into the legitimacy of the shuffler than it does to quash it.[/quote]
Because it is the only original, official statement we have on the matter. Besides, I find it difficult to understand how you know there is misinformation unless you have access to the actual code.

Furthermore, I haven't been able to reconcile your complaints from the end of previous thread. Of course, it might help if I actually had a copy of Knuth to reference to see exactly what Algorithm A does. What I do know is random hardware and client packet information is commonly used in RNGs in other applications where actual randomness is important, such as virtual casinos, and I would think LL implemented a similar method.

Magic Online Volunteer Community Lead. • Also assisting the Paper Magic area for the time being.
I'm trying to make my official VCL posts in purple

You posted saying my thread was moved/locked but nothing happened.      Spoiler: Show
Unfortunately, VCLs do not currently have the tools necessary to take moderation actions directly. VCLs submit their actions to ORCs, who then actually perform the action. This processing can take between a few minutes and several hours, depending on how busy/attentive the ORCs are.


If you see something that needs VCL attention, please use this thread (MTGO) or this thread (paper) to make a request and a VCL will look at it as soon as possible.  CoC violations should be reported to Customer Service using the "report post" button. Please do not disrupt the thread by making requests of either kind in-thread.

General MTGO FAQ


Yes, the Shuffler is Random!
The definitive thread on the Magic Online shuffler.

Magic Math Made Easy
Draw probabilities, Swiss results, Elo ratings and booster EV

Event EV Calculator
Calculate the EV for any event with a fixed number of rounds and prizes based on record

Dual means two. A duel is a battle between two people. Lands that make two colors of mana are dual lands. A normal Magic battle is a duel.

Thanks to PhoenixLAU for the awesome avatar!

QuotablesSpoiler: Show
"While a picture is worth a thousand words, each lolcat actually produces a negative wordcount." -Ith

"I think "Highly Informed Sarcasm" should be our Magic Online General motto." -Ith

"Sorry, but this thread seems just like spam. TT is for off-topic discussion, not no-topic discussion."
-WizO_Kwai_Chang

"Stop that! If you're not careful, rational thinking may catch on!" -Sax

"... the only word i see that fits is incompitant." -Mr44 (sic)

"You know a thread is gonna be locked when it gets to the hexadecimal stage." -Gathion

"It's a good gig" - Gleemax

"I tell people often, if you guys want to rant, you've certainly got the right to (provided you obey CoC/ToS stuff), and I don't even really blame you. But if you see something you think needs changing a well thought-out, constructive post does more to make that happen." - Worth Wollpert
Quick Reply
Cancel
8 years ago  ::  Oct 20, 2005 - 10:07PM #14
Xtofyr
  • St Z, Patron Saint of the 99 Post Club aka Th
Date Joined: Jan 12, 2004
Posts: 2,579

WizO_Jabberwock]Uh oh! Zyto is going to be mad at you!!
He contacted me via pm a few days back asking me if it would be ok to make essentially this very thread. You have taken away his one chance at getting a thread started by him that would go over 100 posts.

I even fear his wrath.

/me goes into hiding.


It's cool. My FAQ was almost done -- I was just waiting for elf to get back to me on a few questions and I had e-mailed one of my university professors with some questions as well. But, bubba did a fine job.

Zyto
:co wrote:

Uh oh! Zyto is going to be mad at you!!
He contacted me via pm a few days back asking me if it would be ok to make essentially this very thread. You have taken away his one chance at getting a thread started by him that would go over 100 posts.

I even fear his wrath.

/me goes into hiding.[/quote]
It's cool. My FAQ was almost done -- I was just waiting for elf to get back to me on a few questions and I had e-mailed one of my university professors with some questions as well. But, bubba did a fine job.

Zyto
:coolcthul

I can't spare a moment for the dog faced boy
I won't lend another hand to the worm girl of Hanoi
Don't deplete my oxygen for the guy who's turning blue
But ask me, and I'll do anything for you
Quick Reply
Cancel
8 years ago  ::  Oct 20, 2005 - 11:28PM #15
scaught
Date Joined: Oct 30, 2003
Posts: 5

bubba0077]Because it is the only original, official statement we have on the matter. Besides, I find it difficult to understand how you know there is misinformation unless you have access to the actual code.


If someone told you your car wasn't running properly because it's wiper fluid was low, would you need to know the inner workings of your engine to know that something was fishy with the assessment? What if it came from a mechanic? And what if you were a mechanic as well? Yes, my car needs wiper fluid, and I'm pretty sure it's important for things, but.....

Oh, there are words there that make sense. Whole concepts, too. But there are a bunch more words inbetween that boggle my mind. Sentences like wrote:

Because it is the only original, official statement we have on the matter. Besides, I find it difficult to understand how you know there is misinformation unless you have access to the actual code.[/quote]
If someone told you your car wasn't running properly because it's wiper fluid was low, would you need to know the inner workings of your engine to know that something was fishy with the assessment? What if it came from a mechanic? And what if you were a mechanic as well? Yes, my car needs wiper fluid, and I'm pretty sure it's important for things, but.....

Oh, there are words there that make sense. Whole concepts, too. But there are a bunch more words inbetween that boggle my mind. Sentences like:

The 32 bit random values returned by the basic random number function are mapped into the appropriate range by fixed point multiplication.


This is exactly what it sounds like when one of the producers here picks up a little programming lingo and tries to sound smart. "Fixed point multiplication"? For what? He wants to access fractional cards? (in other words, he's not dealing with whole numbers)? Or maybe he meant "fixed point with 0 precision"? And even if by "the appropriate range" he didn't mean the set of cards to choose from, why use fixed point math at all? On modern processors, you get none of the benefits (speed, memory) and all the drawbacks (severe loss of precision). Crazy moon talk.

bubba0077]Furthermore, I haven't been able to reconcile your complaints from the end of previous thread. Of course, it might help if I actually had a copy of Knuth to reference to see exactly what Algorithm A does. What I do know is random hardware and client packet information is commonly used in RNGs in other applications where actual randomness is important, such as virtual casinos, and I would think LL implemented a similar method.


My complaints might not even be valid because the "information" in that post doesn't make sense. That was my point. It's all conjecture. To beat my first analogy into the ground, I'm basically complaining that the wiper fluid offered to me is thin and doesn't clean the windshield well.

Anyways, hopefully elf will have shed some light on something to Xtofyr in such a way that will make this argument, this thread and the original post from Mr. Green moot and never referred to wrote:

Furthermore, I haven't been able to reconcile your complaints from the end of previous thread. Of course, it might help if I actually had a copy of Knuth to reference to see exactly what Algorithm A does. What I do know is random hardware and client packet information is commonly used in RNGs in other applications where actual randomness is important, such as virtual casinos, and I would think LL implemented a similar method.[/quote]
My complaints might not even be valid because the "information" in that post doesn't make sense. That was my point. It's all conjecture. To beat my first analogy into the ground, I'm basically complaining that the wiper fluid offered to me is thin and doesn't clean the windshield well.

Anyways, hopefully elf will have shed some light on something to Xtofyr in such a way that will make this argument, this thread and the original post from Mr. Green moot and never referred to again.

Quick Reply
Cancel
8 years ago  ::  Oct 21, 2005 - 12:20AM #16
bubba0077
  • Volunteer Community Lead
  • blame me for the weather
Date Joined: Feb 27, 2002
Posts: 9,801

scaught]Oh, there are words there that make sense. Whole concepts, too. But there are a bunch more words inbetween that boggle my mind. Sentences like: This is exactly what it sounds like when one of the producers here picks up a little programming lingo and tries to sound smart. "Fixed point multiplication"? For what? He wants to access fractional cards? (in other words, he's not dealing with whole numbers)? Or maybe he meant "fixed point with 0 precision"? And even if by "the appropriate range" he didn't mean the set of cards to choose from, why use fixed point math at all? On modern processors, you get none of the benefits (speed, memory) and all the drawbacks (severe loss of precision). Crazy moon talk.


Unless of course the random numbers from the RNG are between zero and one, in which case you *do* need to do the multiplication in fixed-point before truncating to get a natural number. I'm not saying it's all crystal-clear, and clarification *would* be nice, but I didn't see anything patently wrong in there (and I program quite a bit). Besides, like I said, it is the only source document we have right now.

Oh, there are words there that make sense. Whole concepts, too. But there are a bunch more words inbetween that boggle my mind. Sentences like: This is exactly what it sounds like when one of the producers here picks up a little programming lingo and tries to sound smart. "Fixed point multiplication"? For what? He wants to access fractional cards? (in other words, he's not dealing with whole numbers)? Or maybe he meant "fixed point with 0 precision"? And even if by "the appropriate range" he didn't mean the set of cards to choose from, why use fixed point math at all? On modern processors, you get none of the benefits (speed, memory) and all the drawbacks (severe loss of precision). Crazy moon talk.[/quote]
Unless of course the random numbers from the RNG are between zero and one, in which case you *do* need to do the multiplication in fixed-point before truncating to get a natural number. I'm not saying it's all crystal-clear, and clarification *would* be nice, but I didn't see anything patently wrong in there (and I program quite a bit). Besides, like I said, it is the only source document we have right now.

scaught]My complaints might not even be valid because the "information" in that post doesn't make sense. That was my point. It's all conjecture. To beat my first analogy into the ground, I'm basically complaining that the wiper fluid offered to me is thin and doesn't clean the windshield well.

Anyways, hopefully elf will have shed some light on something to Xtofyr in such a way that will make this argument, this thread and the original post from Mr. Green moot and never referred to again.


Information is always nice, but I wouldn't count on getting any back from Elf about the shuffler. He may not have even delved into it too deeply, since it was all done by LL long before he even had to deal with it. NOW, if we ask him about the code for 3.0, maybe he'll have some insight

Z2 => Sorry about pre-empting you here. I'd been thinking about redoing the shuffler thread for a couple weeks ago (I think I even mentioned *someone* doing it over in meta), but I don't think I discused it with more than a few people (none of them Jabs) and until I actually did it, it probably sounding more like wishful thinking. It's amazing the lengths I go to to procras wrote:

My complaints might not even be valid because the "information" in that post doesn't make sense. That was my point. It's all conjecture. To beat my first analogy into the ground, I'm basically complaining that the wiper fluid offered to me is thin and doesn't clean the windshield well.

Anyways, hopefully elf will have shed some light on something to Xtofyr in such a way that will make this argument, this thread and the original post from Mr. Green moot and never referred to again.[/quote]
Information is always nice, but I wouldn't count on getting any back from Elf about the shuffler. He may not have even delved into it too deeply, since it was all done by LL long before he even had to deal with it. NOW, if we ask him about the code for 3.0, maybe he'll have some insight

Z2 => Sorry about pre-empting you here. I'd been thinking about redoing the shuffler thread for a couple weeks ago (I think I even mentioned *someone* doing it over in meta), but I don't think I discused it with more than a few people (none of them Jabs) and until I actually did it, it probably sounding more like wishful thinking. It's amazing the lengths I go to to procrastinate.

Magic Online Volunteer Community Lead. • Also assisting the Paper Magic area for the time being.
I'm trying to make my official VCL posts in purple

You posted saying my thread was moved/locked but nothing happened.      Spoiler: Show
Unfortunately, VCLs do not currently have the tools necessary to take moderation actions directly. VCLs submit their actions to ORCs, who then actually perform the action. This processing can take between a few minutes and several hours, depending on how busy/attentive the ORCs are.


If you see something that needs VCL attention, please use this thread (MTGO) or this thread (paper) to make a request and a VCL will look at it as soon as possible.  CoC violations should be reported to Customer Service using the "report post" button. Please do not disrupt the thread by making requests of either kind in-thread.

General MTGO FAQ


Yes, the Shuffler is Random!
The definitive thread on the Magic Online shuffler.

Magic Math Made Easy
Draw probabilities, Swiss results, Elo ratings and booster EV

Event EV Calculator
Calculate the EV for any event with a fixed number of rounds and prizes based on record

Dual means two. A duel is a battle between two people. Lands that make two colors of mana are dual lands. A normal Magic battle is a duel.

Thanks to PhoenixLAU for the awesome avatar!

QuotablesSpoiler: Show
"While a picture is worth a thousand words, each lolcat actually produces a negative wordcount." -Ith

"I think "Highly Informed Sarcasm" should be our Magic Online General motto." -Ith

"Sorry, but this thread seems just like spam. TT is for off-topic discussion, not no-topic discussion."
-WizO_Kwai_Chang

"Stop that! If you're not careful, rational thinking may catch on!" -Sax

"... the only word i see that fits is incompitant." -Mr44 (sic)

"You know a thread is gonna be locked when it gets to the hexadecimal stage." -Gathion

"It's a good gig" - Gleemax

"I tell people often, if you guys want to rant, you've certainly got the right to (provided you obey CoC/ToS stuff), and I don't even really blame you. But if you see something you think needs changing a well thought-out, constructive post does more to make that happen." - Worth Wollpert
Quick Reply
Cancel
8 years ago  ::  Oct 21, 2005 - 12:33AM #17
Xtofyr
  • St Z, Patron Saint of the 99 Post Club aka Th
Date Joined: Jan 12, 2004
Posts: 2,579

bubba0077]Z2 => Sorry about pre-empting you here. I'd been thinking about redoing the shuffler thread for a couple weeks ago (I think I even mentioned *someone* doing it over in meta), but I don't think I discused it with more than a few people (none of them Jabs) and until I actually did it, it probably sounding more like wishful thinking. It's amazing the lengths I go to to procrastinate.


It's not a problem at all. After all, I did make swearage to Grog.

If elf tells me anything useful, I'll forward it to you for inclusion -- but yeah, I'm not holding my breath on that. I also e-mailed one of my former professors to parse Chris Green's statement for me. If she answers, I'll send that along too.

Zyto
:co wrote:

Z2 => Sorry about pre-empting you here. I'd been thinking about redoing the shuffler thread for a couple weeks ago (I think I even mentioned *someone* doing it over in meta), but I don't think I discused it with more than a few people (none of them Jabs) and until I actually did it, it probably sounding more like wishful thinking. It's amazing the lengths I go to to procrastinate.[/quote]
It's not a problem at all. After all, I did make swearage to Grog.

If elf tells me anything useful, I'll forward it to you for inclusion -- but yeah, I'm not holding my breath on that. I also e-mailed one of my former professors to parse Chris Green's statement for me. If she answers, I'll send that along too.

Zyto
:coolcthul

I can't spare a moment for the dog faced boy
I won't lend another hand to the worm girl of Hanoi
Don't deplete my oxygen for the guy who's turning blue
But ask me, and I'll do anything for you
Quick Reply
Cancel
8 years ago  ::  Oct 28, 2005 - 8:01AM #18
Caervel
Date Joined: Oct 17, 2005
Posts: 144
Just an observation from something last night. I was playing around with making Ravnica decks with 'real' cards (obviously, since it isn't out on MTGO yet). Each deck had 23 spells and 17 lands. One deck I put all lands at the bottom, one type on top the other type below the first type (ie, all swamps together and all forests together). The other one I shuffled my lands first, then shuffled that pile into the spell pile. All shuffles I did were riffle (that's the only way I shuffle) and I did 7 each (what's needed to truly randomize a 60 card deck, so it should do just fine on a 40). Now note, I didn't intend to run an 'experiment', I just wanted to see how the created decks looked on the opening hand. I got _one_ acceptable opening hand out of 10 attempts. By acceptable, I mean more than 1 land and less than 6. I drew 1 land multiple times. I drew 6 land once, 5 land multiple times.

Had I managed these results on MTGO I might have started to believe that the shuffler was broken. I managed these results in real life. I got more mana screw/floods in 20 minutes last night in real life than I have on MTGO so far (probably triple the number of opening hands there).

So here's a possible challenge to those folks who think the shuffler's broken and have access to physical cards. Make the 'same' deck online and RL. It doesn't have to be exactly the same, but should have the same number of each color land and spells. ie, 10 swamp, 7 forest, 13 black spells, 10 green spells.

Keep a running total of the following for each MTGO game:

Number of each color spell in opening hand.
Number of each land in opening hand.
A letter code of F, N, S (for flood, normal, and screw)

Then riffle shuffle your physical deck at some point the number of MTGO games you've played so far, and note the same. Keep doing this. Compare results.
Quick Reply
Cancel
8 years ago  ::  Oct 28, 2005 - 11:34AM #19
zombiegleemax
Date Joined: Aug 10, 2009
Posts: 470,906
A deck of playing cards is randomized by a procedure called shuffling to provide an element of chance in card games. Shuffling is often followed by a cut, to ensure that the shuffler has not manipulated the outcome.

Contents:
1 Shuffling techniques
1.1 Riffle
1.2 Stripping
1.3 Pushing
1.4 Pile shuffle
1.5 Beginner shuffle
2 False Shuffles
3 Shuffling machines
4 Randomization
5 Shuffling algorithms

Shuffling techniques:
Several techniques are used to shuffle a deck of cards. While some techniques achieve a better randomization than other techniques, other techniques are easier to learn and easier to handle or better suited for special situations.




Riffle:
The riffle shuffle (sometimes called a faro shuffle) is the traditional method of shuffling. The deck is divided approximately in half, one part going into the left hand and the other part going into the right hand. Then by riffling the thumbs over the edges of the cards, the two halves of the deck are interleaved together. With practice a person can sometimes achieve a perfect shuffle, with every other card coming from alternating hands. This is not recommended, as will be shown below. Sometimes, computer programs that shuffle cards do several riffle shuffles, rather than just determine each card at random.

One riffle shuffle reorders the cards significantly. But the reordering is not random, by any means. The top card is still near the top. The bottom card is still near the bottom. Most pairs of cards are either still adjacent to each other, or not very far apart. And so, several shuffles are necessary. How many shuffles? Mathematics shows that at least seven shuffles are needed to randomize the cards. More shuffles than that do not affect the randomness. Bridge players often complain about the poor hands that result from computer dealt cards. This would seem to indicate that these people are used to inadequate shuffling.

A perfect shuffle occurs when the deck is divided exactly in half, and the cards are perfectly interlaced, with one card coming from one hand, then one card coming from the other hand, then one card coming from the first hand, etc. There are two types of perfect shuffles, the "in-shuffle" and the "out-shuffle." Let's assume that the deck is divided in two with the top cards going into the left hand and the bottom cards into the right hand. Then an in-shuffle begins with the first card coming from the left, the second from the right, the third from the left, etc. An out-shuffle begins with the first card coming from the right. If the right hand originally took the top cards, then the definitions are reversed (the in-shuffle begins with the first card coming from the right...). It has been shown that eight perfect out-shuffles returns the 52-card deck to its original order. Apparently, it takes more in-shuffles to do that. So, perfect shuffles do not randomize a deck, far from it.

Stripping:
Another procedure is called stripping, where small groups of cards are removed from the top or bottom of a deck and replaced on the opposite side (or just assembled on the table in reverse order). This is a much less effective randomizing procedure, and is thus mainly used in conjuction with riffling, or by younger players whose hands are not large enough for other methods.

Pushing:
"Pushing" is the procedure of pushing the ends of two halves of a deck against each other in such a way that they naturally intertwine. Sometimes the deck is split into equal halves of 26 cards which are then pushed together in a certain way so as to make them perfectly interweave. This is known as a Faro Shuffle and is quite difficult to master.

Pile shuffle:
The pile shuffle is not a randomization technique, but a method to dissolve clumps of sticky cards. Cards are arranged in piles by putting the top card from the deck in turn on one of several piles. Then the piles are stacked on top of each other. This ensures that cards that were next to each other are now separated.

Beginner shuffle:
This involves simply spreading the cards out face down, and sliding them around and over each other with one's inexperienced hands. Then the cards are moved into one pile so that they begin to intertwine and are then arranged back into a stack. This method is useful for beginners and small children or if one is inept at shuffling cards. However, the beginner shuffle requires a large surface for spreading out the cards and takes longer than the other methods.

This is also used periodically in casinos, where it is called a "wash" or "scramble". A typical sequence between hands of poker, for example, is a wash, two riffles, a strip, a third riffle, and a cut, which an experienced dealer can accomplish in as little as five seconds.

False Shuffles:
Magicians, sleight-of-hand artists, and card cheats employ various methods of shuffling whereby the deck appears to have been shuffled fairly, when in reality the order of the cards stays exactly the same.

Shuffling machines:
Because standard shuffling techniques are seen as weak, and in order to avoid "inside jobs" where employees collaborate with gamblers by performing inadequate shuffles, many casinos employ automatic shuffling machines which perform continuous shuffles on a pack of cards, and can produce any number of cards on demand. Note that the shuffling machines have to be carefully designed, as they can generate biased shuffles otherwise: the most recent shuffling machines are computer-controlled.

Randomization:
The mathematician and magician Persi Diaconis is an expert on the theory and practice of card shuffling, and an author of a famous paper on the number of shuffles needed to randomize a deck, concluding that it did not start to become random until five good riffle shuffles, and was truly random after seven. (You would need more shuffles if your shuffling technique is poor, of course.) Recently, the work of Trefethen et al. has questioned some of Diaconis' results, concluding that six shuffles is enough. The difference hinges on how each measured the randomness of the deck. Diaconis used a very sensitive test of randomness, and therefore needed to shuffle more. Even more sensitive measures exist and the question of what measure is best for specific card games is still open.

Here is an extremely sensitive test to experiment with. Take a standard deck without the jokers. Divide it into suits with two suits in ascending order from ace to king, and the other two suits in reverse. (Many decks already come ordered this way when new.) Shuffle to your satisfaction. Then go through the deck trying to pull out each suit in the order ace, two, three ... When you reach the top of the deck, start over. How many passes did it take to pull out each suit?

What you are seeing is how many rising sequences are left in each suit. It probably takes more shuffles than you think to both get rid of rising sequences in the suits which were assembled that way, and add them to the ones that were not!

In practice the number of shuffles that you need depends both on how good you are at shuffling, and how good the people playing are at noticing and using non-randomness. 2–4 shuffles is good enough for casual play. But in club play, good bridge players take advantage of non-randomness after 4 shuffles, and top blackjack players literally track aces through the deck.

Shuffling algorithms:
In a computer, shuffling is equivalent to generating a random permutation of the cards. There are two basic algorithms for doing this, both popularized by Donald Knuth. The first is simply to assign a random number to each card, and then to sort the cards in order of their random numbers. This will generate a random permutation, unless two of the random numbers generated are the same. This can be eliminated either by retrying these cases, or reduced to an arbitrarily low probability by choosing a sufficiently wide range of random number choices.

The second, generally known as the Knuth shuffle or Fisher-Yates shuffle[1], is a linear-time algorithm (as opposed to the previous O(n log n) algorithm if using efficient sorting such as mergesort or heapsort), which involves moving through the pack from top to bottom, swapping each card in turn with another card from a random position in the part of the pack that has not yet been passed through (including itself). Providing that the random numbers are unbiased, this will always generate a random permutation.

Notice that great care needs to be taken in implementing the Knuth shuffle; even slight deviations from the correct algorithm will produce biased shuffles. For example, working your way through the pack swapping each card in turn with a random card from any part of the pack is an algorithm with nn different possible execution paths, yet there are only n! permutations. A counting argument based on the pigeonhole principle will clearly show that this algorithm cannot produce an unbiased shuffle, unlike the true Knuth shuffle, which has n! execution paths which match up one-to-one with the possible permutations.

Whichever algorithm is chosen, it is important that a source of truly random numbers is used as the input to the shuffling algorithm. If a biased or pseudo-random source of random numbers is used, the output shuffles may be non-random in a way that is hard to detect, but easy to exploit by someone who knows the characteristics of the "random" number source.
Quick Reply
Cancel
8 years ago  ::  Oct 28, 2005 - 12:48PM #20
JerryVan
Date Joined: Jun 17, 2005
Posts: 10
I stay up here at WotC HQ 24/7 365 and there are 3 reasons why I shuffle the cards the way I do.

1. I am capricious, benevolent one minute and malevolent the next. I sometimes like to give out perfect distribution for several games in a row, only to mana screw, or flood you at the least opportune moment.

2. As you read earlier I am here 24/7, 365 so I can nod off at times. I drink copious amounts of caffeine and consume large quantities of sugar to assure alertness, but sometimes I get just too tired and put something heavy on my keyboard while I doze off.

3. Some of you are simply blessed, and others are cursed. I have no say in it, it’s a universal convergence thing, and I carry out what the fates decree.

So now you know, its not math, its Magic.
Quick Reply
Cancel
Page 2 of 180  •  Prev 1 2 3 4 5 6 ... 180 Next
Jump Menu:
 
    Viewing this thread :: 0 registered and 1 guest
    No registered users viewing