Question: How does the radio work when playing for example "pop" and "electronic"? Why aren't all tracks both "pop" and "electronic", sometimes they're just either or?
Answer: The radio is currently some sort of OR+AND. Tags fetched from last.fm come with a count per artist - an artist can for example be 100% pop and 75% disco.
Let's say artist A is 50% sludge and 70% drone, and artist B is 100% sludge.
if you search for sludge, artist A gets a score of 50, and B gets a score of 100.
if you search for drone, artist A gets a score of 70 and B gets a score of 0.
if you search for sludge and drone, artist A gets a score of 120 and B gets a score of 100.
The scores are then weighted so that for sludge radio, songs by B would appear much more often (but A would appear sometimes). For drone radio, only A would be played. For sludge+drone radio, A appear more often but B will be pretty frequent too.
This is how it works right now: https://gist.github.com/3389980. If you have idea's for a better query I'm all ears! I wrote this in the beginning of the project and haven't touched it since.