In real applications, mobile robot may be commanded to go to multiple goals to execute special commissions. This study analyzes the particular properties of this multiple goals visiting task and proposes a novel tailored genetic algorithm for optimal path planning for this task. In proposed algorithm, objectives for evaluating the path are energy consumption and idle time that are proposed in our previous work. Under the constraint of energy consumption, it will generate an optimal path that comprises as more goals as possible and as less idle time as possible. In this algorithm, customized chromosome representing a path and genetic operators including Repair, Cut and Deletion are developed and implemented. Afterwards, simulations are carried out to verify the effectiveness and applicability. Finally, analysis of simulation results is conducted and future work is addressed.