Page 2 of 2

Re: spPumpTgt - Targeted Pump Spells

PostPosted: 21 Aug 2009, 01:48
by Chris H.
I happened to stumble across several spells that we missed earlier:

Code: Select all
Infiltrate
U
Instant
Target creature is unblockable this turn.
spPumpTgt:Unblockable

Touch of Invisibility
3 U
Sorcery
Target creature is unblockable this turn. Draw a card.
Draw a card.
spPumpTgt:Unblockable
Cantrip

Trailblazer
2 G G
Instant
Target creature is unblockable this turn.
spPumpTgt:Unblockable
`
I will send this data and the cards pics to Dennis via pm.

Re: spPumpTgt - Targeted Pump Spells

PostPosted: 04 Sep 2009, 14:39
by Chris H.
Chris H. wrote:On a related note, I tested a deck with Giant Growth and the computer will not cast it on it's own Kird Ape.

It appears that the spPumpTgt keyword creates a dead card that the computer can not play, whether or not the Power buff/boost is negative or positive. :?:
I think that the computer will use the spPumpTgt: spells on flying creatures. :)

I was having problems getting the computer to cast these spells. I tried several test decks with non-flying creatures and these spPumpTgt: spells appeared to be a dead card. I looked at the source code and it dawned on me that the computer might be looking for a target with flying. :-k

Re: spPumpTgt - Targeted Pump Spells

PostPosted: 04 Sep 2009, 16:10
by Rob Cashwalker
First thing it does is get a list of attackers then sorts that list by flying creatures first. It filters the list for a few criteria, then chooses the first creature that survived all iterations.

This AI has two things working against it:
First, the list returned by getAttackers may not necessarily always return any of the creatures in play, it evaluates board position, ignoring the "hand position" of having Giant Growth in hand or as an ability available on another permanent on the field. This I think is the more important areas of the AI that needs to be tweaked - humans base the attack decision on the knowledge of having a pump effect; the computer is reversed - it bases the pump decision on the knowledge of attacking.
Second, the AI code only tells the computer that the spell is OK to play, there are likely a number of other spells or abilities that the computer has available and all responded "Yes" to canPlayAI(?).

I didn't change the AI very much from the original model pump spell. There's certainly room for improvement, but I have a feeling the underlying cause is not in this layer.

Re: spPumpTgt - Targeted Pump Spells

PostPosted: 05 Sep 2009, 00:02
by Chris H.
Hmm, I was able to get the computer to use a Wildsize but not a Giant Growth.

I checked the CardFactory.java and cards.txt files. It turns out that Wildsize is still hard-coded and also contains the spPumpTgt keyword.

None of the other cards with the spPumpTgt keyword could be found in the CardFactory.java file.

Re: spPumpTgt - Targeted Pump Spells

PostPosted: 10 Sep 2009, 19:17
by mtgrares
Second, the AI code only tells the computer that the spell is OK to play, there are likely a number of other spells or abilities that the computer has available and all responded "Yes" to canPlayAI(?).
To answer your question "What if many cards return Yes to canPlayAI()?" As I remember it, if the AI has 4 lands it will try to play a 4 mana creature card and if it can't, it tries to play a 4 mana spell card, and then a 3 mana creature card etc... To see the AI for yourself checkout ComputerAI_General.java which calls ComputerUtil.java.