Tabletop Simulator

Tabletop Simulator

View Stats:
Dzou Sep 20, 2015 @ 11:45pm
Problems with deck shuffling RNG?
Yesterday I was at my friends house and we wanted to play some card games on his copy of TTS. But when we shuffled the decks the randomization seemed little sketchy. Too many piled up cards, cards that are next to each other in the "order" of the deck (next to each other in the deck .jpg image) had a tendency of staying closer to each other while some cards were never drawn.
One thing that helped was shuffling the deck, cutting it into 8 packets and then shuffling each of them separately and then mixing them again in random order, but that seems to finnicky to do all the time.

I don't mind it that much because I plan to buy Tabletop Simulator to play boardgames on it, but if this truly is the issue then it makes games like Magic: The Gathering virtually impossible to play on the platform as they rely so heavily on good shuffling.
< >
Showing 1-15 of 19 comments
stage Sep 21, 2015 @ 2:18am 
This is a really hard question to anwer. Espessially if you only have a small number of samples.
Maybe you can shuffle 100 decks 1-69 one time an look for the outcome, but this isn't very effective.
Pseudo RNG are always a mathematic function and can produce lots of numbers. Bad PRNG can produce a group of values closer to each other that a real RND wouln'd do. Also a weak initial value (called seed) can tend RND to "prefer" some numbers over others. There exist tests (die hard test) to analyze such RNG functions to make sure the outcome are nearly perfect random. So yes it can be possible that you have seen such a bad shuffle. But with lots of more samples this can't be aswered.

So I think only the devs can anwer this question, which algorithm is used for randomization.
Dzou Sep 21, 2015 @ 2:28am 
It wouldn't be a problem if it didn't happen for a few times in a row. I didn't get any cards that are badly needed and represent a main mechanic of the game.
On the other hand it would often happen that i get triplets or quadruplets of the same card in my hand during 10 draws.
I am not saying that it couldn't be just a streak of bad luck, but it seems improbable and odd.
Meowella Sep 21, 2015 @ 6:09am 
Based on my personal experience, the card shuffling mechanism used in game is more closely based on a realistic shuffling pattern as opposed to a random mathematical algorithim.

I was playing a game of cards with my grandma and noticed a lot of cards sticking together in a near identical sense to TTS.

I would much rather TTS changed from a realistic shuffle technique to one which actually randomizes the order of the cards in the pile.
Dzou Sep 21, 2015 @ 7:12am 
It would be great if the dev could offer some input, though i highly doubt they would ever reveal the algorithm as it could lead to cheating - calculating the patterns.
I know that sometimes cards stick to each other, but IRL it never happened to me that in Magic i get no mana in 3 draws of 7 cards and i often get triplets in my hand.
TRIBALien Sep 21, 2015 @ 8:19pm 
Just curious, did you shuffle by picking up the deck and shaking it or by right-clicking and choosing shuffle from the context menu?

I usually don't trust RNGs (on general principle), so I have very little experience with how well the context menu's shuffle function works. The idea that the RNG's seed value is no longer affected by the players' actions makes it seem less random than shaking the deck.
Dzou Sep 22, 2015 @ 2:50am 
I shuffled it by shaking it.
But even so, i don't get the feel that shuffle would be "affected by players' action", it seems just like more consecutive shuffles on which the same algorithm applies. Same as if you clicked the shuffle button 15 times instead of shuffling for 15 seconds.
I might be wrong though.
Last edited by Dzou; Sep 22, 2015 @ 2:53am
A Kobold Sep 24, 2015 @ 11:44pm 
Yeah, the equation can be iffy at times, especialyl with one of my MTG decks. the Real Qorld version of it can wreck a face and then some, but the TTS version never has enough mana, both shaking and clicking shuffle.
TharsisRoverPets Sep 25, 2015 @ 3:14pm 
It's a common mistake that truly random sequences don't have clumps. In fact, teachers who assign homework asking students to flip a coin 100 times can usually tell who cheated because they don't have enough clumps.

"Real-world" shuffling often does not sufficiently randomize decks, especially if you mana-weave (which is illegal in sanctioned play).
GuNNuP Sep 25, 2015 @ 10:06pm 
Yep, of all the things to complain about, you chose the one where random things typically happen randomly, but by coincendence you noticed some cards clumping. For me it's random enough that the top 5-10 cards aren't the same, unless you have 20 ish cards in the deck, hell even yu-gi-oh will be sufficeintly random. even when playing battlestar galactica, never the same seet gets the cylon. So I don't know if what you are saying is a coincidental or you didn't shuffle long enough, like in real life. the longer you shoufle the more mixed it is. Learning how to shuffle, or how the game shuffles is wierd. For instance I wouldn't bet any skins on this game if i where to remember the order cards are previous to being shuffled.

https://www.youtube.com/watch?v=AxJubaijQbI
Meowella Sep 26, 2015 @ 2:25am 
I don't want a realistic shuffling technique, I want a deck randomization technique. The difference being realism versus the advantage of a computer.
Skates Sep 26, 2015 @ 5:48am 
I just wanna say that I too have experienced this. For a long time i've just attributed it to chaos, since this kind of behaviour happens with shuffling cards in real life, but definitely not this consistently.

Whenever playing a game where the deck has multiple copies of the same cards in sequence, we tend to see the two cards together extremely frequently, regardless of the amount of shufflin that takes place.

I'm not saying you shouldn't expect to see things clumped together, but in a real life shuffle this occurs because of the mechanics (well explained in this video), but in an digital replication you would expect the cards to be treated as individual objects and each shuffled randomly. This should negate the 'clumping' behaviour more often than not, but the opposite seems to be true. It's very suspicious.
TharsisRoverPets Sep 26, 2015 @ 7:24am 
Take a look at this thread: http://boards.straightdope.com/sdmb/showthread.php?t=590227

By Pasta's simulation, you only need to flip 13 cards off a randomly shuffled deck of 52 cards to have a 50/50 chance of two cards of the same number in a row

If you want to see how clumping happens naturally in a random process, flip a coin 100 times. Take a look at the longest runs in heads and tails.
Last edited by TharsisRoverPets; Sep 26, 2015 @ 7:27am
TharsisRoverPets Sep 26, 2015 @ 7:35am 
Here's another article talking about shuffling, randomness, and the gambler's fallacy:
http://www.independent.co.uk/life-style/gadgets-and-tech/news/why-random-shuffle-feels-far-from-random-10066621.html
Knil  [developer] Sep 26, 2015 @ 7:39am 
Just to settle things a bit we use a simple Random.range in our code to shuffle things like decks. Each shuffle is as random as the last there is no built in memory.
Last edited by Knil; Sep 26, 2015 @ 7:40am
Dzou Sep 26, 2015 @ 10:31am 
I actually started this thread because i wandered if this was some sort of bug because this happened to me:

I have a playset of 4 cards in a 60 cards deck. That means that in a initial draw of 7 cards there is a 39,9% chance of drawing it, 44,5% in turn 2 etc etc...
We've come at turn 10 where there is a 72,2% chance and still it was tucked away further away in the deck. Now you could write this off as a random chance, but this happened in 4 games in a row. It made me wonder.

But anyways. I got my question answered, mods can close this thread if they feel there is no further point in discussing the topic.
< >
Showing 1-15 of 19 comments
Per page: 1530 50

Date Posted: Sep 20, 2015 @ 11:45pm
Posts: 19