It is really simple!!you group all enemy objects and if one enemy instance is in collission with another it will move away
Thanks:)