Path finding and path planning by implementing Prim's MST and Dijkstra's shortest path algorthm