Adaptive Pedestrian Behaviour for the Preservation of Group Cohesion