Obviously correct, so in a sense the parent commenters concerns are not about something new.
But historically these weapons systems are massively expensive custom systems developed by defence contractors for major states. Costs, budget cycles, and technical limitations went some way to limiting their ubiquity and the rate they could gain functions.
So cruse missiles had autonomous terrain-matching terminal guidance, but the US needed the combined abilities of the NRO and General Dynamics / McDonnell Douglas / Raytheon etc to build it.
Whereas now we have free and triviably cloneable software (embedded OSs, drone flight and guidance s/w, ML and image recognition stacks, global mapping data) and a massive range (compared to event ten years ago) of dirt-cheap cots hardware (GPS, lidar, ...)for making autonomous moving objects. And often those devices are fairly thin hardware shells around yet more software.
The network effects driving these capabilities, particularly in software, and their seemingly exponential increase, are what I took to be the source of the parent commenters concerns.
If you look at the current tactics of insurgency, software is not a part of it. Enemies of the US (Al Qaeda, etc) already had tremendous success with the current insurgency tactics (IEDs, etc) which were low tech solutions, and were vastly hard for the US to overcome.
Why would they go to software when there's plenty of tried and tested low-tech solutions already to kill your enemies?
To kill more people, whilst taking even lower risks themselves.
They probably wouldn't write the software themselves -- they'd get it from e.g. some supportive dictatorship
(With "them", I'm personally not thinking about the talibans, but other groups)
Sarin gas? Nuclear weapons? Truck Bombs? Strapping bombs onto children?
Cheaper and more accessible though. Not many people can build or buy their own nukes or sarin gas.
People have written software to target buildings, soldiers, tanks, planes, missiles, etc. This is done via radar, heat signatures, cameras -- and software already. It's not such a big change really.
I believe the thing you really have to worry about is the proliferation of NBC. It's easier to drop a nerve agent in a war zone than it is to figure out how to make an explody drone to kill your enemies and not you, say.
It's not so much software that's the issue, it's people taking existing tech and weaponizing it.
Software has been in weapon systems since the 1970's from guidance to target acquisition. It's already there, and has been for a while. Machine learning is just another iteration on what's already out there.
The world knows how to kill en masse for a long time now with NBC (Nuclear/Biological/Chemical) weapons -- and software wasn't a part of Fat Man or Little Boy.
But consider the challenges the US had in the middle east for the past two decades.
* Consumer drones dropping hand grenades.
* IED's using manual triggers.
* Trucks loaded with explosives blitzing checkpoints.
* Cars with explosives driving up next to convoys.
* Land mines.
You don't really need custom software, just take existing tech and get creative with it.