On 3/27/2018 at 2:07 AM, berengard2 said:
Also, doesn't the fact that A* finds the most optimal path, mean that it would choose to avoid some points in the list?
My goal is to go through all points while making the simplest path possible.
@JTippetts is speaking about optimal path, but not in the way you interpret it.
Basically A* is a generic search algorithm, you are in one state, and you want to go to some known destination state, but you are not sure how to get there. The usual problem where A* is thrown at, is where "state" means "position in the world", and the first state is then "i am here", and the destination state is "I want to go there". Transition from one state to the next is then "move in the world".
However, state can mean anything you like (which is what JTippets means). For you, state could mean "I have some points connected". First state is then "I have no points connected", and last state is "I have all points" connected. Then your search space is connecting points in the path. Transition to the next state is "connect a point". A heuristic could be "cleanliness of the solution so far", ie your "reasonable" notion. For example, make the solution worse if many paths cross each other.
Depending on how many points you have, a brute force approach may also be an option.