Q-Learning on FrozenLake from Scratch

How it was built

Part 1: Q-Table Setup

Initialize the tabular value store and basic lookups over states and actions.

Part 2: Epsilon-Greedy Action Selection

Implement exploration vs exploitation using random sampling and epsilon decay.

Part 3: Q-Learning Update Rule

Compute TD targets, errors, and apply the Q-learning update to table entries.

Part 4: Training Loop

Combine action selection, environment stepping, and updates into episodes and full training runs.

Part 5: Policy Extraction and Evaluation

Derive a greedy policy from the trained Q-table and measure its success rate on FrozenLake.