We crossed the line of machines that automatically kill a long time ago. A heat seeking missile, or a shell that detects and target tanks [1] are effectively doing that. Software selects the target. The soldier only points in the general direction. AI is only a small technical increment.
[1] https://en.wikipedia.org/wiki/SMArt_155