Yeah, I've seen a few of these "splinter armies" lately, they seem to act quite sensibly and I like this!
However I've also seen AI armies splitting in half and going into different directions in the vicinity of enemy, thus simplifying stackwipes instead of trying to avoid them.
Also, AI doesn't manage to join fleets together, thus greatly simplifying beating it in naval battles. In particular, it seems to avoid adding transport ships to battle stacks which is a deadly mistake. In general, fleet AI is perceived as weaker than army AI, and I think this is caused by fact that armies are often hidden from player under FoW, but fleets often act in the open.
Isn't AI (at least, part of it) shared between all Paradox games? Because when I played Stellaris I've seen it having similar troubles with coordinating actions of separate fleets.
As for risk of bugs, I see a few possible solutions:
- Allow both old and new versions of modified AI code path to coexist, so it's possible to select between "old" and "new" AI at run time via setting. In this case you can ship new AI turned off by default so that enthusiasts can test it and report bugs.
- Keep development of new AI in a branch and release it separately in a beta channel, so that interested people could install it, try out, report bugs, and if things are too bad, switch back to mainline version. I assume there are not many developers working on AI code on permanent basis, so keeping some changes in a separate branch should not result in significant conflicts.
- Make AI pluggable, so that modderns could create alternative AI engines, and ship modified AI as a separate plugin.