I got an unweighted, undirected graph, with $N$ vertices, where each vertex has degree $K$. In my case its a grid with dynamic obstacles.My goal is to output a map, based on given location on the grid, with the shortest path to all  the cells on the grid, some thing like this:4 3 2 33 2 1 24 x x 35 6 5 4The starting position is at node with the weight of 1. X represent the  obstacles.I achieve this goal using Breadth-first-search. My question is how can I reduce the cost of the next search if:Only my location on the grid is changed, and/or,if only the location of the obstacles is changes and/orif both my location and the location of the obstacles is changed.As for now I perform full recalculation in all those cases.
How to reduce the cost of search based on previous BFS?
algorithms;graphs;shortest path