Software Design
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreSoftware Design

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 28th, 2002, 11:45 AM
bcortesi bcortesi is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 2 bcortesi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Best song algorithm

Hello to all,

I need an advise on how to do that :

I am building a sort of jukebox program, with a songs database, that will play songs requested by users. When there are no requests, the jukebox plays songs randomly. Well not completely randomly, as I wish it could be smart and picks more often the songs users love and less often the songs they dont like.

My database contains the table T_Songs with these fields :
[Song_Name]
[Date_last_played]
[Date_last_requested]
[Date_last_skipped]
[Times_played] //number of times that the song as been played
[Times_requested] //number of user requests (users like it)
[Times_skipped] //number of times the song as been skipped (users dont like it)

Which algorithm should a write to sort this database and find the bests songs to play right now ?

Thanks in advance for your help
Bernard Cortesi
Comments on this post
JimmyGosling agrees!

Reply With Quote
  #2  
Old April 30th, 2002, 11:54 PM
The Ostrich The Ostrich is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Location: Oxford, UK
Posts: 31 The Ostrich User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
What you want is a Markov model to tell you what song to play next, and some additional weighting which reflects how much each person likes that song.
Comments on this post
JimmyGosling agrees!

Reply With Quote
  #3  
Old May 1st, 2002, 11:01 AM
csaba csaba is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: NYC
Posts: 79 csaba User rank is Private First Class (20 - 50 Reputation Level)csaba User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
I didn't think this through thoroughly, but my first reaction is to say that you have to make some kind of decision about how important the characteristics are that you mentioned - the problem is arbitrary without that.

My first approach would be: for each song, add one to the number of times it has been played (so each song gets representation). I'll ignore the number of times requested, since presumably songs that have been played a large number of times got that way because they were most often requested. That is to say, the non request contribution, per song, I would expect to be small. Now I would scale this number down by the percent of times the song was skipped. E.g. Played 99 times, skipped 10 times => (1+99)*(99-10)/99 (or something similar).
So now I would pick one of the songs at random, in relative proportion to this number just computed.

Csaba Gabor
Comments on this post
JimmyGosling agrees!

Reply With Quote
  #4  
Old May 1st, 2002, 04:44 PM
bcortesi bcortesi is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 2 bcortesi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Ostrich, I've looked to web for this Markov model, and damn, examples that I've found deal with speech recognition or genetical studies...
I'm not going to implement such a mamoth algorithm for the simple thing I need.
But thanks anyway for the idea.

The post from Csaba Gabor seems very interresting, I've implemented the algorithm you've talked about and finally got something that is close to what i needed. Thanks for the hint.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreSoftware Design > Best song algorithm


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT