[UNSOLVED] AI groups around target, but vibrates.

NOTE: Forgot to mention this is a 2D game so I use transform.position.Vector2() a lot because a Vector3 is not needed to represent position in a 2D world.

I’ve been wrestling with this problem for a long time.
I wrote some code that successfully groups my AI around a target point, but when they get there they just vibrate constantly.

I had a code example here, but it is easier if you just see it in action.
Here is a download to the unity project:
https://drive.google.com/open?id=0B_z-b0FvwpjhbEhnYXIzb3oxbUE

The main code is in the Update function in the TestAI.cs file.
One somewhat successful attempt at removing the vibration is included.
To see it in action go to the TestAI prefab.
The child in this prefab is called Enemy, and this child contains a script called TestAISmoothing.
Enable this script to see the effect.
This method causes the AI to have delayed reactions and unwanted acceleration so I would prefer to not use it.

If you are a good programmer and you have time to take a look I would really appreciate it.
I know it is a lot to ask, but I feel this is important. I haven’t seen any other place on the forums that tackles the problem of surrounding a target.

It’s a little hard to follow what’s going on in your code without more context about the game, but the “move towards target” AI vibration is common.

The problem is that once the AI is close to the target, when the AI move towards the target, it goes too far and ends up past the target. Each frame, the AI will turn around and move too far towards the target, thus making it vibrate back and forth over the target.

Yes, I know the problem of going too far forward one frame then too far back the next.
Normally, I could fix it easily, but this code is more complex because it features separation as well as targeting.
I know how to fix the problem with just targeting, but I can’t think of what to do when I have both.
I will add comments to the code in the OP.

Bumping this thread because I created an example project file to illustrate my problem. The project is linked in the OP