Back to projects

AI / Reinforcement learning

Learning a way across.

Comparing a Q-table and a deep Q-network in the FrozenLake environment.

Reinforcement-learning studyLearning experiment
Conceptual reinforcement-learning grid illustration with an example route.
Conceptual reinforcement-learning grid illustration with an example route.

01 / The challenge

The question behind the system.

Understand how exploration, reward design and value representation affect learned behaviour.

An educational exploration of how an agent learns from rewards. Two approaches solve the same grid-world task: tabular Q-learning stores state/action values directly, while a PyTorch neural network approximates them.

02 / The approach

From architecture to implementation.

  1. 01

    Compare tabular Q-learning with a neural deep Q-network in the same environment.

  2. 02

    Use reward shaping and an exploration schedule; add replay memory and a target network for the DQN.

  3. 03

    Track training rewards and exploration, then visualise evaluation results.

03 / Outcomes

What the work shows.

  • The repository includes training and evaluation code, saved model artefacts and plots for both learning approaches.

04 / Scope & next steps

Where the work stands.

  • Results concern the FrozenLake learning environment and do not establish performance on a physical autonomous system.

The baseline is sourced from johnnycode8/gym_solutions. The other learning scripts adapt that work with modified rewards, validation and visualisation; attribution is preserved in the repository.

Start a conversation

A system to build.
A problem to solve.