Logo Lanfrica

maxprodigy/Peter_Johnson_rl_summative

Domain:

education
Creator:
max
Host:
This project applies reinforcement learning to simulate a digital learning journey for young African creatives. # Creative Learning Path - RL Grid Environment Welcome to my Reinforcement Learning project! This repository contains my ALU Machine Learning Techniques II summative assignment, where I designed, trained, and visualized agents navigating a custom grid world. --- ## Demo Video Watch the simulation in action here! --- ## Project Overview This project simulates a digital learning journey for young African creatives. The agent, representing a learner, must navigate a 5x5 grid—making choices to avoid distractions and reach key milestones as efficiently as possible. - **Grid tiles:** Modules, Distractions (obstacles), and a Milestone (goal) - **Agent:** Chooses moves (up, down, left, right), with each step penalized and rewards for reaching milestones quickly --- ## Environment Visualization The grid environment is rendered in real time using OpenGL. Key features: - **🟨 Agent ("Creative")** — shows current agent location - **🟦 Distractions** — obstacles to avoid - **🟩 Modules** — regular learning tiles - **🟥 Milestone** — the goal tile A progress bar at the bottom displays steps and cumulative reward per episode. --- ## Algorithms Used The following RL methods were implemented and compared: - **Deep Q-Network (DQN)** with experience replay and target networks - **Proximal Policy Optimization (PPO)** using Stable-Baselines3 - **Advantage Actor-Critic (A2C)** - **REINFORCE** (custom implementation in PyTorch) Each was trained on the environment to maximize cumulative reward by reaching milestones efficiently. --- ## Results & Insights - **PPO** achieved the best performance, with the highest average reward and fastest convergence. - **DQN** performed well but was more sensitive to hyperparameter tuning. - **A2C** balanced speed and stability, but was less robust than PPO. - **REINFORCE** learned more slowly and showed higher variance, as expected for a pure policy gradient method. Key insights: - Hyperparameter tuning (especially learning rate and exp …