Coordination of collective behaviours in spatially separated agents