Re: [netlogo-users] Distance primitive
Since you don't say how the turtles are selected, I'm going to assume the existence of a patch variable "gang" that contains the agentset of turtles in question.
And since you don't say why the patches are checking the distance, I'm going to check distance to find a turtle closest to the mean distance of all these gang of turtles.
[ set gang turtles with [criteria ]
Let mean-gang mean [distance myself ] of gang
Let middle-most min-one-of gang [ abs ( mean-gang - distance myself ) ]
I hope this suggests to you the kind of things that are possible, and gives you an idea of what to look for in the NetLogo primitives dictionary.