shai-raz / AStar-GreedyBestFirstSearch-Pathfinder-with-GUI

A GUI app that allows you to draw a map and apply A* and Greedy Best First Search algorithms on it, while visualizing the path finding process

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AStar GreedyBestFirstSearch Pathfinder with GUI

This was part of a college assignment where we implemented AStar and GreedyBestFirstSearch algorithms.

This is the program looks like with a grid drawn in it:

image

Tiles

There are 5 different tiles that can be used:

  1. Start tile - Green
  2. End tile - Red
  3. Water tile (acts like a wall) - Blue
  4. Fast road tile (costs 1 to travel through) - Yellow
  5. Slow road tile (costs 4 to travel through) - Orange

You can switch between the different tiles by clicking/dragging across the grid.

There can only be 1 start tile and 1 end tile.

Menu Options:

  • Load - Loads a saved grid (from "input.txt").
  • Save - Saves the currently displayed grid and its algorithm (into "input.txt").
  • Reset - Resets the board, changing all the tiles to Fast road tiles (yellow).
  • Algorithm - A drop down menu that allows you to choose what algorithm you want to use (default is A*).
  • Run - Runs the selected algorithm, and draws the path):

image

Usage Demo:

demo

About

A GUI app that allows you to draw a map and apply A* and Greedy Best First Search algorithms on it, while visualizing the path finding process


Languages

Language:Python 100.0%