I am working on a project that i must traverse a maze using the left-hand rule and based upon the intersections the program comes upon i need to create a node to connect to a graph that I will then determine the shortest path. The goal is for the program to run through the maze then close out the program and read from a file that contains the graph and determines the shortest path to the finish. what i have done is i can traverse the maze using the left-hand rule. what im thinking to do is create a node when i find the intersection and there after every time the program moves i increase the cost of that path by one. on a side note do you need to have an adjacency matrix when use dijkstra's algorithm?
问问题
2105 次