问题
I am using NetLogo for a simulation in which i have to deal with many turtles each representing a robot. I need to find an algorithm for leader selection. I want to make leaders in between the crowd which will ultimately lead crowd toward the predefined target. Or is there any other way to which any turtle dynamically changes its behavior to become a leader. Any one if could help. As we see in the model library a model named "Flocking". In which a random turtles leads all turtles. But i don't need random turtle i need the leader which should be at center or at corners of crowd.
回答1:
There are two immediate possibilities: a leader
breed, or an is-leader?
turtle attribute. Note that a turtle's breed can be changed dynamically, just like any other attribute.
If you will have multiple leaders you may need to keep track of who follows them. Three ways to do this: a leader can maintain an agent set of followers, or each robot can have a leader
attribute set to the appropriate leader (which might be nobody
or self
for a leader 'bot), or (as a more powerful variant of the second approach) you could create a directed links from each follower to its leader.
hth.
来源:https://stackoverflow.com/questions/25619505/leader-selection-for-crowd-of-turtles-netlogo