We have neglected to add any decision logic in our multi-armed bandit problem to keep things simple. Now that we have a better grasp of RL and the dilemma of exploration vs. exploitation, we can add the Epsilon-greedy exploration method. Epsilon-greedy exploration is a method whereby an agent's random chance of exploration decreases as the agent explores over time. This allows the agent to explore often early on, but as the agent learns, its chance of a random action decreases. Open the ContextualDecision script in your code editor and follow these steps:
- Add the following using statement to the top of the file:
- Add the epsilon exploration field to the class, with the following declaration: ...