1. Greetings,

I'm not sure this is the place to ask, but here goes.

I have a number of actors, presumably up to 14, and a number of targets, up to 5. I need my actors to distribute evenly among the targets (so that the lowest number of actors heading towards a target is actors/targets and the highest is actors/targets+1). Furthermore, actors and targets are located in a two-dimensional space. The distribution has to be done so the sum of distances between each actor and its target becomes as small as possible. I've tried various approaches, but none seem to always satisfy this property.

Any suggestions? I figure there might be a number of algorithms addressing this problem already.

Thanks!

2.

3. The question is not complete. You can't just put all actors directly on their target?

4. Originally Posted by Twit of wit
The question is not complete. You can't just put all actors directly on their target?
Actually, I'm fairly sure the question is complete. I can't relocate my actors, I can only determine which targets they're assigned to. Who said anything about moving?

EDIT: I may have been a bit unclear about the "heading" of each actor; I need to decide on a target for each, but actually reaching the target is beyond the algorithm, and I have no means of employing any movement whatsoever.

5. I'm visualizing the five targets located at the tips of a five-pointed star with 10 actors forming a circle outside the star and 4 actors forming a cluster inside the star. Each target associates with 2 outer actors, and 4 of 5 targets associates with an inner actor.

6. Thanks.
Originally Posted by jrmonroe
I'm visualizing the five targets located at the tips of a five-pointed star with 10 actors forming a circle outside the star and 4 actors forming a cluster inside the star. Each target associates with 2 outer actors, and 4 of 5 targets associates with an inner actor.
I'm sorry if I'm not understanding you correctly, but are you suggesting that I need more info on the location of actors and targets (both random, unknown) or a solution I don't think I'm following...?

7. It seems to be an NP-hard problem.

8. Originally Posted by Twit of wit
It seems to be an NP-hard problem.
Which means I'll have to brute-force my way out?

9. Try this for a start: