I'm not very clued up when it comes to coding however I can say that if you fight against AI,you will discover that the AI is predictable,after a while a person can figure it out.
I've noticed that when you start bombarding the AI,it will split up the stack and leave the weakest unit/s behind.The AI in most cases will send units from the split stack to attack your artillery-coding or no coding, keep your artillery protected against AI and Players.( I have learned the hard way)
Even if you come across an AI stack of 35 units, don't panic, the AI will always split up its stacks, especially if you "lure" the AI out by attacking neighboring provinces.
