How Does AI Determine Its Targeting?

This discussion was created from comments split from: I can’t do this anymore.

This one, while frustrating for some, I think I can see from a coding standpoint. It would see the AI takes a look at legal targets of a spell regardless of ownership and uses its algorithm to determine the biggest threat or highest value, and targets that. Making it so kill spells can never target your own creatures would solve this instantly, but would have meant that certain groups would then complain that they can’t eliminate their own board presence to meet certain secondary objectives, and would have created an issue wherein other interesting builds, like killing your own embalm/eternalize creatures, couldn’t exist.

As a related note it seems to rank threat as:

rarity > power > utility

Though it may not be quite so simple, but I’ve seen it kill my small mythic rare creatures before my large pile of tokens, especially in white vampire decks, and I’ve seen it prioritize its own reinforced mythic creatures over mine as well.

The spells seem to be divided by positive and negative (or whatever), and several kill spells seem to be coded wrong.
Demolish now fizzles when it sees an indestructible support.. Shy spell.

I think the support destruction spells that do something else too (gaining life or drawing cards for instance) are actually meant to be castable without any enemy supports on the board, but it’s hard to know for sure. I’ve had it come in handy more often than it has messed me up, especially for cast X or more spells objectives. It would be helpful if it was possible to tell which one a card is from the wording though, consistency and accuracy in card descriptions are unfortunately poor in this game.

I’ve never seen AI target it’s own creatures when I have creatures in play. Is this a thing?

Yeah, I’ve seen it many, many times. Sometimes I’m behind on board with just some basic creatures while the enemy cascades into some mythics. But, since the AI puts spells later in priority, it casts them after. Time and time again, I get disheartened because I see the spell pop up and think it’s going to further steamroll me by destroying my creature as well. But then it ends up killing its own, and leaving me to stabilize.

Yes, see Liliana’s Defeat and Contract Killing.

Also iirc Ixalan’s Binding and Baffling End.

If I remember correctly it’s only cards that have a secondary effect. For example I don’t remember seeing Greg use Final Reward on his own creatures.

Yes that seems to be the case. Skywhaler’s Shot is another example, AI will always target its creatures with it, even if you have one on board

Vraska’s Contempt is another I’ve seen self-target.

Depends on if self-targetting is possible, wether there is an additional effect attached, and the “priority” of creatures (regardless of ownership) is also a factor.

Settle the Score is part of the fun “target my own creatures”.
However, the whole “secondary effect” clause is kind of eh when you think of spells like “Expel from Orazca” which really has no upside to Greg bouncing its own creature.

I’ve seen that too. Bracing myself for a kill spell and losing my favorite critter, it’s a relief to see the AI cast that. There’s a few other cards in standard I’ve seen the AI use to kill there own creatures, but without being able to see their graveyard I can’t confirm what the spells were (honestly I was only half paying-attention when they cast the spell in the first place lol)

the AI targeting its own creatures is card specific and it’s because the team isn’t setting the correct TargetResolver (hostile) for those cards (from the player’s perspective)

it has nothing to do with “additional effects” on the card or anything like that; it’s literally a “wrong” (from the player’s perspective) value assigned

it’s not generic to the AI and it must be checked for every targetable card

(I may have mentioned this previously)

I wish they would let you and I get involved in development. They clearly need a bit of senior level help.

how old are you guys??? :wink:

I concede it may be limited to certain cards, but the same cards the AI uses to kill its own creatures, it has also used to kill mine meaning there is some degree of generic risk assessment it’s applying to all available targets without regard to who controls the creature.

correct, this is the difference between a hostile targetresolver and a neutral one

just read this closer; it’s only partially correct. the degree of generic risk assessment does not always treat your creatures as “more dangerous” - side of board is irrelevant in the eyes of the neutral resolver

lol

The AI targeting his own creatures has happened with every new expansion since the SOI days, and the issue keeps recurring. It’s a bug that’s persisted through both developers. Granted, it’s come in handy, like in HoD where I had Greg cast Ixalan’s Binding on his own first-turn GR–that was hilarious–but it’s still amazing how endemic this bug is to whatever templating/development process is used for new cards.

I have great respect for all the moving parts, and all of the quality testing, and appreciate Brigby and the other voices of reason shedding some additional light on the subject.

But still, how hard can it be to make Verix’s text match his damage? That has to be such a minor change, free of interdependencies with other cards or keywords or effects, that it could be done in minimal time.

@bken1234 If you have a non-token creature disabled from being cast or just disabled all together and the opponent has one of their creatures out, the AI destroys its own creature first. Otherwise, yours will be targeted.

If you have a token creature out, the same rule applies.

If they do not have any creatures out, the above rules no longer applies and the AI promptly removes one of your creatures or token stacks as per norm.

this is my observation. So please take this with a grain of salt but I have yet to prove myself wrong