AI for the battle engine