sensor confusion may be important. There's no reason why such things should "miss" much, they'll probably be able to hit whatever they shoot at 99% of the time and a human will not be able to zig zag fast enough. (yes, that's an "
the in-laws" joke) However, an nice infrared laser should be able to burn out or blind them.
and... decoys. heated articulated mannequins that'll look like people but can take lots of bullets and keep moving.
but eventually humans just don't make the best gun platform. making little remote-by-wire mobile gun platforms might be best, aim-assist software like that new computer-assisted sniper rifle is probably do-able for these units. Might be best to design them as open sphere structures that roll around quite fast. but then we're in fighting fire-with-fire mode.
but I don't know that these things are ever going to be primary. full autonomy is forgetaboutit in less than 20 years if ever, the existing cases only cover sending a device into a 'hot zone' where any target is presumed to be hostile. That's not too tenable really. So most likely these things would assist human soldiers right along side, not run off on their own. and any of these machines will likely remain very vulnerable to AP rounds, etc, pending some significant engine improvements to give them enough power to stack serious armor on. Even tanks remain really very vulnerable.
So in the end, it all comes down to politics, either we get sane reasonable people running the show or we go down in flames, so things remain status quo.