fixed out of bounds error caused by chase and avoidance algorithm - introduced movement perimeter algorithm