edu.indiana.iucbrf.ccbr.conversationblock.selector
Class RandomConversationBlockSelector
java.lang.Object
edu.indiana.iucbrf.ccbr.conversationblock.selector.AbstractConversationBlockSelector
edu.indiana.iucbrf.ccbr.conversationblock.selector.RandomConversationBlockSelector
- All Implemented Interfaces:
- ConversationBlockSelector, SwingRepresentableWithDomain, EnsembleMember, SwingRepresentable, java.io.Serializable
public class RandomConversationBlockSelector
- extends AbstractConversationBlockSelector
- implements EnsembleMember
Randomly chooses a feature to question next.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
allKeys
protected java.util.ArrayList allKeys
unknownFeatureKeys
protected java.util.LinkedList unknownFeatureKeys
RandomConversationBlockSelector
public RandomConversationBlockSelector(CCBRDomain domain)
- Creates a new instance of RandomConversationBlockSelector
getNextFeatureKeyImpl
protected FeatureKey getNextFeatureKeyImpl(Problem problemSoFar,
RetrievalResults casesUnderConsideration,
CCBRDomain domain)
- Specified by:
getNextFeatureKeyImpl
in class AbstractConversationBlockSelector
reset
public void reset()
- Reset the state of the conversation block selector, to prepare for a new conversation.
For some conversation block selectors, this may be a dummy operation.
- Specified by:
reset
in interface ConversationBlockSelector
initConversationImpl
protected void initConversationImpl(Problem initialProblem)
- Specified by:
initConversationImpl
in class AbstractConversationBlockSelector
toSwing
public javax.swing.JComponent toSwing(Domain domain)
- Specified by:
toSwing
in interface SwingRepresentableWithDomain
toSwing
public javax.swing.JComponent toSwing(int detailLevel)
- Detail level may be ignored by implementations.
If used, the standard is for detailLevel 0 to be least detail, with higher values growing more detailed.
0 is least detail, higher numbers are more
- Specified by:
toSwing
in interface SwingRepresentable
makeSuggestions
public SuggestionSet makeSuggestions(java.lang.Object[] args,
double totalStrength)
- By default, a conversation block selector as an ensemble member gives all
its strength to its single greatest suggestion.
- Specified by:
makeSuggestions
in interface EnsembleMember
- Parameters:
args
- The arguments take the following form:
args[0] is Problem problemSoFar
args[1] is RetrievalResults casesUnderConsideration
args[2] is CCBRDomain domaintotalStrength
- The total amount of strength that this ensemble member
may divide among its suggestions. The simplest case has each ensemble member
with totalStrength = 1.0, giving all its strength to its single strongest
suggestion.
decisionMade
public void decisionMade(java.lang.Object decision)
- The decision indicates the key chosen by the ensemble, so don't consider
that key again.
- Specified by:
decisionMade
in interface EnsembleMember