Minor refactoring of AI code
Make AI slightly more aggressive when behind