Page 1 of 41

AI attacking and blocking Observations

PostPosted: 07 Dec 2010, 00:32
by Chris H.
Recently, some changes were made to the AI's attacking and blocking code routines. If you notice anything, please post your observations in this topic. The next version of forge (after Forge 11-30) will have additional changes and we would like some input from the user base. The next version will most likely be released December 11 or 12.

Thank you. :D

Re: AI attacking and blocking Observations

PostPosted: 07 Dec 2010, 04:19
by Almost_Clever
I see that the AI now will attack with a single creature that is guaranteed to be destroyed without accomplishing anything. For example, I controlled an untapped Giant Spider and the AI attacked my Garruk Wildspeaker with a Veteran Armorer. I've seen quite a few time where the AI just threw away creatures for no gain when it did not involve anything tricky (such as flanking, first strike, pumping, etc). Perhaps the AI is attempting to bluff :wink: ?

Re: AI attacking and blocking Observations

PostPosted: 07 Dec 2010, 11:11
by Chris H.
The original code used by the AI did not consider first strike, flanking, deathtouch, etc. Some time has been spent trying to improve the old code. It looks like there is a combat type bug with the 11-30 beta that is now fixed on our SVN.

We will release a new beta in a few days and it will contain the combat bug fix and new code which should help the AI make better attacking/blocking decisions. This new code will need a good testing by our user base and we would like to hear about anything that looks strange.

Re: AI attacking and blocking Observations

PostPosted: 07 Dec 2010, 13:34
by Rob Cashwalker
Chris, almost by definition, if the AI makes good attacks and blocks, THAT IS STRANGE..... ;-)

Re: AI attacking and blocking Observations

PostPosted: 07 Dec 2010, 17:49
by Dracontes
I guess this should go here... Mind you that my version of Forge is the original 11-30 beta.

The seeming bluff of the AI when attacking comes about when the human is at a low life total and the AI completely ignores what's on the human's side of the battlefield. In the more recent case I, at 6 life, had more than enough Angel tokens perfectly able to block on the battlefield and the AI, at 12 life, insisted in attacking with the single Dragonspeaker Shaman it had.

Re: AI attacking and blocking Observations

PostPosted: 07 Dec 2010, 21:19
by Jaedayr
I just attacked with a 9/10 trample creature and a ordinary 3/3 creature with the computer having 9 life and me having around 50 :D . The computer had four creatures easily able to kill the 9/10. It blocked with only a 3/3, and did not block my 3/3 at all so the direct and trample damage killed it.

Re: AI attacking and blocking Observations

PostPosted: 07 Dec 2010, 21:48
by Jaedayr
Death by Stuffy Doll. Computer with 6 life attacked with a 6/6 Sturdy Hatchling into my Stuffy Doll and died.

Re: AI attacking and blocking Observations

PostPosted: 10 Dec 2010, 19:42
by Jaedayr
AI seems to only cast Threaten during Main2 Phase recently, instead of Main1, although it did grab my Stuffy Doll and activate it. I wasn't paying good attention but I thought it still took damage instead of me. Not completely sure about that.

In my current game I have 5 life and AI has 6. I have no fliers and the AI has Talas Scout, Talas Scout, Cloud Pirates and Talas Air Ship but does not attack. I do have enough to kill the AI but if the AI would attack the game would be over.

Re: AI attacking and blocking Observations

PostPosted: 10 Dec 2010, 21:49
by Chris H.
Jaedayr wrote:AI seems to only cast Threaten during Main2 Phase recently, instead of Main1, although it did grab my Stuffy Doll and activate it. I wasn't paying good attention but I thought it still took damage instead of me. Not completely sure about that.
`
The card txt file for Threaten includes a "SVar:PlayMain1:True" and yet this is being ignored. Threaten uses one of the new AbilityFActories and other AF cards may have a similar problem.

Code: Select all
Name:Threaten
ManaCost:2 R
Types:Sorcery
Text:no text
A:SP$GainControl|Cost$2 R|Tgt$TgtC|LoseControl$EOT|Untap$True|AddKWs$Haste|SpellDescription$Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn.
SVar:PlayMain1:True
SVar:Rarity:Uncommon
SVar:Picture:http://resources.wizards.com/magic/cards/9ed/en-us/card83472.jpg
SetInfo:ONS|Uncommon|http://magiccards.info/scans/en/on/241.jpg
SetInfo:9ED|Uncommon|http://magiccards.info/scans/en/9e/223.jpg
SetInfo:10E|Uncommon|http://magiccards.info/scans/en/10e/242.jpg
End

Re: AI attacking and blocking Observations

PostPosted: 10 Dec 2010, 21:55
by friarsol
I think the problem is PlayMain1 doesn't mean "only play this during Main1" it means "you can play this during Main1" (that is to say, don't play cards without 'PlayMain1' in Main1)

It doesn't add any restrictions to Main2. I don't think this is a general problem with AFs. It might be a problem with that specific AF.

Re: AI attacking and blocking Observations

PostPosted: 10 Dec 2010, 22:12
by Chris H.
friarsol wrote:I think the problem is PlayMain1 doesn't mean "only play this during Main1" it means "you can play this during Main1" (that is to say, don't play cards without 'PlayMain1' in Main1)

It doesn't add any restrictions to Main2. I don't think this is a general problem with AFs. It might be a problem with that specific AF.
`
I seem to remember some code which creates a list of cards for the computer to consider casting. I think that the main1 SVar just adds these cards to the list if it is main1. Without the SVar, these cards would be added only in main2 I guess.

I can not remember all of the details. I think that Rob and Sloth for the most part handled this part of the project.

Re: AI attacking and blocking Observations

PostPosted: 11 Dec 2010, 14:43
by Chris H.
I uploaded the forge 12-11-2010 beta. This beta comes with changes to the AI attacking/blocking code. People should update their local copy of Forge and give it a good test.

Using this new beta and future betas we would like to hear about strange and stupid decisions made by the computer. On this topic we are looking for non-technical responses.

Re: AI attacking and blocking Observations

PostPosted: 11 Dec 2010, 15:03
by Sloth
The blocking code was rewritten completely, the attacking was mostly only fixed (the last beta had a mayor bug).

So I'm mostly interested at:

1. Does the AI make bad blocks (trading a better creature with a bad one), even though it's life is not in danger?

2. Does the AI block with everything to stop an otherwise deadly attack?

3. Does the AI make illegal blocks?

Do post other observations or suggestions that might be helpful to improve the combat AI. I don't know if I have the time to make a rewrite of the attacking AI in the near future with christmas and everything coming up.

Re: AI attacking and blocking Observations

PostPosted: 12 Dec 2010, 04:40
by SoulStorm
:Cho-Manno, Revolutionary attacked and was blocked by my Plant Wall w/ deathtouch. Cho-Manno, Revolutionary was sent to the graveyard following the attack which shouldn't have happened. Since the damage was prevented, deathtouch doesn't apply. The same would be true for wither. This problem has been around for a long time now, so I assume the team is aware, but a reminder never hurts.

Edit

Apparently damage prevention (at least during combat) isn't working at all, because my Archon of Justice just blocked Swans of Bryn Argoll and sent it to the graveyard.

Re: AI attacking and blocking Observations

PostPosted: 12 Dec 2010, 09:25
by Sloth
SoulStorm wrote::Cho-Manno, Revolutionary attacked and was blocked by my Plant Wall w/ deathtouch. Cho-Manno, Revolutionary was sent to the graveyard following the attack which shouldn't have happened. Since the damage was prevented, deathtouch doesn't apply. The same would be true for wither. This problem has been around for a long time now, so I assume the team is aware, but a reminder never hurts.

Edit

Apparently damage prevention (at least during combat) isn't working at all, because my Archon of Justice just blocked Swans of Bryn Argoll and sent it to the graveyard.
This was posted in the bug forum and is fixed already. In the beta damage prevention does not work for combat damage dealt to creatures. Sorry for the inconvenience.