logoalt Hacker News

cooljoseph • today at 3:25 AM • 2 replies • view on HN

It sounds like maybe what you want is to have the "shuffle" mode play songs close to truly randomly while still penalizing songs that have been played too much recently. This gives us an optimization problem:

    minimize KL(π || uniform) - β E_π[times played already],
where β is an inverse temperature determining how much you dislike repetition and π is your policy. Here I've arbitrarily chosen a reverse KL divergence because it leads to a nicer closed form:

    π(song) ∝ exp(-β⋅"times song played already").
I wonder if anyone has implemented this before in a music playlist.

Replies

egypturnash • today at 5:02 AM

Easy version: Make a smart playlist whose criteria are 'last played is not in the last 3 weeks, last skipped is not in the last 3 weeks'. Randomize within that. Possibly add some other conditions like 'genre is not podcast'. I've been having iTunes/Music.app do this for... probably at least a decade, at this point, it doesn't track when you made playlists so this is just guessing.

anvuong • today at 6:36 AM

uhm this is exponential backoff