The artist radio and the genre radio are implemented as SQL select statements. They're found here: https://github.com/hakko/musiccabinet/b ... o.java#L92
Or, maybe easier to read: https://gist.github.com/hakko/3389980
It might not be super obvious, but the strategy is to create a list of (n) songs where an individual artist appears at most (m) times. Popular tracks by an artist are favored. Relevant artists are favored. (Based on genre relevance for genre radio, and based on artist similarity for artist radio.) Tracks are favored based on how many times you've listened to them (if this is configured to be imported from last.fm).
The numbers n and m are configurable. Nothing else is configurable (but it could be).
The track ranking is currently random() * (110 - rank + (play_count/3)) where rank is global popularity (1-50) from last.fm and play_count is the number of times you've listened to a track. The artist ranking is currently random() * weight * weight where weight is genre relevancy resp artist similarity, for genre radio resp artist radio.
Higher means more likely to be picked.
There are some problems with this. For example are your local tracks matched against the last.fm top lists exactly (no name fuzziness), so if your tracks are misspelled, they will run a much lower chance of being picked in the radio system.
If you have a lot of artists with genre weight 100, an artist with genre weight 50 will run a very low chance of being picked.
A truly random selection can be achieved by modifying the code above. Or maybe through the advanced search? Or by configuring the genre radio playlist to be much larger (to include more artists into it)? You might also want to turn off the feature of having tracks that you've listened to a lot favored to make it more random.
But in general, the best way to make it fit your needs exactly is to mess with the code and change the algorithm for picking tracks. I just wrote something that I thought would fit me but there's no absolute truth here, everyone will have different ideas on how it should work.