Click4Ai

415.

Easy

Epsilon-Greedy Exploration

Example:

In a simple grid world, an agent can move up, down, left, or right. The agent receives a reward of +1 for reaching the goal state. We want to learn the value function using epsilon-greedy exploration.

Constraints:

epsilon = 0.1, gamma = 0.9

Implement epsilon-greedy exploration to select actions.

Test Cases

Test Case 1
Input: [[0.5, 0.3], [0.2, 0.1]]
Expected: 0
Test Case 2
Input: [[0.1, 0.2], [0.3, 0.4]]
Expected: 1
+ 3 hidden test cases