An interactive learning platform designed to demystify Reinforcement Learning through visual explanations and hands-on exploration. The project focuses on a dynamic visualization that allows the user to control the learning process and understand how the Q-learning algorithm works in real-time.
"Reinforcement Learning Unveiled" was created to make Reinforcement Learning (RL) concepts more accessible. The tool guides the user through a progressive learning journey, from theoretical foundations to a practical and interactive application.
The main goal is to combine visual explanations with a hands-on approach, allowing anyone to manipulate the components of an RL algorithm and observe the consequences of their choices in real-time.
The system is divided into three main modules:
The heart of the project is a control panel that allows the user to freely experiment with an agent (styled as Pac-Man) in a Grid World environment.
By clicking on a specific cell, the view changes to a detailed analysis of that state:
The project implements the Q-learning algorithm, which learns an action-value function, Q(s, a)
, that estimates the total expected reward for taking action a
in state s
. The values are updated using the Bellman equation:
Q(s, a) ← Q(s, a) + α * [r + γ * max_a' Q(s', a') - Q(s, a)]
To balance the discovery of new strategies with the use of acquired knowledge, the agent uses an ε-greedy policy. With a probability of ε
, it explores a random action; otherwise, it exploits the best-known action. The value of ε
decays over time to favor exploitation as the agent becomes more experienced.
This project was developed as the final work for the Data Visualization course at Fundação Getulio Vargas (FGV). The work aimed to apply visualization techniques to explain complex machine learning concepts and create an interactive interface for algorithm exploration.
Future improvements could include:
This project is released under the MIT License. You are free to use, modify, and distribute it, provided proper credit is given to the original authors.