Sunday, June 24, 2012

A* search

I took this class called Introduction to AI, and the professor gave me the assignment to write an A* heuristic program to find the shortest path between the cities. The shortest path heuristic was based on the Euclidean distance or alternatively the total number of links. The program needed to be shown on a graphical interface. I wrote this taking some time, going through all sorts of implementation issues. I assume my solution to be not optimal, but it works in a reasonable time. Below is the video describing one of the sample runs.






Sample locations input file

Sample Connections input  file

Main function

Node.java

Reader.java

No comments:

Post a Comment