Epsilon-Soft Monte Carlo Control learns an optimal policy by alternating between evaluation (averaging returns) and improvement (shifting toward greedy actions with probability 1-ε).
Given a non-stationary policy that is ε-soft (probability ≥ ε/|A| for every action), estimate Q^π(s,a) and improve π by shifting weight toward best actions. Unlike bandits, we must balance exploration (epsilon) with exploitation (greedy).
Implement epsilon_soft_mc_control(env_step, num_episodes, epsilon, gamma) which:
num_episodes episodes where at each state, we take action with probability (1-ε) if best, else uniform random among remainingThe env_step function has signature: env_step(state, action) -> (next_state, reward, done)
No results yet
Run your code to check it against the examples, or submit to run every test.