The standard algorithm D * has several disadvantages, due to which it can be difficult to use it on real mobile devices. This paper presents a modification of this algorithm with two corrected flaws. First, instead of four directions of movement of the robot (forward, back, left, right), eight directions are considered (diagonal directions are added to those indicated earlier, that is, the angle between adjacent directions instead of ninety degrees becomes forty five degrees). Secondly, this modification of the algorithm takes into account the direction in which the robot stopped at each particular point in its movement, which greatly facilitates its practical implementation.