In this paper, the generalized intelligent water drops (IWD) algorithm is proposed to solve robot path planning problem. Path planning is modeled by IWD algorithm, because there is inherent similarity between this and finding most appropriate route in natural rivers, that occurs by interaction between water drops and the river bed. The proposed algorithm has two levels; first level, finds the best global feasible path. Second level, performs local search at relatively near distances of global path and reduces its length and time to reach optimal solution. The IWD algorithm, like other inspired nature algorithms, has not a mechanism to deal with constrained optimization problem in its original version. So, a mechanism has been proposed based on repair of infeasible solutions. In this mechanism, a fuzzy inference system is proposed for selecting the best possible infeasible solution and then the local search operator repairs any of them in violation locations. Another innovation of this paper provides a mechanism to local soil update, which is based on fuzzy systems and is independent of size and complexity of environment and its soil altering will be defined in fixed range. Simulation result shows ability of IWD algorithm in finding of the optimal path.