Interface RL
access this type via: ml.rl.RL (provides, requires or uses)
A reinforcement learning algorithm. To begin with, setActions must be used to provide a uniquely-identified set of possible actions. Following this, getAction and setReward are called continuously, in a loop, to drive the learning algorithm. The index returned by getAction is an index into the list of actions supplied to setActions, after which the calling entity waits for some amount of time before calling setReward with the reward level observed from the system.
Functions
void setExplorationPenalty(dec penalty)
void setActions(storeString actions[])
int getAction()
void setReward(dec reward, optional int action)
int[] getTopActions(int n)
void setExplorationPenalty(dec penalty)
Set the exploration penalty of the algorithm, to balance the tradeoff of explore/exploit. The default is 1.0, indicating no penalty, with higher values increasing the penalty.
void setActions(storeString actions[])
Set the list of available actions.
int getAction()
Get the next action index requested by the learning algorithm.
void setReward(dec reward, optional int action)
Set the reward gained for taking a given action. If no action parameter is provided, the algorithm assumes that this reward relates to the last action returned by getAction().
int[] getTopActions(int n)
Get the most highly-rewarded n actions.