Weighted Shuffle

Hi.

I’ve recently been using w2g with a friend to listen to music on shuffle.
However we’ve both been noticing A LOT of repetition, enough to question wether it truly is shuffling correctly.
But assuming the shuffle is working as intented, I wanted to suggest a weighted shuffle option.

For example:
Give each song in the playlist a weight of 10.
The chance of a song coming up is it’s weight/total playlist weight.
Each time one song is not played add +1 to it’s weight (To a maximum of 20. To keep a limit).
When a song is played halve the weight (rounded down).

This should result in a good shuffle where recently or often played songs are less likely to come up for a bit.

Thanks a lot for your input! Watch2Gether already implements a similar algorithm. However, the information about which items have already been played are storred locally in each client. Whenever a client reloads these information are lost and you will therefore see repetition. This is not optimal but changing it will require some backend work and im not sure where to put it on the todo list :slight_smile:

Having said that: I fixed another bug today which should improve the shuffle function by keeping the “already played” list in better sync. Please let me know if that changes something for you!