Almantask / Work_ShortestPathInArray

Work assignment 2019 08 30
MIT License
0 stars 0 forks source link

Algorithm for finding the most efficient path #2

Open Almantask opened 5 years ago

Almantask commented 5 years ago

It's not defined what is the most efficient path. Is it the least amount of moves taken? Is it the least amount of steps wasted?

For this task, it's presumed that it will be the least amount of moves taken approach.

Almantask commented 5 years ago

Before, the algorithm chosen was recursive backtrack. But it required dirty code, a list of lists and too much space was wasted for creating many lists where all the possible paths are stored. A major rework required.

Almantask commented 5 years ago

The chosen rework, was, to always pick the most optimal step as next step. Next most optimal step is a step, which will result in biggest distance traveled and is the most further away from the previous position.