Planning the shortest path for a mobile robot is a hard task. It consists in quickly finding the shortest distance from the starting to the target positions with obstacles collision-free. The performance of the robot mobile will be increased if the optimal shortest path is rapidly planned. Therefore, in this paper the novel optimal method entitled Dhouib-Matrix-SPP (DM-SPP) is enhanced for this problem with four movement directions (namely DM-SPP-4) for an environment represented as a grid map with fixed obstacles. The simulation results on several 41x41 grid maps and the comparison of DM-SPP-4 to different methods (Basic Dijkstra, Modified Dijkstra, Basic A*, Modified A*, Best First Search Algorithm, Breadth First Search, Depth First Search algorithms) show that DM-SPP-4 can realize the path planning more rapidly and accuracy.