Pursuit and Evade Behaviours

Pursuit

persuit behaviour forces

Remember as a child playing tag, you didn't run straight at your friend's current position, rather you would try to predict where they were going to be in the future and run to that position making adjustments as you go. This is the sort of behaviour that we want our agents to emulate, after all we want them to look intelligent.

The success of the pursuit behaviour depends on how well we can predict the other agent's movement. Don't forget that the other agent may be trying to evade the pursuer or may be following some other steering behaviour altogether. This is complicated so we have to balance accuracy and performance.

To estimate the future position we must first decide on how far ahead in time to look. This should be proportional to the distance between the agents and inversely proportional to the sum of the pursuer’s maximum speed and the other agent's speed. The predicted position is easily calculated using the other agents current speed.

Just because this agent is pursuing another, it doesn't mean that the other agent is fleeing the pursuer. For instance the cat evade behaviour forces might chase the mouse but the mouse will only flee when it sees the cat chasing it.

Evade

Evade is the opposite of pursuit and it creates a force that steers the agent away from the predicted position of the other agent, even if that agent is not pursuing it. After all a mouse will run from any cat it sees, even if the cat hasn't seen him.