RNG/Shuffler

I'm just curious and wondering, what program is used to shuffle the decks in xmage?
High Quality Resources for Collectible Card Games
https://www.slightlymagic.net/forum/
https://www.slightlymagic.net/forum/viewtopic.php?f=70&t=16746
for (int n = shuffled.length - 1; n > 0; n--) {
int r = rnd.nextInt(n);
UUID temp = shuffled[n];
shuffled[n] = shuffled[r];
shuffled[r] = temp;
}
Clumps happen but not all the time. 8 lands in a row, yes. But having to mulligan almost every game with 20 land hands (UW heroic) is just plain weird.emerald000 wrote:This is a normal Fisher-Yates shuffle using the built-in Java RNG. This is about as good as you can need/get.
The probable reason you feel the shuffler is flawed is because people usually do not shuffle correctly in real life. Randomness is not having the lands equally spaced in the deck. That is the opposite of random. Clumps should and will happen. You will get 8 non-lands in a row. You will get 8 lands in a row. You must not look at a specific event and say because it is unlikely, the shuffler is flawed.
Fisher-Yates shuffletommygecko wrote:emerald000 wrote:It's badly screwing up my testing for games day. I'm sorry but telling an ordinary person like me Fisher-Yates shuffle does no help to me. Please explain it clearly to me and convincingly to me.
All you have done is improperly and backwardsnyrang wrote:This is a very interesting discussion, not only for xmage because as far as I know the Fisher-Yates shuffling algorithm is widely used in card games.
I wonder why a plain and simple algorithm like this is not used:
- Start with a pile of 60 cards in any order
- Generate a random number n from 1 to 60
- The n-th card of the original pile is placed on the top of the deck
- Generate a random number n from 1 to 59
- The n-th card of the original pile is placed on the top of the deck
... and so on
While Fisher-Yates is a proper shuffling algorithm, in that it behaves roughly as a human could do in real life, I can't help but feeling that it does introduce a bias in the final result, if only because it ends up evaluating most cards' position multiple times.
Wouldn't it make more sense to use a purely random (well, pseudo-random actually due to how RNGs work) algorithm like the one described above?
tommygecko wrote:Man, i don't know, it just feels weirdly different compared to real life. And this discourages me abit from playtesting online. Is there a rng that mimics more closely to real life shuffling? I think it would be a nice addition to be able to choose from 2 different rng generators.
NO just NO!!! ... this is just idiotic. Stop.BiasedDice wrote:There is, but I doubt it'll ever be done. Make a 3D model of a card, then use a physical simulation to shuffle the cards with virtual hands. Take in account the paper's density, the forces, the direction of all forces, shuffle like it would in real life with virtual hands.
Flawed RNG is when there is too much repetition. If you make a deck and out of 10 first hands you always draw 2 or 3 copies of the same card, that's flawed. That's what I experienced in OCTGN.