Debugging and improvement of the Unit AI