AI team attack/Navigation

How would you program your AI to swarm a player, but to spread out when attacking, and not go into another AI’s attack or seek space