demo program: Amarok Constraint Tree (for dynamic playlists)
Daniel Jones
danielcjones at gmail.com
Fri Aug 29 02:14:48 UTC 2008
Awesome work Soren. You've sure been busy.
First of all, I really like the idea of building up more complicated
matches with OR and AND. My original plan called for accomplishing
this by implementing smart playlists separately and letting bias
reference them. Needless to say, I never got around to smart
playlists.
You're approach is smart, and it seems like it will work, but I do
have a couple questions:
My main concern in integrating this into the existing bias editor. We
could turn the whole thing into a tree view, but I like the inline
editing widgets. What are your thoughts on this?
With regard to smart playlists: Is there still a need for them? This
won't work exactly like they did, but maybe we don't need it to.
I'm also worried about your Constraint::compare function. I think I
talked a little about this earlier, but since the solver always tries
to produce a playlist with 0 energy, I think this may degrade into a
exact comparison, rather than a fuzzy comparison. Assume we have an
infinitely good solver (I don't think we should assume otherwise,
since how well it works tends to vary a lot), then won't it always
produce a playlist where the values match exactly? Can you convince me
otherwise?
Then, just sort of thinking out loud here, since using "match any"
takes the max of the child constraints, it seems possible that there
will be cases where the solver will always be working on one branch of
tree.
For example, say you have "length < 3 OR length > 4", and a majority
of you collection has length < 3. Your initial random playlist will
(probably) have more tracks that match "length < 3". Then the solver
tries to mutate the playlist to bring down the energy. But adding a
"length > 4" track won't bring down the energy because it has to
overcome the "length < 3" tracks. So "length > 4" will essentially be
ignored.
I haven't completely thought that out, but seems like a potential issue.
Anyway, killer work. Its good to having you working on amarok.
~Daniel
More information about the Amarok
mailing list