A genetic algorithm for shortest path motion problem in three dimensions