Build Your Own Arcade Controls Forum

Software Support => DOS/WinCab => Topic started by: mosesmalone on January 18, 2007, 01:43:29 am

Title: Random???
Post by: mosesmalone on January 18, 2007, 01:43:29 am
I've got the latest version of WinCab and it's working really well.

EXCEPT - when I choose Radio mode, it doesn't really seem all that random. I've got the RandomSongPopularityPreference at 0, but most of the songs it plays are from artists starting with the letters A B and C.

Weird huh...

...any ideas?


Title: Re: Random???
Post by: dibb1er on January 18, 2007, 04:30:29 am
ive noticed that too, but just thought it was just the songs i had...
Title: Re: Random???
Post by: Chris on January 19, 2007, 03:49:52 pm
Is this something that's started recently?
Title: Re: Random???
Post by: mosesmalone on January 19, 2007, 07:11:39 pm
Nah, it's been like that from the get-go for me.
Title: Re: Random???
Post by: wwwombat on November 11, 2007, 08:25:44 pm
I know this is an old topic but I've just finished assembling a song databases of some 4,128 songs (yeah, I know, but it's a list of (what I believe to be) the best songs of every artist I possess.

I'd like to re-add some weight to this topic... upon loading wincab and pressing the R (for Radio mode) and letting it run through the day, I'd estimate 90%+ of the songs selected seem to be from the # (numeric like 10CC) A, B or C artists. Only rarely did it stray from that grouping.

So one wonders how random is random? i.e. what process is used to generate the next song to be played (rand() * 4128?) or is there some-self imposed upper limit as who would be "stupid" enough to load this many songs onto it?
Title: Re: Random???
Post by: Chris on November 13, 2007, 10:00:50 pm
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.
Title: Re: Random???
Post by: Chris on November 14, 2007, 12:13:29 am
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.
Title: Re: Random???
Post by: wwwombat on November 15, 2007, 01:01:57 am
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!)
Title: Re: Random???
Post by: Chris on November 21, 2007, 08:53:03 pm
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.