It is currently 17 Nov 2018, 15:00
   
Text Size

AI playing lands - 2 colour Gold cards

Discuss Upcoming Releases, Coding New Cards, Etc.
PLEASE DO NOT REPORT BUGS HERE!

Moderators: drool66, stassy, BAgate, gmzombie, Aswan jaguar, CCGHQ Admins

AI playing lands - 2 colour Gold cards

Postby Aswan jaguar » 30 May 2017, 19:37

If AI has a spell to cast on first turn then it will play the land that produces the mana to play the spell.
But if AI doesn't have to play anything with the 1st land drop then the combination with the 2nd land drop seems to affect AI and gold spells.More easily observed with 2 different mana gold spells like Deft Duelist and Watchwolf for instance.

AI when speculating gold cards in hand especially the 2 different mana colour cards:
I noticed that AI will not put the correct land in 2nd turn in play to cast the gold spell even if that is the only spell that can be cast from AI's hand! In my tests the cards were creatures not enchantments for instance that AI doesn't evaluate too much so that's out.
e.g AI has in play an Island and in hand 2 Mirran Spy, Corrupted Conscience, Deft Duelist, Mirran Spy, Razorfield Rhino, a Plains, and draws an Island.AI will play the Island although Deft Duelist is the only card it can cast.AI will even play the Island if you debug all cards out of AI's hand and leave the Plains, the Island and the Deft Duelist!

I tested more and it seems that AI will play lands with the order of their code: Swamp - Island - Forest - Mountain - Plains if there is nothing that AI can cast with the next land drop in 1st turn.In 2nd turn AI will play lands with the order of their code: Swamp - Island - Forest - Mountain - Plains even if a gold card can be cast by choosing a different land than the order of lands dictates to play.

So it seems that AI has problem to calculate the 2nd coloured mana in a cards cost(and probably 3nd,4th,..coloured mana).

With 2 different colour gold cards AI usually will get the correct land play in the 3nd turn to cast them.

AI also doesn't check if the land it will play produces mana of cards that AI has in hand and/or in deck to prioritise those if the land it will play will not result in playing a spell that turn.
e.g AI has White Knight, Plains, Plains, Plains, Island, Island, Island and it is the first turn.AI will play the Island.
e.g AI has White Knight, Plains, Plains, Plains, Swamp, Swamp, Swamp and it is the first turn.AI will play the Swamp even if there are no black spells not only in AI's hand but also neither in AI's library.
---
Just playtesting.
User avatar
Aswan jaguar
Super Tester
 
Posts: 5805
Joined: 13 May 2010, 12:17
Has thanked: 520 times
Been thanked: 274 times

Re: AI playing lands - 2 colour Gold cards

Postby Korath » 31 May 2017, 03:13

The behavior with gold cards doesn't surprise me a bit - the function in Magic.exe looks unchanged from what I found in Shandalar.exe, so is unchanged from before gold cards were implemented; with just an Island on the bf and Deft Duelist, Plains, and Island in hand, it'll see only that it needs one more colored mana to cast a w/u card, and so think that either land would be acceptable.

The behavior with White Knight (which I confirm), though, is more perplexing. My reading of the decompiled code is that it should see that it's not within one mana of casting anything, has only white cards in its hand, and doesn't need generic mana; so it should only be considering playing the Plains. I'll take a closer look to see if I can't figure out what's really going on.
User avatar
Korath
DEVELOPER
 
Posts: 3345
Joined: 02 Jun 2013, 05:57
Has thanked: 481 times
Been thanked: 917 times


Return to Development

Who is online

Users browsing this forum: No registered users and 3 guests


Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 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 3 guests

Login Form