Saturday 28 October 2017

3.2 Pathfinding Concepts - Dijkstra Algorithm


Pathfinding Concepts - Dijkstra Algorithm

Dijkstra algorithm works in a similar way to the A* algorithm (2.1 Pathfinding Concepts - A* Algorithm) as its main obligation as an algorithm it to find its way to a goal in the shortest most cost effective way possible. Dijkstra works by moving vertically as it is was laid out on a graph, the starting point will be set and then the algorithm, would constantly examine the next move by choosing the closing not yet examined vertical move. Dijkstra's algorithm is a greedy algorithm meaning that it will always choose the thing that seems to best right now and without regard for how it may impact future choices.

"In Dijkstra's algorithm you search all the verticies in the graph to determine the lowest cost route between each point. A* is a modification of Dijkstra's algorithm that uses a heuristic to determine which vertices to search."[7] 

Now Dennis pursues an interesting statement that links to Robin's words that'll find in reference (6) in (3.1 Pathfinding Concepts - A* Algorithm), A* is a mixture of both features of search, cost and heuristic. Dennis goes to say that A* is mainly built of of heuristic features, I disagreed with Robin in respect that I felt that cost search was the A* main priority.

I feel that out of the two algorithms, there is one more to mention. Breadth-first search algorithm which uses two values to each vertex, value one is the distance which calculates the number of edges along the path from A to B. And the predecessor vertex which calculates the shortest path from point A to point B. The difference between the Dijkstra algorithm and BFS (Breadth-first search) is that Dijksra does not need to know the target node to start its path, it is a uninformed algorithm.

No comments:

Post a Comment

Introduction to: NWC603COM – Using AI in Computer Games Assignment 1

Introduction to: NWC603COM – Using AI in Computer Games Assignment 1 Artificial intelligence (AI) in the gaming world today has become ...