I am playing around with Dijkstra’s Algorithm and have found many sites and code snippets about it and think I would be able to get a grip on it, but I have found no information on how to build the graph itself. Maybe I do not know the correct terms for a google search, but I just cannot find any information on how to build the grpah it self to graph though.
I am making as a learning project, a small c++ Pac-Man game and wish to use this algorithm to control the ghosts that follow pac-man. I have a map (bitmap) and want to place a “node” at each intersection on the maze.
How do I do this? This is the bit I can not understand. How to build the graph itself ?
Is there a visual graph editor maybe? Any advise would be great.
You can think of grids as graphs and search space representations can be shown using graphs:
Block A,B,C,D are nodes of graph and weights between the nodes can represent path distance between nodes.