Software Support > DOS/WinCab

Random???

<< < (2/2)

Chris:
The problem is probably that at the beginning all songs have zero plays, so when it tries to pick songs that are more popular it's going to get songs lower in the alphabet because that's how they're sorted. 

The way it works is simple: It picks a random number X between 1 and the number of songs.  If the RandomSongPopularityPreference is higher than zero, it picks another random number X between 1 and the first random number X, and repeats the number of times that the preference is set for.  It then selects the song at position X on a list sorted by the number of times a song has been played.

I probably should simply not use this system until at least a certain number of plays have been recorded.  If the juke has a thousand songs and only 500 plays then at least half the songs are guaranteed to have a play count of 0.  Or maybe just scrap it altogether.

Chris:
Okay, what I'm doing is if the top quarter of all songs don't have more than one play each, I'm not applying the popularity preference.  This should stop the alphabet preference.

wwwombat:
Yep... that explains it.... ta Chris.

Whilst I'm waiting for the next iteration of Wincab I'll just set RandomSongPopularityPreference to 0 then. (Now sucking songs from all of the database (it just pulled a Y artist's song as we type)... yay!)

Chris:
I'm going to post what changes I have over the long weekend, as the next changes I'm making are to the database which will break everything for a while.

Navigation

[0] Message Index

[*] Previous page

Go to full version