This is pretty much the background story for the Terminator movies.
Type 2: AI killbot has eyes and some brains and doesn't waste all it's ammo in two seconds shooting at leaves blowing in the wind. And in fact we can easily defeat Type 1 with large bags of leaves attached to leaf blowers.
So then the question is what to do about type 2. The AI in the Terminator is Type 2 or maybe Type 3 or Type N, who knows. It could in theory tow along a giant bin of Type 1 weapons and release them. But it still has to be smart enough to know when to do so or they will be wasted shooting at leaves. Type N will probably need to be defeated with great difficulty like the movie.