How shashkat/maze-solver-with-reinforcement-learning works
Project type and purpose
• It reads predefined grids and position lists from CSV files, runs a Q-learning loop, updates a Q-table, and hands off results to an R script for plotting.
File structure
• Top-level files:
• grid.csv, all_positions.csv – input data defining the maze layout and valid states
• functions.py – helper routines for state transitions, rewards, Q-table updates
• q_learning.py – main driver: loads data, sets hyperparameters, runs training loops, saves intermediate snapshots
• plot_images.R – reads the CSV snapshots, uses tidyverse/gganimate to build GIFs in the images/ folder
• images/ – output folder for generated GIFs
• plot_images.R, LICENSE, README.md – ancillary documentation/config
README for additional insights
• Key hyperparameters (num_episodes, gamma, epsilon, episodes_and_next_10_to_plot) are configured in q_learning.py.
• Dependencies: Python (numpy, pandas, random, tqdm) and R (tidyverse, ggplot2, reshape2, glue, gganimate).
• No external services—fully local.
• Inputs (e.g., light blue rectangles)
• Processing modules (e.g., green)
• Outputs (e.g., orange)