Troposphere (sic) Fliers By: Brantlee and Cliford
Introduction Create an system that can be overlaid to a map such that it can find a route between two points in a n x n grid. This can be useful for drones flights as there are no fly zones or large obstacles that can interfere with the optimal path. Therefore a route needs to found to make it to the destination.
Node Overlay
Informal Problem Using a directed graph find the path from any vertex A to any vertex B. Meaning go from one point to another.
Formal Problem Given a directed Graph G(V) such that: V = set of vertices E = Set of edges which are the neighboring nodes e = edge(u,v) c = current nodevertex N = set of Vertex neighbors n = next Nodevertex s = start nodevertex f = end nodevertex Solution to find a path: Path is equal to the sequenceP = pn = {vs, v{e(0,0), e(0,1).. e(n,n)}vf} Graph size is equal to the set of vertices. The route is equal the sequence of starting vertex along the set of neighbors of the vertex until you reach the ending vertex.
Algorithms Used Breadth First Search A* algorithm
Breadth First Search Time Complexity: O(|V|+|E|) as every vertex and edge can be explored Space Complexity: O(|V|+|E|) dependent on implementation For this case the edges being up to six will be stored into an array. It’s a greedy best-first search. It uses a queuing system Checks whether a vertex has been discovered before enqueueing.
A* algorithm F(n) = G(n) + H(n) F = total cost G = length from start H = length to end H value is the only value that remains a constant throughout. The G value is being updated based on the path taken to get to a particular cell.
A* Algorithm Cont.
What Not To Do Prime example of how not updating the cells properly can lead to..... not so desirable results. Thinking I've got it.... ….Thanks Clif!
A* In Action Using correct heuristics and updating the F cost in the cell and the G cost correctly. A* is finally able to find the quickest path between the green start cell and the red end cell
We believe the spikes are the No Soultion events Time Complexity A* Shows O(N log N) What are those spikes? We believe the spikes are the No Soultion events
Time Complexity What are those spikes? BFS Shows O(N^3) Because BFS already traverses all the nodes in its worst case scenario it isn't affected like A* when no solution is found. N is equal to the number of vertices. As the number of vertices increased the longer it takes the algorithm to find the path.
Questions Are there practical uses for using BFS? Yes, can be used in peer to peer networks and crawlers in search engines. Would BFS be an effective algorithm to finding a path using a drone? No, unless the goal was to cover as area as possible. Drones have limited battery and surveying all the land would not be as useful and would take a long time as the distance increases.
Questions What is the F value of the blue square, with the cost to move set to 1? Is it faster to calculate the H value for each cell first, or to calculate the H value as it is needed? Answer: If the H value is calculated for each cell, the processing time will increase. However in the event of a no solution having the H value already will make testing all cells quicker Answer: H = 3, G = 5, F = 8
Hypothesis Breadth-First Perform better than Depth-First but not better than A*. A* Will find optimal route in the fastest time Use the least amount of memory