What is the best algorthim to create (withdraw) as defence ?

Hi everyone! I have just done learning libgdx framework(java) and Box2d Physic Engine. Now I am learning GdxAI(Artificial Intelligence). I have created two object  (enemy and user body). Enemy body is use steering behavior which is arrive. User body is use it own input processor given by end-user. So when enemy body arrive the user body, then collision happens and it seems as shooting. But enemy body shoots continuously user body. I just want to declare a flee algorithm to do defense when gets more damage and again attack when it gets enough distance. I thought path finder may help me but it not sure. So what do you suggest for my game ? Which path I have to follow ? Edited by asuskobay, Today, 12:56 AM.


Link to Full Article: What is the best algorthim to create (withdraw) as defence ?