When I think of the future of AI I tend to think two things: Pragmatic distrust, and social unrest. That is in the context of survival. Yes they say World War 3 will be fought by AI, although 'they' do not necessarily know If there will be a World War 3, nor who fights In this war.
I say Pragmatic distrust because as AI get smarter and smarter the trust we will put into AI will increase on the manufacturing end, and lessen on the public end- So it stands to ideal that In Republic, Parliament, or a derivative of a democratic system that AI will be limited by law as to how advanced they can be, so long as those governments/peoples decide that's appropriate- This is similar to how many nuclear silos around the world are using older computers, although less efficient and less mathematically savvy many of the old computers have no wifi, and prevent attacks unless someone used the computer manually from within the silo. If we choose its safer to not allow AIs to be in charge of nukes, or even weapons, then it will not be a problem.
I say social unrest because if we did have a near-completely digitized military then you lose the traditional prospects like a self-run country, morals in battle, and you have an extremely large military budget that takes away from other portions of the economy. No democratic system could really support this (theoretically) unless it's public was in favor of extreme military and resource expenditure and running the risk of miscalculation in battle (i.e. friendly fire)
In the end wars are fought by people, to topple people. To make Robots shoot at eachother is like saying both countries want to throw away a massive amount of metal resources (due to death in battle) to POSSIBLY gain another resource In another country, or POSSIBLY topple a government. And even then opposing militia would be sure to disable a robot and take it for technology research before the end of the war, which raises the question of security on the battlefield.
People are renewable, eventually Robots will not be. It sounds harsh, and it is, but quite truly I doubt it will be fought with predominantly AI fighters.
Aside form everything i mentioned there is still cyber-warfare which will always be a joint-effort between AI and humans, and cyber-warfare is said to be the war of the future. Toppling an economy is more crippling than winning a military battle.