Catalano.MachineLearning.Exploration
Class EpsilonGreedyExploration
- java.lang.Object
-
- Catalano.MachineLearning.Exploration.EpsilonGreedyExploration
-
- All Implemented Interfaces:
- IExplorationPolicy
public class EpsilonGreedyExploration extends java.lang.Object implements IExplorationPolicy
The class implements epsilon greedy exploration policy. Acording to the policy, the best action is chosen with probability 1-epsilon. Otherwise, with probability epsilon, any other action, except the best one, is chosen randomly. According to the policy, the epsilon value is known also as exploration rate.
-
-
Constructor Summary
Constructors Constructor and Description EpsilonGreedyExploration(double epsilon)Initializes a new instance of the EpsilonGreedyExploration class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intChooseAction(double[] actionEstimates)The method chooses an action depending on the provided estimates.doublegetEpsilon()Get Episilon value.voidsetEpsilon(double epsilon)The value determines the amount of exploration driven by the policy.
-
-
-
Constructor Detail
-
EpsilonGreedyExploration
public EpsilonGreedyExploration(double epsilon)
Initializes a new instance of the EpsilonGreedyExploration class.- Parameters:
epsilon- Epsilon value (exploration rate).
-
-
Method Detail
-
getEpsilon
public double getEpsilon()
Get Episilon value.- Returns:
- Return Epsilon value.
-
setEpsilon
public void setEpsilon(double epsilon)
The value determines the amount of exploration driven by the policy. If the value is high, then the policy drives more to exploration - choosing random action, which excludes the best one. If the value is low, then the policy is more greedy - choosing the beat so far action.- Parameters:
epsilon- Epsilon value (exploration rate), [0, 1].
-
ChooseAction
public int ChooseAction(double[] actionEstimates)
The method chooses an action depending on the provided estimates. The estimates can be any sort of estimate, which values usefulness of the action (expected summary reward, discounted reward, etc).- Specified by:
ChooseActionin interfaceIExplorationPolicy- Parameters:
actionEstimates- Action Estimates.- Returns:
- Return Selected actions.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG