*Author

Active members:
Beo(1) teffy(1) Delreich(1)

Beo

  • Guest
wondering about randomness https://elementscommunity.org/forum/index.php?topic=2082.msg17248#msg17248
« on: January 13, 2010, 12:58:21 am »
Is the deck truly shuffled with a random algorithm?  Seems to be too often one deck or the other is just stacked one way or the other.  my 42 card deck has 6 creatures, 6 spells, 3 shields, 1 weapon, and 6 other cards.  Finally lost when after going through about 30 of those cards, I only had gotten 1 creature, 1 weapon, and 3 shields.  This seems to happen about every 10 games or so (though this recent game was the most extreme case of stacked deck).  I haven't played so many games that a normal distribution curve would likely get me out on the extreme edges of probability, seems to me.  Just wanted a bit of comment on the randomness/lack thereof.  It's very off-putting and discouraging to see such extreme cases and really makes one wonder whether to continue playing in the worst cases.  Thanks for your thoughts.

Offline teffy

  • Hero Member
  • *****
  • Posts: 1689
  • Country: de
  • Reputation Power: 20
  • teffy is a Mummy waiting to discover the path to glory.teffy is a Mummy waiting to discover the path to glory.teffy is a Mummy waiting to discover the path to glory.teffy is a Mummy waiting to discover the path to glory.
  • May the oracle be with you
  • Awards: Slice of Elements 15th Birthday CakeSlice of Elements 14th Birthday CakeSlice of Elements 4th Birthday CakeSlice of Elements 3rd Birthday CakeWeekly Tournament WinnerSlice of Elements 2nd Birthday Cake
Re: wondering about randomness https://elementscommunity.org/forum/index.php?topic=2082.msg17253#msg17253
« Reply #1 on: January 13, 2010, 01:52:04 am »
I believe zanz wrote in the chat, that every card is put into a random position - twice.
I`m teffy, here - and Ringat on Kongregate

Delreich

  • Guest
Re: wondering about randomness https://elementscommunity.org/forum/index.php?topic=2082.msg17263#msg17263
« Reply #2 on: January 13, 2010, 02:23:01 am »
It's a slightly flawed Fisher-Yates shuffle (http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle). Second paragraph under "Implementation errors (http://en.wikipedia.org/w/index.php?title=Fisher%E2%80%93Yates_shuffle&oldid=335650824#Implementation_errors)" on Wikipedia details the flaw and the consequences.
Aside from that flaw, the shuffling is about as good as it gets with the PRNG available.

 

anything
blarg: