Path planning has been studied focusing on finding the shortest paths or smallest movements. The previous methods, however, are not suitable for stable movements on real environments in which various dynamic obstacles exist. In this paper, we suggest a path planning algorithm that makes the movement of an autonomous robot easier in a dynamic environment. Our focus is based on finding optimal movements for mobile robot to keep going on a stable situation but not on finding shortest paths or smallest movements. The proposed algorithm is based on GA and uses kmeans cluster analysis algorithm to recognize the much more information of obstacles distribution in real-life space. Simulation results confirmed to have better performance and stability of the proposed algorithm. In order to validate our results, we compared with a previous algorithm based on grid maps-based algorithm for static obstacles and dynamic obstacles environment.