A* Maze Navigator

A* Maze NavigatorThis Java applications let you play around with an Agent that uses simpe artificial intelligence to help him navigate through a somewhat complicated tiled-based map. The AI that the Agent used for pathfinding is an A* search algorithm. You can think of the whole map as a huge search tree with each map tile as a node in the tree. An A* search is an informed search algorithm that utilizes a cost function and a heuristic function to determine which node to be considered next in order to expand the search tree towards the goal. Cost function of Node N calculates the actual cost of path from the starting node to Node N. Whereas the heuristic function of node N will return the estimated cost from node N to the goal. A* search algorithm is a complete and yet optimally efficient search algorithm. Meaning that, given there are finite number of nodes in the search tree, it will always returns an optimal solution (either a shortest cost path, or no solution if the goal is not exist or unreachable) with the minimum nodes expansion. With this properties, it makes a perfect solution for applications that required automated pathfinding on a big domain.

How to run the program:

  1. Download the Java archive of the application here.
  2. You need to have Java Runtime version 1.3 or above installed on your PC.
  3. Double click on the Java archive path_finder.jar that you have downloaded.
  4. If it fails to run, you need to execute it in Command Prompt / Console. Go to the directory where your download is saved. Type java -jar path_finder.jar

Instructions:

  1. Green areas are trek-able path, brown areas are obstacles, grey areas are preferred path.
  2. Left click on any trek-able areas to move the Agent. The Agent will complain if the designated position is unreachable.
  3. SHIFT + Left Click: to place or remove an obstacle on the path.
  4. SHIFT + Double Left Click: to clear all obstacles in the map.
  5. SHIFT + Triple Left Click: to placed the specified percentage of obstacles randomly on the map.
  6. CTRL + Left Click: to place or remove a preferred path.

This program let you experiment with the following:

  • The pattern of A* search in a pathfinding application.
Write a comment