agentland.device.intelliCD
Class  QuickBrain
java.lang.Object
  |
  +--agentland.device.intelliCD.QuickBrain
- public class QuickBrain
- extends Object
  
 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
MAX_CHANGE_STEP
public int MAX_CHANGE_STEP
QuickBrain
public QuickBrain(String name,
                  ManagedConnection cnxn)
setAdventureCoef
public int setAdventureCoef(int ac)
registerCollection
public void registerCollection(SCollection coll)
makeDecisionVector
protected double[] makeDecisionVector()
- Returns an array, each bin corrisponding to the song in that
 corrisponding spot in songs Vector, with the desirability of
 each song.
 
songWeight
protected double songWeight(int s)
- when building a decision vector, use this method to decide how
 to weight contribution from each of the past songs...
- Parameters:
 s - How many songs back we are going for this weight
 
 
songPlayedNotify
public void songPlayedNotify(Song s)
chooseFirstSong
public Song chooseFirstSong()
getNextSong
public Song getNextSong()
- Returns the next song to be played. If you didn't explicitly
call any method to indicate how the user reacted to the previous song,
this method will call neutralReaction on the last song
 
getCurrentSong
public Song getCurrentSong()
negativeReaction
public void negativeReaction()
- Store reaction for _later_ computation
 
neutralReaction
public void neutralReaction()
- Store reaction for _later_ computation
 
positiveReaction
public void positiveReaction()
- Store reaction for _later_ computation
 
computeReactions
public void computeReactions()
- compute the overall reaction, update the brain, and reset the
 relevant flags.
 
getRepeatWait
public int getRepeatWait()
setRepeatWait
public int setRepeatWait(int n)
getBestNext
public Vector getBestNext(int n,
                          int reaction)
recentlyPlayed
protected boolean recentlyPlayed(Song id,
                                 int n)
- Returns:
 - true if song with index index was one of the n last
    songs played
 
 
toHTML
public String toHTML()
showHistory
public void showHistory()
saveSongs
public void saveSongs()
showScores
public void showScores(String column)