This is a common problem, and I experienced it as well. I tried different AIs, and I couldn't believe that one of them fixed the bug in my game in literally less than half an hour