However, this approach guarantees that the algorithms can be put to use in real hardware robots without much ado. Specifically, our robots form line shaped flocks. This type of flock is robust in the sense that it is easy for the individual robot in the line to avoid distractions. In addition, the flocks can easily be reversed if they hit a wall. Another important property of our robots is that they can form these line formations even if they start out completely dispersed.
All robots use the same algorithm, but they are able to behave as leaders or followers.
In the beginning, all robots are leaders. When they meet another robot, they stop. One of them will, at random, make a turn and the other one will follow when it perceives the sudden motion. This is done without any communication, so it happens occasionally that both robots turn at once. This only means that flocks form a little slower than they otherwise would.