GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” GitHub - WannaKhrop/grid-world-learning: Applying Reinforcement Learning for problem with discrete State-Action space using Maze environment

BranchesTags
Open more actions menu

Latest commit

 

History

1 Commit
1 Commit

Folders and files

NameName
Last commit message
Last commit date
graphics
graphics
 
 
src
src
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
main.py
main.py
 
 
poetry.lock
poetry.lock
 
 
pyproject.toml
pyproject.toml
 
 

Repository files navigation

๐Ÿง  Maze Solving with DP, MC, and TD Agents

This project demonstrates and compares three reinforcement learning agents โ€” Dynamic Programming (DP), Monte Carlo (MC), and Temporal Difference (TD) โ€” applied to a custom Maze environment. The agents learn policies to maximize undiscounted rewards and are evaluated using metrics like MSE and convergence plots.


๐ŸŽฏ Project Goals

  • Solve a grid-based Maze using value iteration (Dynamic Programming), Monte Carlo learning, and Temporal Difference learning
  • Compare learned policies and value functions to a DP baseline
  • Evaluate agent performance in terms of:
    • Total rewards
    • Value function error (MSE)
    • Learning convergence across multiple runs

๐Ÿง  Reinforcement Learning with Discrete States and Actions

This project demonstrates the application of Reinforcement Learning in a discrete environment:

  • The Maze is a grid where each cell represents a state
  • The agent can move in discrete directions (up, down, left, right), representing discrete actions
  • Rewards are collected by reaching certain cells
  • Policies map states (cells) to actions (movements) to maximize reward

This setup provides an intuitive and visualizable environment for studying RL algorithms and their learning behavior in structured, discrete domains.


๐Ÿงฉ Implemented Agents

๐Ÿ”ท Dynamic Programming (DP)

  • Computes the optimal policy using full knowledge of the environment
  • Serves as a ground truth baseline

๐Ÿ”ถ Monte Carlo (MC)

  • On-policy agent using learning rate decay
  • Evaluates returns at the end of each episode
  • Supports multiple replicas for convergence analysis

๐Ÿ”ต Temporal Difference (TD)

  • On-policy TD(0) method
  • Learns from incomplete episodes
  • Uses decaying learning rate for stability

๐Ÿ“ˆ Visualizations

The project generates several plots to help understand agent performance and learning dynamics.

๐Ÿงญ Policy & Value Maps

For each agent (DP, MC, TD), the learned policy and value function are visualized as heatmaps or directional fields.

๐Ÿ“Š Episode Reward Trends

Learning progress for MC and TD agents with respect to the amount of episodes.

๐Ÿ“‰ MSE dynamics over episodes


๐Ÿงช Evaluation Metrics

Metric Description
Total Reward Accumulated reward across episodes
MSE Error of estimated value function vs DP baseline
Convergence Stability of episode rewards over multiple runs

Plots are automatically generated and displayed using matplotlib.

About

Applying Reinforcement Learning for problem with discrete State-Action space using Maze environment

Topics

dynamic-programmingmarkov-decision-processesmonte-carlo-simulationq-learning-algorithmreinforcement-learning

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.