Path planning and autonomous navigation algorithms play a vital role in the field of robotics. Amongst these, the potential field algorithm is widely used due to its elegant mathematical model. Although it serves the basic purpose of avoiding obstacles, it is bounded by particular restrictions. The use of a virtual obstacle along with potential field algorithm is a lucrative approach to overcome these limitations. This work aims at optimizing certain parameters involved in the virtual obstacle concept by the use of Non-Dominated Sorting Genetic Algorithm II (NSGA II). It is advisable to maintain a safety margin around the obstacle and to maneuver efficiently without oscillations as it moves close to the obstacle. Furthermore, the size of the robot also affects its motion. This paper takes into account all these factors during the optimization process. The results have proven its feasibility and validity in unknown environments.