AI keeps running around in circles [Solved]