It is currently 23 Apr 2017, 11:51
   
Text Size

AI attacking and blocking Observations

Moderators: timmermac, moomarc, Chris H., DennisBergkamp, Rob Cashwalker, friarsol, CCGHQ Admins

AI attacking and blocking Observations

Postby Chris H. » 07 Dec 2010, 00:32

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
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 Almost_Clever » 07 Dec 2010, 04:19

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: ?
A woman came up to me and said / "I'd like to poison your mind / With wrong ideas that appeal to you / Though I am not unkind."
User avatar
Almost_Clever
Tester
 
Posts: 345
Joined: 15 Jan 2009, 01:46
Has thanked: 0 time
Been thanked: 0 time

Re: AI attacking and blocking Observations

Postby Chris H. » 07 Dec 2010, 11:11

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.
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 Rob Cashwalker » 07 Dec 2010, 13:34

Chris, almost by definition, if the AI makes good attacks and blocks, THAT IS STRANGE..... ;-)
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: AI attacking and blocking Observations

Postby Dracontes » 07 Dec 2010, 17:49

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.
User avatar
Dracontes
 
Posts: 24
Joined: 29 Nov 2010, 17:51
Has thanked: 0 time
Been thanked: 0 time

Re: AI attacking and blocking Observations

Postby Jaedayr » 07 Dec 2010, 21:19

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.
Jaedayr
Tester
 
Posts: 522
Joined: 08 Jul 2010, 00:06
Has thanked: 16 times
Been thanked: 13 times

Re: AI attacking and blocking Observations

Postby Jaedayr » 07 Dec 2010, 21:48

Death by Stuffy Doll. Computer with 6 life attacked with a 6/6 Sturdy Hatchling into my Stuffy Doll and died.
Jaedayr
Tester
 
Posts: 522
Joined: 08 Jul 2010, 00:06
Has thanked: 16 times
Been thanked: 13 times

Re: AI attacking and blocking Observations

Postby Jaedayr » 10 Dec 2010, 19:42

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.
Jaedayr
Tester
 
Posts: 522
Joined: 08 Jul 2010, 00:06
Has thanked: 16 times
Been thanked: 13 times

Re: AI attacking and blocking Observations

Postby Chris H. » 10 Dec 2010, 21:49

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
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 friarsol » 10 Dec 2010, 21:55

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.
friarsol
Global Moderator
 
Posts: 7023
Joined: 15 May 2010, 04:20
Has thanked: 224 times
Been thanked: 829 times

Re: AI attacking and blocking Observations

Postby Chris H. » 10 Dec 2010, 22:12

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.
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 Chris H. » 11 Dec 2010, 14:43

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.
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 Sloth » 11 Dec 2010, 15:03

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.
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 SoulStorm » 12 Dec 2010, 04:40

: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.
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: AI attacking and blocking Observations

Postby Sloth » 12 Dec 2010, 09:25

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.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Next

Return to Forge

Who is online

Users browsing this forum: No registered users and 15 guests


Who is online

In total there are 15 users online :: 0 registered, 0 hidden and 15 guests (based on users active over the past 10 minutes)
Most users ever online was 279 on 11 Jul 2013, 22:03

Users browsing this forum: No registered users and 15 guests

Login Form