Well in IntenseX it was handled like this:

Place some nodes radially around the entitiy within a defined range.
Check from every node to enemy if contact is held.
If not then compare the distances.
Take the shortest and walk to it.


Professional Edition
A8.47.1
--------------------
http://www.yueklet.de