Algorithm for finding the best “route” of tasks I have the following problem: Let's say I'm in a city with some friend we have a bunch of tasks to do. All persons start on a different position, for example (0/0), (10/5), (-20/0), ... , and every person can move x coordinates per second. Every task has:

A coordinate where it can be completed (for example (40/50))
A importance value ranging from  0  to X (for example importance = 5)
A time that is needed to complete this task

Also, some tasks can only be done if a certain other task has already been completed.
Now comes the tricky thing: The group has a certain time, in which they can complete tasks. They now need to choose which tasks they want to complete, the goal is that the summarized &quot;importance value&quot; of the completed tasks is as high as possible. The group is also allowed to split up.

I tried to bruteforce it, but that didn't work out. There are around 11 tasks usually and 4-6 can be done, resulting in up to a million and something possiblities. Also, I had a solution without calculating the time needed to travel between the points which was basically calculating a importance per time value and just doing the tasks based on this value... which won't work for the full problem.
If you have just one person to complete the tasks, this is the (in)famous Travelling Salesman Problem (TSP), which is NP-complete, so an efficient exact algorithm is a very remote possibility. Unless your problem is quite small, you'd have to settle for approximate solutions. There are algorithms that can solve enormous instances of TSP in (somewhat) reasonable time, but I have no pointers at hand.