Machine Learning / case study
Reinforcement Learning Experiment Framework
This project studies the empirical behaviour of tabular Q-learning on randomly generated Markov Decision Processes.
- Python
- NumPy
- Matplotlib
- 500
- episodes per learning curve
- average reward, per exploration rate
- 3
- epsilon-greedy rates compared
- 0.05, 0.1 and 0.3
- 0.1
- exploration rate that converged highest
- around 27 average reward, above 0.05 and 0.3
Reinforcement learning algorithms often converge unstably or suboptimally depending on the environment. Rather than tune one benchmark task, this framework generates random MDPs, learns on them with tabular Q-learning, and plots average reward per episode so exploration settings can be compared across environments.

Components
- Random MDP generator with configurable state and action counts.
- Tabular Q-learning implementation.
- Experiment runner across randomly generated environments.
- Learning-curve and reward-trajectory visualization with NumPy and Matplotlib.
Experiment
Exploration rates of 0.05, 0.1 and 0.3 were compared across randomly generated MDPs, plotting average reward over 500 episodes for each setting. Each curve is the average across multiple random environments, which is why the middle setting wins: too little exploration misses the good path, too much keeps discarding it.
Running it
Commands
pip install -r requirements.txt
python experiments.py
python plot_results.py