public class GenericExplorer<T> extends Object implements Explorer<T>, ConsumeScorer<T>
| Constructor and Description |
|---|
GenericExplorer(Scorer<T> defaultScorer,
int numActions)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
DecisionTuple |
chooseAction(long saltedSeed,
T context)
Determines the action to take and the probability with which it was chosen, for a
given context.
|
void |
enableExplore(boolean explore) |
protected int |
getNumActions(T context) |
void |
updateScorer(Scorer<T> newScorer) |
protected int getNumActions(T context)
public void updateScorer(Scorer<T> newScorer)
updateScorer in interface ConsumeScorer<T>public DecisionTuple chooseAction(long saltedSeed, T context)
ExplorerchooseAction in interface Explorer<T>saltedSeed - A PRG seed based on a unique id information provided by the usercontext - A user-defined context for the decisionpublic void enableExplore(boolean explore)
enableExplore in interface Explorer<T>Copyright © 2016. All Rights Reserved.