Always had issues with sci fi films and book showing infantry in the future as really no more than today's infantry with some sort of futuristic rifle. I always figured in the not too distance future humans will really just be easy meat targets with robot "infantry" with them having an extreme advantage with far better senors and reflexes. A robot soldier could detect and fire long before your wet computer could even process the info.
Scary yes, but that's where we're headed.
F. Herbert took care of that issue in Dune in keeping humans relevant in warfare by AI being banned in the Dune universe but only after a war had occurred between humans and AI.