Skip to content

🧨 Interactive temporal difference algorithm simulator in which agent has to find the optimal path to reach certain destination.

Notifications You must be signed in to change notification settings

mweglowski/pathfinding_simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pathfinding Simulation Project

This project implements a grid-based pathfinding simulator using Q-learning, an algorithm from reinforcement learning. The simulator provides an interactive UI built with React and styled using Tailwind CSS, allowing users to train and observe an agent as it learns to navigate a map.

Built With

  • React - A JavaScript library for building user interfaces.
  • Tailwind CSS - A utility-first CSS framework for rapid UI development.

Quickstart

First, make sure you have Node.js installed to manage the project's dependencies.

To get started, clone the project and install its dependencies:

git clone https://github.com/mweglowski/pathfinding_simulator.git
cd pathfinding_simulator
npm install

To run the application in development mode:

npm start

This will open the simulator in your default web browser. For production builds, you can use:

npm run build

Features

  • Interactive grid-based simulation environment.
  • Real-time training and visualization of the Q-learning agent's decisions.
  • Customizable simulation parameters, such as the number of episodes, steps per episode, step size, discount factor, and exploration rate (epsilon).
  • Ability to reset and reconfigure the simulation environment.

Reinforcement Learning Strategies

The simulator employs the Q-learning algorithm, which involves an agent that learns to navigate from a starting point to a terminal position on a grid while avoiding obstacles. Here's how it works:

  • Episodes and Steps: You can set the number of episodes and steps per episode to train the agent.
  • Q-Values Update: After each action, the agent updates its Q-values based on the reward received and the maximum future reward.
  • Epsilon-Greedy Strategy: The agent follows an epsilon-greedy strategy, where it selects a random action with probability epsilon and the best-known action otherwise.

Usage

After launching the simulator, you can interact with the UI by selecting different actions for training the agent, observing the agent's progress, and adjusting training parameters. You can start or reset the training and visualize the agent's learned values on the grid.

Preview

Mobile Preview Mobile Preview Mobile Preview Mobile Preview Mobile Preview Mobile Preview

Website

Explore the simulator online at https://pathfinding-simulator.vercel.app/.

Contributing

Contributions are welcome! If you have suggestions or improvements, please fork the repository, make changes, and submit a pull request.


Inspired by the foundational reinforcement learning work of Sutton and Barto.

About

🧨 Interactive temporal difference algorithm simulator in which agent has to find the optimal path to reach certain destination.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published