This is basic artifical intellegence, the red ball runs away from the blue ball, and speeds up if the blue ball gets close. try it! make changes!