Sunday, June 24, 2012

A* search

I took this class called Introduction to AI, and the professor gave an assignment to write an A* hueristic program to find the shortest path between the cities. The shortest path heuristic was based on the euclidean distance or alternatively 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 the optimal, but it works in reasonable time. Below is the video describing one of the sample run.






Sample locations input file

Sample Connections input  file

Main function

Node.java

Reader.java

No comments:

Post a Comment