Jump to content

"Shuffle" for TV shows: I think something wrong with random generator


Go to solution Solved by Luke,

Recommended Posts

Posted (edited)

I have a bunch of shows where I have all Seasons/Episodes available, and we like to pick random episodes to watch. 

Problem is that if a show has like 100-150 episodes, Emby's shuffle function seems to always pick from like the same 10 episodes.  The reason I KNOW this is the sheer number of times my wife and I both say "we just saw this episode!"

And so we resort to "You pick a Season and I'll pick an episode #"

Edited by JeremyG
Gilgamesh_48
Posted

In computers "random" is nearly impossible so it is not surprising that things repeat as there is probably a very simple random number generator that does not take any real pains to insure randomness. However if what you say is true then it is probable that Emby is not using any of the pseudo-random generators correctly as, even with poor random number generation you should get a greater variety than just 10 out of 200. I used for years, until a better random number generator came about, that took a "seed" number to create randomness and I got the "seed" number by looking at the current time and the thousandth second field. I figured that I would get sufficient randomness from that but it turned out that was not really even close to true randomness. So I ended up making a very complex random number generator and that was OK mostly but I discovered that the randomness was not good enough for modern applications.

I suspect Emby is using a very simple random number generator and thereby not being truly random. I set up a photo library to display in random order and achieved only an "order" that appeared "random" but kept repeating the same pictures and the same order nearly every time I accessed that library. That is the random order was not truly random.

I think Emby needs to rework their random functions to make some real effort at coming close to random rather that just faking random when it is needed. 

However true random number generation includes the probability of clusters. That is if we generate a series of random numbers between 1 and 10 we should see 1 1 1 1 1 just as often as we see 1 9 7 6 3 or any other group of 5 numbers. So it is entirely possible that the non-randomness we see is actually randomness being true to itself.

pwhodges
Posted

On another software platform I solved this by making a temporary playlist by picking from the previous list (starting with a simple list of the items) randomly, moving each item from the old playlist to the new, so that all items were played (in their previously randomised order) before there was a repeat.  Of course, at the start of the new playlist, there might be an item which had been close to the end of the previous one - but in general it worked, from my PoV - "perfectly".

Paul

  • Solution
Posted

Hi, we'll look at improving this. Thanks for reporting.

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...