Você está na página 1de 1

Single-sources shortest path algorithms such as A* (A star) are used as

path finding algorithms in video games. For example, a 2D level can


be modeled using a weighted graph. Each vertex of the graph
corresponds to a point of interest within the game world. The edges
represent the distance between points of interest. With this model in
place finding an optimal path for one point of interest to another, for a
NPC (non player character), is simply an application of a shortest path
algorithm. Other algorithms used in path finding include: Dijkstras
algorithm and Bellman-Fords algorithm.
Source: http://en.wikipedia.org/wiki/Pathfinding
The all pairs shortest path algorithm can be used to find optimal
solutions to puzzle problems. If we model a puzzle using a graph were
vertices represent states of the puzzle and edges represent possible
transitions between states, the all pairs shortest path algorithms can
be used to find all optimal move sequences from an initial state to all
other possible puzzle states. More importantly if can be used to find
optimal solutions to the puzzle.
Source: http://en.wikipedia.org/wiki/Shortest_path_problem#Allpairs_shortest_paths

Você também pode gostar