double disturbanceFactor = 0.5;
double gradientFactor = 0.3;
Vector2D pos = this.getEnvironment().getAgentPosition(this.id());
Vector2D vec = new Vector2D(this.getEnvironment().getGradientAtCoordinate(pos));
vec.mult(gradientFactor);
vec.translate(new Vector2D(
(rand.nextDouble() - 0.5) * disturbanceFactor,
(rand.nextDouble() - 0.5) * disturbanceFactor));
Vector2D newPos = new Vector2D(vec).translate(pos);