It’s going to be a combination of red flags that an algorithm weighs, and triggers the self destruct if exceeded. Probably even gives HQ a short window to override it (if coms are working).
It’s not going to have a built in “AI” making “intelligent” decisions in a dynamic way. That would be extremely dangerous/unreliable, as well as require a shit ton of processing power.
Stop buying into the AI bullshit. Algorithms != AI