Skip to content

A collection of algorithms used for any-angle pathfinding with visualisations.

Notifications You must be signed in to change notification settings

Mur4ik/Any-Angle-Pathfinding

 
 

Repository files navigation

Any-Angle Pathfinding

A collection of algorithms used for Any-Angle Pathfinding with visualisations.

My Slides explaining Any-Angle Pathfinding and the Algorithms

Slides for Strict Theta* - ICAPS 2016

Wikipedia

Features

  1. Visualisations of the implemented algorithms:

  2. Testing functions that test computed path lengths and running times.

  3. Ability to generate pseudo-random graphs from a seed and graph specifications, as well as load graphs from a file. Refer to the uiandio/GraphImporter.java comments for details on how to create a grid file.

Information

Language: Java 8 Required (uses Eclipse)

Visualisation: Java Swing

Dependencies: JUnit

How to use

The main class is in AnyAnglePathfinding.java.

Setting the choice variable in main() chooses which function of the program is to be run.

  • Visualisation: Generates a visualisation of the algorithm.
  • AlgoTest: Conducts running-time and path-length tests on the algorithms.
  • Experiment: For other tests for the algorithms. (e.g. checking optimality of an algorithm)
  • TestDataGenerator: Generate test data for the /mazedata directory.
  • GridGraphVisualiser: Generates a visualisation of the graph. A handy tool for choosing start and end point coordinates.

In general, the maze to be used is configured in loadMaze(), and the algorithm to be run is configured in setDefaultAlgoFunction(), by setting the choice variable.

  • choice = 0 for loadMaze generates a random maze. The parameters are configured in case 0 of the switch.
  • choice = 1 for loadMaze generates a seeded random maze. The seed can also be configured for seeded random mazes.

Visualisation Controls

The initial view will be the completed path in blue. Step through the frames to view the algorithm's trace. Generally, blue circles are explored nodes, red lines are parent pointers. The start point and goal points are marked with circles.

Left/Right: Move backward/forward one step at a time.

PgUp/PgDown: Move backward/forward multiple steps at a time.

Up/Down: Move backward/forward one step at a time, will not loop around to the first frame from the last frame.

A/D and S/W: Move backward/forward multiple steps at a time, will not loop around to the first frame from the last frame.

O: Moves a step forward and takes a screenshot at the same time.

P: Same as O, but does not loop around to the first frame from the last frame.

L: Same as P, but jumps multiple steps at a time.

About

A collection of algorithms used for any-angle pathfinding with visualisations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 96.9%
  • Python 3.1%