Spatial coordination through social potential fields and genetic algorithms