Skip to content

Latest commit

 

History

History
53 lines (33 loc) · 1.61 KB

README.md

File metadata and controls

53 lines (33 loc) · 1.61 KB

Path Finding Visualization

A simple path finding visualization, demostrating A* and Dijkstra's shortest path algorithms. I wrote this project in my first year of university using javafx 11 and had a lot of fun during the process.

How it works

When the application starts, a random maze (which you can configure in Constants.java) is generated. By selecting a starting point and a finishing point you can choose one of the following algorithims to visualize:

  1. A* with Euclidean distance

A* Visualization

  1. Dijkstra with Priority queues

How to run

Linux and Mac

  1. clone this repository.
git clone https://github.com/itzloop/AStar.git
  1. First install Java 11
  2. Then with gradlew script run the following to initialize the project, get the dependencies and run it.
# Initialize the project
$ ./gradlew init

# Build the project
$ ./gradlew build

# Run the project
$ ./gradlew run
  1. Enjoy

Windows

For windows the steps are the same. Only run the gradlew.bat script instead of gradlew

Configuration

You can configure following asspects of the project by changing the corresponding value in the Constants.java file.

  • How many obstacles are generated by changing Constants.ObstacleRatio.
  • The size of the maze by changing Constants.NodeDistance and Constants.Radius.
  • Some color options.
  • How fast the visualization progresses by changing Constants.SleepDelay.