single

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: Dijkstra’s algorithm and Bellman-Ford’s 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#All- pairs_shortest_paths

Upload: richard-mcdaniel

Post on 04-Jan-2016

213 views

Category:

Documents


1 download

DESCRIPTION

single source algorithm

TRANSCRIPT

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: Dijkstra’s algorithm and Bellman-Ford’s 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#All-pairs_shortest_paths