Original Post
OK, the main purpose of my project has been implementing Reinforcement Learning in Pacman. I have spent all my time and energy, trying to get that right. But now I have to implement pathfinding in order to compare the two techniques'' performances.
I do in general understand, the principles of pathfinding, the graphs, nodes, links etc, and how they are structured. I have already used blind-search (just moving towards pacman without considering the costs) but its not enough. I was thinking of using Breadth-First search. The problem is I have no idea how to implement it in my code. I guess I have to treat each intersection as a node, and the path between intersections as a link. And I know I have to calculate the cost of paths. But the question is HOW to implement it in my code?
Can you PLEASE give me some guidance. Any help would be greatly appreciated.
I am using a 2D integer array for my maze, and I am programming it in Java. Also if you think that breadth-first might not be suitable, please let me know.