项目作者: jethronap

项目描述 :
Simple Example of AStar Search & Dijkstra Algorithm Implementation
高级语言: Java
项目地址: git://github.com/jethronap/2DMazePathFinder.git
创建时间: 2019-10-07T23:43:06Z
项目社区:https://github.com/jethronap/2DMazePathFinder

开源协议:

下载


2DMaze

An application that finds the shortest path given a maze, a start point and a goal.
It uses two different algorithmic flavours Dijkstra and AStar Search.

You can use one of the mazes provided in test_data folder. Or try making one yourself.

Note: If invalid filename is given the application exits.

Acceptable maze format:

  1. n_rows = your number of rows
  2. n_cols = your number of cols
  3. 0, O
  4. 1, X
  5. 2, X
  6. 3, O
  7. ...

On the left column is the zero-based numbering of cells and should start from the bottom left corner of your maze and continue upwards.

Whereas on the right the blocked flag. Use O for open X for closed.

See example below to understand how cell numbering is supposed to be.

6 7 8
3 4 5
0 1 2

References:

Dijkstra:

AStar:

Books on Algorithms:

This is a Maven project and can be run as is. Just clean and build and give it a go.