Jump to content

Shuffle seed


Recommended Posts

invertedknife
Posted

Hello, 

I have found that shuffle often results in the same item playing, even when i am shuffling from a large library (>300 items). Is this because of a bad seed? 

Spaceboy
Posted

been reported before. per dev's, randomness is difficult to achieve. not sure i buy that personally

invertedknife
Posted

I think it's odd that in a library of thousands of movies, I keep getting the same ones to play when I do shuffle. 

GrimReaper
Posted
Just now, invertedknife said:

I think it's odd that in a library of thousands of movies, I keep getting the same ones to play when I do shuffle. 

You might try @pünktchen's excellent VirtualTV plugin.

 

Spaceboy
Posted

as excellent as it is (very) i still see episodes recur there far too often to be random

Posted

https://www.sciencefocus.com/science/is-anything-truly-random/

https://thecodeboss.dev/2017/05/why-random-numbers-are-impossible-in-software/

 

You yourself are not a random assemblage of DNA genetic material. It is following a set a rules set forth in the RNA in how randomness will be applied. Nothing in this universe can be random. Everything has meaning.

gillmacca01
Posted

Don't know if this is related, but this is from an episode of 'Q.I.'.

- Sandi asks the panel for something that is truly random. One thing that is not random is the shuffle option on music playlists. People thought that the random function did not shuffle the songs randomly enough. While the system was entirely random, the brain is designed to look for patterns. Thus a truly random playlist may play the same song three times, and people will think that some songs are played more than others. Spotify thus had to change their algorithm to make it appear more random than it really was. 

Posted (edited)

You can get a random number seeded from the server (based on uptime) and it uses that to give you a random playlist of songs. Now the client can generate a random seed number itself (based on uptime) and again randomize that playlist of songs the server gave it that were randomized already. The uptime on the server and client would differ. In effect randomized on the server and again on the client using entirely different seeds. That would be a double shuffle single shoot in Las Vegas terms. That would still produce results that were predictable and repeated if listened to often enough on the same album. Random is very hard to get right.

Edited by speechles
  • Like 1
Spaceboy
Posted (edited)
18 minutes ago, ebr said:

yeah there's random and there's random though. i think you can do better.

no-one is asking for a once in a universe sequence. just not the same episode presented over and over again when you are picking a sample of 5 from a population of almost 1000

Edited by Spaceboy
  • Like 1
crusher11
Posted
2 hours ago, Spaceboy said:

as excellent as it is (very) i still see episodes recur there far too often to be random

Yeah, it seems to only pick one episode of Blackadder for me. It plays plenty of other content but if Blackadder happens to be on, it's always the same episode. 

Posted (edited)

Even when dealing cards it becomes predictable because of how people shuffle cards and how people pair cards together when discarding. That you have to introduce a new deck of cards (play with two decks shuffled together) to give a better randomness. That is what having seeds on the sever end to generate the response does already. But if clients also seeded and randomized the response for the server when it knows it is supposed to be random it would better "spread the cards around players hands", so to speak. You would get less possibility that players could predict their next card based off the last card they were played. It would introduce a slight wait as the client would have to "shuffle the cards again" after the server gives a reply. But that would be a better random.

Edited by speechles
Spaceboy
Posted
2 minutes ago, speechles said:

Even when dealing cards it becomes predictable because of how people shuffle cards and how people pair cards together when discarding. That you have to introduce a new deck of cards (play with two decks shuffled together) to give a better randomness. That is what having seeds on the sever end to generate the response does already. But if clients also seeded and randomized the response for the server when it knows it is supposed to be random it would better "spread the cards around players hands", so to speak. You would get less possibility that players could predict their next card based off the last card they were played. It would introduce a slight wait as the client would have to "shuffle the cards again" after the server gives a reply. But that would be a better random.

indeed, someone on here developed some powershell scripts that did exactly that. shuffled three times i think to create more random playlists

  • Like 1
Posted (edited)

It could even be an option on the client. Call it "Randomize shuffle" and let users enable or disable. If users randomize the shuffle whenever it generates a random shuffle the application will generate an uptime based upon the number of seconds it has been running and use this as a seed key. This will always be unique from the last time you tried it. This would generate a different pattern to the ordering the server returns and could be used to generate different outcomes practically every single time. The only downside is shuffle time. The larger the dataset the larger the shuffle time before display/playback can begin. A loading spinner would spin for a bit longer before playback could begin.

Edited by speechles
FrostByte
Posted

I was getting a lot of the same songs in my huge playlist (5000 songs) too when using the app shuffling.  However, since using a script given to me which shuffles and saves the whole list combined with the app shuffle option I don't seem to have this issue anymore.

  • Like 1
  • 1 year later...
Posted
On 27/01/2021 at 19:22, FrostByte said:

I was getting a lot of the same songs in my huge playlist (5000 songs) too when using the app shuffling.  However, since using a script given to me which shuffles and saves the whole list combined with the app shuffle option I don't seem to have this issue anymore.

Are you able to share this script? I'm finding shuffle play on a playlist is really iffy.... always the same songs when I use "shuffle" to start playing on my clients.

invertedknife
Posted

So my use case for the shuffle feature is randomly view home videos. so for the most part i am pressing shuffle and back shuffle and back. and yeah the same videos do keep popping up from aa library of thousands. I am not saying the the random number generator is bad. but how it's initialized and used could be the issue here. Can the developers please look into this? 

 

Thanks! 

visproduction
Posted

Maybe the result lands in a cache and the this is not cleared, prior to the next run of the random function.  Perhaps a simple set variable to 0 inside the function would fix this.  This type of detail could have been just an oversite.  When you run the function and a different media comes up, that may be the end of the QA test and it gets a pass to deploy.  A deeper code issue, like this is easy to miss. Just a guess. 

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...