Where is the food? Reinforcement Learning in a Maze World

Nuria Oliver — MIT Media Lab

Overview

This project implements and compares several reinforcement learning algorithms in a maze-world domain. An agent navigates a configurable grid maze from a starting position to a goal, receiving a reward upon reaching the goal. The task is to learn an optimal policy over time through trial and error. The system is built as an interactive application in which the user can design the maze, set learning parameters, and compare algorithm performance.

The two key assumptions of the implemented algorithms are a stationary environment (fixed transition probabilities and rewards) and an enumerable state space. The maze world satisfies both, while remaining complex enough to meaningfully differentiate algorithm performance.

Algorithms Implemented

Action Selection Policies

Results and Conclusions

Action selection policy: Pure greedy selection has a significant risk of converging to a suboptimal path. All other policies reliably find the optimal path, differing mainly in the number of trials and backups required. The system generalizes well to different starting points and maze configurations under all strategies.

Learning strategy: Dyna architectures learn the optimal policy much faster than pure Q-learning because each real experience generates k additional hypothetical updates. The trade-off is a substantially higher computational load. DynaQ+ further handles environmental changes, at the cost of additional memory to track state-action recency.

Learning parameters: Higher learning rates and larger values of k accelerate convergence but increase the number of backups required. A convergence criterion based on the Bellman residual provides an effective stopping rule.

System

The user interface is implemented in Tcl/Tk. The user can interactively design the maze (wall positions, start, and goal), choose the action selection policy, set learning parameters, and enable real-time visualization of the learned paths and learning curves. All learning algorithms are implemented in C++.