In an attempt to discover new music, I’ve been using the random ‘radio’ feature of various online music services. I pick an artist or a genre that I like, and let the service suggest tracks that are related to that. Based on that, I’ve been able to infer something about the algorithms that each service uses. Here’s what I’ve worked out so far.
GET chosen_artist_or_genre SET albums = the_3_related_albums_we_have_permission_to_play REPEAT PLAY random_song_from(albums) PLAY random_song_from(albums) PLAY ad_for_kosher_adult_diapers END
GET chosen_artist_or_genre SET songs = songs_approximately_like_song_user_likes SET song = random_song_from_selected_set(songs) REPEAT FOR i FROM 1 TO 3 IF was_last_played_less_than_3_minutes_ago(song) PLAY something_else ELSE PLAY song END END SELECT ad FROM (ad_for_spotify_feature,ad_for_artist_in_totally_unrelated_genre) PLAY ad END
GET chosen_artist_or_genre REPEAT IF random(5) > 0 SET songs = songs_exactly_like_song_user_likes SET song = worst_song_in_selected_set(songs) PLAY song ELSE PLAY random_song_by_conor_obersts_bright_eyes END END