Flocking behavior emerges from the the local interactions . Flocking adresses a variety of important topics in the field of multiagent simulation and collective robotics which include agent interaction, kin recognition, and finally the emergence of collective behavior. Yet it also problem so straightforward that it allows actual implementation both in simulation and on real robots. For the above reasons flocking is one of the most interesting yet simple biological behaviors studied to date in the fields of mathematical biology and robotics. The flock moves without a leader, even though temporary leaders seem to appear.
Vision is considered to be the most important senses for flock organization.
In short they are homogeneous and local. Mapping these rules to real robots poses a problem. Rules have to be reformulated to a situated form. Different sensor modalities can be exploited to simplify the problem. Samurai 2 robot Links Craig W. Reynolds' Boids Page Excellent introduction to flocking rules.