Intelligent Playlists - further thinking

Well, some time back I planned to write a third part of the "Intelligent Playlist" series about my AI project. However; it would've been about programming and while programming itself is really fun, writing about it is IMAO pretty useless. So, I'd rather have some further thinking about how to further improve the plugin in the future ;)

So, how does the plugin works until now? By starting with an initial set of tracks, it tries to guess some tracks from your local collection that might fit. This "might fit" here is calculated using some parameters you can set freely in the plugin's configuration dialog. Now an interesting question arises: Is this sufficient?

Actually it might. At least my personal testing resulted in sufficient good playlists. However, I also discovered some parts that would need some further work.

Internally, what you can set is which attributes of the tracks to include in the similarity tests and how much each influences the result (i.e. so called weights). Enabling certain attributes is rather a question of taste and/or your collection (i.e. when you don't tend to set the year meta tag of your tracks you can disable it's evaluation in the calculations). The really interesting thing are the weights. Why?

Well, they are currently not easy to set. Not because of a bad GUI but because the result might not be what you expect. The plugin already has two solutions for this problem: First, it has a "background learning mode". By giving regular feedback how you rate its decisions it can alter the weights to better reflect your personal flavor. Second, you can use its "power learning mode", in which you once take a kind of "quiz" and then the plugin calculates initial weights from your answers. So far, so good.

This works so far, however, I think the playlists can even be better. Why? While the described system works, it is based internally on a random mechanism. Indeed, with initial settings what you get is rather a random playlist! However, if you observe your own listening habits, you'll notice that human tend to select tracks in other ways than by picking some random tracks that might somehow fit to a given selection.

You don't know what I mean? Here are some examples:

  • Some people (and I certainly belong to them) tend to drop whole albums to the playlist; and at least I don't want to shuffle the tracks but rather hear them as they were arranged on the album.
  • When selecting tracks e.g. when you sit around with your friends and have a party, you might (again as I) tend to limit the number of artists to a certain amount. This is not by definition but happens "just somehow".

Currently, the plugin is not able to act this way. It acts - as already said - purely non-deterministic. So, what about a bit more determinism in the inference procedure? So a cool idea would be:

  • Analyze the user's behavior, i.e. does he prefer to hear albums in a row or a rather total shuffled mix? Also, it would be possible to use some statistics (i.e. which artists/genres do the user like most?)
  • Use the gathered information to improve the inference algorithm. So e.g. if the user tends to hear at most 5 different artists in a playlist, don't choose artists when this would exceed this limit. When the user likes to hear songs in a row, sometimes generate sequences of songs from one album. Additionally, the plugin could from time to time limit the tracks to choose from to the genres/artists/etc the user likes most.

While using only such deterministic decisions in the algorithm would tend to generate "boring" lists, together with the non-deterministic part it might be really fun. Additionally, this would take away the burden from setting "correct" weights. Of course, more accurate weights improve the playlists further, but a bad decision by the non-deterministic part would (with some luck) be less bad than a pure random algorithm (by chance, the playlist would contain enough songs the user like, so that he gracefully oversees some few wrong decisions).

A further improvement would be to include an additional, logical inference procedure. What does this mean? Well, assume, we already have some tracks in the playlist and now, a further song shall be appended. The current (non-deterministic) procedure selects some random tracks and calculates a similarity value; if that value is great enough, the track will be selected. Now, how could a logical inference procedure work here? Easy, for example we could define "rules" as "For a random track: If the track's album and artist is in the current playlist, select the track. If the track's artist is in the playlist and its rating is at least 3 stars, select it. If ...".

This possibility is another cool addition. However, we must also consider the user, thus the library of rules to use must be configurable by the user. Ideally, these rules are automatically generated by the plugin, or suggested to the user by observing his listening habits.

You see, there are enough possibilities to improve the plugin a bit ;)

=-=-=-=-=
Powered by Blogilo

stefan's picture

>When the user likes to hear

>When the user likes to hear songs in a row, sometimes generate sequences of songs from one album
In fact thats an important point, cause some tracks belong to each other. For example when you want to hear "Boulevard of broken dreams" there has to be "Holiday" played before, otherwise the whole stuff doesn't make sense. Maybe the plugin might register such "inccidents" that some tracks were played always in a row or in a specific order?

RPGBomber2009 BannerRPGBomber2009 Banner

RPGBomber - Ein Bombermanklon mit Rollenspielelementen

  • System: 80%
  • SpielModus: 20%
  • Karteneditor: 90%
martin's picture

Well, I don't hear Greenday,

Well, I don't hear Greenday, so I must guess: Trying to figure out whether there's no pause between tracks (i.e. where one supposes his audio player to use gapless replay to avoid a short "crack" in playback) is rather difficult (at last if I would try to do it from the script). So I guess: No, the plugin will not be able to do this (well, maybe eventually, but not in a nearer future). However, you're right: Recognizing such track sequences and adding them all would heavily improve the resulting playlist.

On the other side, this might also bring some new problems: Especially when you consider concept albums (take "The Whirlwind" from Transatlantic as an example). That album is around 77 minutes and AFAIR there is not a single (!) pause. This would cause the plugin to reserve over an hour of the playlist for one album (when the "worst" case occurs, of course). But the plugin's goal is to create exiting playlists (imagine a party, there, hearing over an hour the same album surely is not what you want).

If you however mean, if the plugin can recognize track "content" (i.e. the lyrics): Yes and no. There are ways e.g. to fetch lyrics (incidentally, Amarok already fetches them and thus the plugin just might reuse them). However, AFAIR recognizing semantic links between two texts is rather difficult. Especially with lyrics. When considering e.g. medical reports this is another thing (these texts tend to use a "standard set" of keywords you can search for). Lyrics, on the other side, often tend to use metaphors and symbols. Recognizing semantic similarity there is IMAO really difficult.

Maybe it would be possible to explicitly mark some tracks as "belonging together" (e.g. via Amarok's custom tagging system). I already use these tags for doing some improved playlist generation. Well, we'll see ;)

Take all of me
The desires that keep burning deep inside
Cast them all away
And help to give me strength to face another day
I am ready
Help me be what I can be

Copyright (c) RPdev 2008 - 2011