It is currently 20 Jun 2025, 22:52
   
Text Size

AI attacking and blocking Observations

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: AI attacking and blocking Observations

Postby cc-drake » 18 Mar 2012, 09:22

AI is on 9 Poison and attacks with his only creature even though I control a creature with Infect.
cc-drake
 
Posts: 570
Joined: 14 Aug 2010, 07:15
Has thanked: 29 times
Been thanked: 6 times

Re: AI attacking and blocking Observations

Postby mark » 18 Mar 2012, 21:47

AI had two Goblin Mountaineer s, Molten Ravager (MR) and played Vulshok Heartstoker, targetting MR for the +2/0 effect, then pumping it once to 3/4 (then had no mana left) and then attacked with MR alone, though I had Paladin en-Vec and Angelic Wall as blocker.
mark
 
Posts: 138
Joined: 28 Dec 2011, 11:32
Has thanked: 6 times
Been thanked: 11 times

Re: AI attacking and blocking Observations

Postby mark » 20 Mar 2012, 17:37

AI (5 life) has Horned Turtle and Thieving Magpie. The turtle is enchanted by Spiteful Shadows (Whenever enchanted creature is dealt damage, it deals that much damage to its controller) and I attack with Markov Blademaster with Grafted Wargear attached and some +1/+1 markers, resulting in 8/5 in total.
AI blocks with Horned Turtle and loses with -3 life but could have survived another round if it blocked with Thieving Magpie.
mark
 
Posts: 138
Joined: 28 Dec 2011, 11:32
Has thanked: 6 times
Been thanked: 11 times

Re: AI attacking and blocking Observations

Postby mark » 21 Mar 2012, 09:19

One observation I made in Duels of the Planeswalkers: the AI there blocks more aggressively, thus is harder to beat. For example if I attack with Elite Vanguard and the AI has some other 1/1 creature, it blocks and kills my Vanguard (as a rule of thumb the AI there blocks creatures that are "more worth" to me as soon as possible).

I do not know, how forge calculates the worthyness of a target (and guess that this is NP complete anyway), but a suggestion is to block or target uncommon/rare/mythics/max converted mana cost or creatures with pumping, +1/+1 marker abilities, leveling or lord effects (like all creatures get $foo, e.g. Knight Exemplar, Kinsbaile Cavalier, ...) if able and as soon as possible and especially if the blocking creature is "less worth" and able to kill the attacker.
This will also help against creatures like Bloodcrazed Neonate or Stromkirk Noble (whenever they deal combat damage to a player, put a +1/+1 counter on it) that can be killed easily first but soon become very powerful; forge's AI is very vulnerable to those creatures.
This should make it harder to steal the first 10 hit points of the enemy, which is very easy right now.

Further: the AI should use Steel Overseer more as a support creature; the AI chooses to attack with it or "forgets" to use the tap-ability in some turns, resulting in weaker creatures or a dead Overseer. The best time to use the tap ability would be DB phase or as reaction on any enemy spell that targets the Steel Overseer himself or if the spell deals deadly damage or a deadly amount of -1/-1 markers to a creature, where the loss could be prevented with an additional +1/+1 marker.

Signal Pest is another creature with small problems: mostly this is the first and only creature on the battlefield, but the AI attacks with it. Further, I had the constellation of a nice small AI army that attacked while Signal Pest did not.
Suggestion: (assuming Signal Pest is still a 0/1 creature) attack only while at least one other creature attacks and there is no great risk of losing Signal Pest. If there are many attacking creatures, attack with Signal Pest even if there is a risk.

Brave the Elements is always cast asap and always with chosen color green (maybe it is the first color in the list).
Suggestion: Cast it only as reaction on enemy spells targetting AI creatures or in combat in DB phase (count the colors of the enemies attacking or blocking creatures, cast the spell and chose the color with the highest count; if the color is ambiguous, also count untapped lands to protect against possible removal or damage; if AI is blocking, then block with the intention to kill as many attackers as possible).

Where in the code is this targetting/blocking logic? I would like to take a look at it.
mark
 
Posts: 138
Joined: 28 Dec 2011, 11:32
Has thanked: 6 times
Been thanked: 11 times

Re: AI attacking and blocking Observations

Postby mark » 21 Mar 2012, 09:47

This is a difficult one:
AI targets itself when casting Wistful Thinking instead of me, which is mostly a bad idea, I guess. So if a card says draw X and discard Y, then AI should always target the player if Y > X.
At least in a discard deck this behaviour is essential; the only reason to target itself would be a positive effect on losing handcards, but I do not know a card with such an effect.

Further, it would be helpful if the AI knew the cards in it's library (not the order of them, just the effects) or else it will never be clever enough to play something like a discard deck, built around Megrim and Liliana's Caress and discard cards like Wistful Thinking, because the discard cards are played before Megrim or Liliana's Caress are on the battlefield and wasted that way.

Maybe it were a good idea to mark key cards or the strategic worth of cards in the dck files, to help the AI's strategy, e.g.
  • if no key card is in the first draw, then mulligan until only 3 cards are left or a key card has been drawn
  • if a card is playable that has a synergy with a key card, do not play it unless such a key card is on the battlefield.
mark
 
Posts: 138
Joined: 28 Dec 2011, 11:32
Has thanked: 6 times
Been thanked: 11 times

Re: AI attacking and blocking Observations

Postby mark » 22 Mar 2012, 09:18

AI attacks with Gravecrawler (2/1 creature) while Gideon's Avenger can block: GA becomes a 3/3 creature before DA phase because GC gets tapped in DA phase and kills GC.
-> Looks like AI does not predict the actions.
mark
 
Posts: 138
Joined: 28 Dec 2011, 11:32
Has thanked: 6 times
Been thanked: 11 times

Re: AI attacking and blocking Observations

Postby Chris H. » 22 Mar 2012, 23:25

mark wrote:Brave the Elements is always cast asap and always with chosen color green (maybe it is the first color in the list).
Suggestion: Cast it only as reaction on enemy spells targetting AI creatures or in combat in DB phase (count the colors of the enemies attacking or blocking creatures, cast the spell and chose the color with the highest count; if the color is ambiguous, also count untapped lands to protect against possible removal or damage; if AI is blocking, then block with the intention to kill as many attackers as possible).
`
Brave the Elements is implemented via script and looks like this:

Brave the Elements script | Open
Name:Brave the Elements
ManaCost:W
Types:Instant
Text:no text
A:SP$ ChooseColor | Cost$ W | Defined$ You | AILogic$ MostProminentAttackers | SubAbility$ DBProtection | SpellDescription$ Choose a color. White creatures you control gain protection from the chosen color until end of turn.
SVar:DBProtection:DB$ ProtectionAll | ValidCards$ Creature.White+YouCtrl | Gains$ ChosenColor
SVar:PlayMain1:TRUE
SVar:RemAIDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/brave_the_elements.jpg
SetInfo:ZEN|Uncommon|http://magiccards.info/scans/en/zen/4.jpg
Oracle:Choose a color. White creatures you control gain protection from the chosen color until end of turn.
End

`
I think that the code for the AF ability "ChooseColor" is located in the class:

src.main.java.forge.card.abilityfactory.AbilityFactoryChoose.java.
`
I think that I found the AI code for this decision:

Code: Select all
    else if (logic.equals("MostProminentAttackers")) {
        chosen = CardFactoryUtil.getMostProminentColor(AllZone.getCombat()
                .getAttackerList());
    }
}
if (chosen.equals("")) {
    chosen = Constant.Color.GREEN;
}
`
It looks like green is the default if getMostProminentColor fails to return a color.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: AI attacking and blocking Observations

Postby cc-drake » 24 Mar 2012, 20:30

I am on 7 and control an untapped 4/4 and 2 tapped 2/2.
AI is on 3 and controls a 13/13 and a 3/3 with trample.
AI doesn't attack. Not sure if AI doesn't consider trample or is afraid to die when I swing back.
cc-drake
 
Posts: 570
Joined: 14 Aug 2010, 07:15
Has thanked: 29 times
Been thanked: 6 times

Re: AI attacking and blocking Observations

Postby GproKaru » 25 Mar 2012, 06:50

I've noticed a few odd moves made by the AI.

The AI sometimes directly attacks my Stuffy Doll or pulls off other moves that would also either cause the AI damage by my stuffy doll even up to the point where they defeat themself.

Sometimes they send out troops to attack me on large scales even though majority of my creatures have deathtouch and can also survive the damage thrown their way, like the AI doesn't even know or care.
GproKaru
 
Posts: 3
Joined: 25 Mar 2012, 02:59
Has thanked: 0 time
Been thanked: 0 time

Re: AI attacking and blocking Observations

Postby mark » 25 Mar 2012, 12:05

Had a funny game: I played lots of elves against artifacts. AI had Platinum Angel on the battlefield (equipped up to 10/7). What then happened: In every turn I attacked with everything (beating the AI down to -500 life) and the AI blocked some of my creatures. Because of the Platinum Angel it does not matter how much damage below zero the AI gets but instead of finishing me off in two rounds with the only flying and very tough creature on the battlefield, the AI never attacked.
Then I played Viridian Shaman and targetted Platinum Angel...
Attachments
Platinumfail.png
mark
 
Posts: 138
Joined: 28 Dec 2011, 11:32
Has thanked: 6 times
Been thanked: 11 times

Re: AI attacking and blocking Observations

Postby Sloth » 25 Mar 2012, 16:59

cc-drake wrote:AI is on 9 Poison and attacks with his only creature even though I control a creature with Infect.
mark wrote:Had a funny game: I played lots of elves against artifacts. AI had Platinum Angel on the battlefield (equipped up to 10/7). What then happened: In every turn I attacked with everything (beating the AI down to -500 life) and the AI blocked some of my creatures. Because of the Platinum Angel it does not matter how much damage below zero the AI gets but instead of finishing me off in two rounds with the only flying and very tough creature on the battlefield, the AI never attacked.
Then I played Viridian Shaman and targetted Platinum Angel...
I've just improved AI's attack decisions by better predicting counterattacks. These situations should be handled better by the AI in the future. Thanks cc-drake and mark.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: AI attacking and blocking Observations

Postby Milod » 26 Mar 2012, 23:13

i had 1 creature 2/2 then its ai turn ai has 2 life points left with no creatures and around 5 lands it cast sword of war and peace and ended the turn while it could have cast day of judgement to kil my creature but honnestly i was not 100% sure if ai had enough white lands to cast it anyway iam pretty sure it had
Milod
 
Posts: 360
Joined: 20 Jul 2011, 08:57
Has thanked: 4 times
Been thanked: 5 times

Re: AI attacking and blocking Observations

Postby Milod » 30 Mar 2012, 22:31

example: i have 5 life points left and 2 taped creatures and 1 untaped creature its ai turn he has 2 creatures on field one 4/4 other 1/1 it uses oblivion ring on my stronger tapped creature instead of the untaped creature if it targeted the untaped creature it could have finished me
Milod
 
Posts: 360
Joined: 20 Jul 2011, 08:57
Has thanked: 4 times
Been thanked: 5 times

Re: AI attacking and blocking Observations

Postby Milod » 31 Mar 2012, 09:58

ai doesent react on fog or clinging mist it stil enters its battle step even if it knows i activated fog bevore the battle begins
Milod
 
Posts: 360
Joined: 20 Jul 2011, 08:57
Has thanked: 4 times
Been thanked: 5 times

Re: AI attacking and blocking Observations

Postby Milod » 31 Mar 2012, 13:38

ai ignores skinshifters ability while it knows that i can pay mana for skinshifters ability and wastes his creatures
Milod
 
Posts: 360
Joined: 20 Jul 2011, 08:57
Has thanked: 4 times
Been thanked: 5 times

PreviousNext

Return to Forge

Who is online

Users browsing this forum: No registered users and 27 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 27 users online :: 0 registered, 0 hidden and 27 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 27 guests

Login Form