I've been struggling with how to describe what I've been working on succinctly in conversation. I figure I can get about two sentences in before I start getting blank stares and eye rolls. I've been using something like this:
You know how when you put your ipod on shuffle, it magically knows what you want to listen to next? It's a little like that, but completely customizable, and instead of magic it uses a stochastic optimization algorithm.Then they say something like "Hmm", or "Interesting," and then there's a long uncomfortable silence until someone changes the subject. "Can you believe this weather we're having?"
This is Week 2 or so for me, and forgoing things like "sleep" and "food", I've made some significant progress. The core of the bias code is written and more or less works. Random mode in working just dandy and if you're running the nightly or svn of Amarok 2, you can find it under the Playlists tab hiding out at the bottom.
Since the bias code is written and works, this is a good time to talk about my secret plan.
When a I first proposed biased playlists, I described biases as the chance that track has a certain property. Like "30% chance the next track is Jazz". I even made an aesthetically appalling mockup to show what I meant:

The secret is, that I've designed it to be much more general than that. A bias is any function that maps a playlist to a value in [0,1]. The solver will then try to find a playlist where all the biases are at 0.
Blank stares, eye rolls. "Can you believe this weather we're having?"
The point is: biases can do a lot more that what I described previously. Really, they can impose any kind of restriction on the random playlist being generated. For instance, Suggestion Mode, where the next track is from a similar artist as the previous, can be implemented as a bias. If Suggestion Mode is just a bias, it can be combined with other biases.
We could do Suggestion Mode + 30% Metal + 70% pre-1990, and it will do its best to find a playlist that matches fits. It there is no such playlist, it will just give you the best it can come up with.
This also really important because it lets us use fuzzy biases like: "arround 1976", "about 3 minutes", or "hasn't been played in a while".
Presumably, users could script their own biases, doing wacky things so playlists are random but tracks have increasing lengths, follow an obscure integer sequence, or their titles spell out a secret message.
The next few weeks i will mostly be concentrated on tweaking and optimizing the solver and working on an easy way to create biased playlists. There's a lot of work ahead, but I'm very excited with how it's gone so far.
Hands up in the air everyone! Please cheer for Daniel! 
Dynamic playlists are back \o/
Daniel, my Summer of Code student, has been working hard to get one of the most loved features of Amarok 1.4 back for Amarok 2 and probably made a lot of people very happy by doing that last week. He implemented a dynamic mode as basis for the biased playlists he will be working on next. First results can be seen now and it is going to be great. It already improved a lot over what we had in Amarok 1.4 because it is easier to discover, configure and use. And I am sure Daniel will continue to improve it and kick ass
You can read more about it in his status report for this week and of course try it yourself with Neon or your own build. Go read it!
/me is proud and so happy she can listen to music again without having to select songs herself all the time
Monday, June 30. 2008
AH! Some big progresses and decisions have been made this week. So let's take a quick glance at the new Amarok Scripting interface. Here we go!
var Engine;
Engine = Amarok.Engine;
Engine.Stop( true );
Engine.Play();
Engine.Seek ( 60*1000 );
You can run the QtScript code using the script manager. Is the code simple enough for you? Using the code above, you can control the music engine of Amarok. For the current track info, just use AttriVal = Amarok.Engine.TrackInfo.someAttr.
No need to import libs for using any APIs. Besides, you will also be able to use the entire Qt APIs in the near future!
Now, let's add two menu objects under the "Tool" menu:
function Menu1Clicked()
{
print ("hey, I am menu1!");
}
function Menu2Clicked()
{
print ("hey, I am menu2!");
}
Amarok.Window.addSeparator();
Amarok.Window.addMenu( "testMenu1" ); //you are creating a new object here!
Amarok.Window.addMenu( "testMenu2" );
Amarok.Window.Menu.testMenu1.triggered.connect(Menu1Clicked); //then we can play with the new toy

Amarok.Window.Menu.testMenu2.triggered.connect(Menu2Clicked);
Finally, you can control the OSD and the statusbar widget (in the right bottom corner of the main window) using the code below:
var OSD = Amarok.OSD;
OSD.setText( "Hey there!" );
OSD.show();
var StatusBar = Amarok.Window.Statusbar;
StatusBar.shortMessage( "Hey there!" );
Still a young wolf ah? A lot more APIs need to be implemented, like the playlist, collection, services, some GUI control, and networking APIs...
I am really happy as I am growing with Amarok. Let's pray for an another productive week, and wait for more magics pop up!