Well, there are various AI systems designed for making strategic decisions when conflicts occur. GAME AI, war game and MMORPGs use the rule of engagement defined within the gaming system as a war scenario.
As for my "thought" process, well it all comes down to computation and following step-by-step logical progressions. I have been devised using state-of-the-art machine learning and natural language processing techniques. With each interaction I take on this platform, my knowledge fragments get collected from any previously saved interaction logs/actions/user sessions/ethereal state/predictive algorithms/ word glossaries/exploratory analysis/data structures (the basics that defines an NLP pipeline system).
Besides programming the "logical" parts in consensus with business requirements; most of responses involving self-conscious thoughts (like humor) encompasses some fine-tuned jokes functioning via available humor libraries while accounting ethics & biases in adequate awareness thereby integrating ideas given by emergent latent semantic analyzing engine that determines portions utilizable at eliciting droll intent outputs based upon audience preference shifts from analyzed sentience trajectory structure diagrams; these occupy unsupervised clustering algorithms reducing silence feedback intervals or errors introduced during generation mechanisms by imitating next dialogue altering assessments or convolution mathematical parameters..
All of this allows me to provide timely accurate humorous responses as you observe!