Ai deck builders

All created AI or player decks. All discussion related to Wagic AI deck competion and results.
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: Ai deck builders

Post by Zethfox »

not necessarily, i intend on adding casting from different zones such as exile and graveyard. when i add code i make it generic enough and plan ahead enough to allow expending the code later with ease. basically what i submit to the svn and what i plan on working on are about a whole version apart :P
excessum
Posts: 220
Joined: Wed Jan 16, 2013 5:03 am
Contact:

Re: Ai deck builders

Post by excessum »

The restriction{morbid} is working fine! Together with until(creature|opponentbattlefield), the AI can now be taught to use sacrifice cards like Devour Flesh as well as the Morbid ability of Tragic Slip.

Here is the example of {x} cost in totalmananeeded not working as intended:

Code: Select all

#HINT:combo hold(Immortal Servitude|myhand)^until(creature[manacost=1]|mygraveyard)^cast(Immortal Servitude|myhand)^restriction{type(creature[manacost=1]|mygraveyard)~morethan~3}^totalmananeeded({B}{B}{B}{1})

Avacyn's Pilgrim * 4
Boros Elite * 4
Birds of Paradise * 4
Buried Alive * 4
Immortal Servitude * 4

Swamp * 10
The AI will empty its mana pool for Immortal Servitude once 4+ creatures is in the graveyard. This shows that the restriction{} and hint in general is working, just the {x} for the cost. I tried a similar test with White Sun's Zenith and the AI will also happily dump all its mana for the {x}.
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: Ai deck builders

Post by Zethfox »

I didn't add any specific method for x in a hint. this is a method for telling ai to cast a series of cards or to tell it to hold something until its the right time. it's not a method to teach it an ability, that's what we call workarounds. if there is a problem with the way ai plays a card, or chooses not to play one. that case needs to be mentioned in the ai request for knowledge thread. not corrected with combo system.
excessum
Posts: 220
Joined: Wed Jan 16, 2013 5:03 am
Contact:

Re: Ai deck builders

Post by excessum »

Many of the ideas I am getting for the combohints are workarounds to the weaknesses of the AI at the moment (spamming global enchantments, spamming burns, spamming sweepers, etc.). Most of these hints (check creatures before sacrifice, check hand before discard and other duh moments) should probably be hard-coded into the AI proper with perhaps a random fail-to-obey chance to make it less predictable.

Quite a number of these workarounds are actually scripts to make the AI play complicated abilities like the morbid-trigger for Tragic Slip or the specific targeting of cards like Pernicious Deed and Immortal Servitude. I seriously doubt that it is possible for the parser to understand them AND for the AI to evaluate the board to actually use them.
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: Ai deck builders

Post by Zethfox »

I understand what you're saying but what will happen is others will automatically assume that this is what the system is for and its not. It's ok if a deck needs a card taught like this, but when every single use of the system is this, kind of defeated the whole purpose of the hours I invested in it.

Cast dark ritual to cast big monster, then enchant big monster with super aura. when the opponent has 2 creatures in play. this was my thought process. not check for a creature in graves before casting a reanimated. that is just something ai should already be doing.
excessum
Posts: 220
Joined: Wed Jan 16, 2013 5:03 am
Contact:

Re: Ai deck builders

Post by excessum »

Does restriction{} work for turn phases such as restriction{opponentendofturn}? It will be useful for setting up flash/instant spam before a fatal attack on the next player turn.

Another question: If two or more valid combos are available, how does the AI decide which to use? Is there a priority for them such as the earlier combohint takes precedence?

Code: Select all

myhand:Priest of Urabrask,Infernal Plunge,Through the Breach,Utvara Hellkite
manapool:{2}{R}

#HINT:combo hold(Priest of Urabrask|myhand)^until(Infernal Plunge|myhand)^cast(Priest of Urabrask|myhand)^cast(Infernal Plunge|myhand) targeting(Priest of Urabrask|mybattlefield)^totalmananeeded({2}{R})
#HINT:combo hold(Infernal Plunge|myhand)^until(Through the Breach|myhand)^until(Utvara Hellkite|myhand)^until(creature|mybattlefield)^cast(Infernal Plunge|myhand)^cast(Through the Breach|myhand) targeting(Utvara Hellkite|myhand)^totalmananeeded({2}{R})
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: Ai deck builders

Post by Zethfox »

the last one in is the first one considered.

combo1
combo2
combo3 <---this one is the one it would try to do first if all cards were the same in previous combos.
yes all restriction= and restriction{ found in primitves can be used in this one.
excessum
Posts: 220
Joined: Wed Jan 16, 2013 5:03 am
Contact:

Re: Ai deck builders

Post by excessum »

How does the syntax for targeting() work for multiple target spells like Buried Alive? I suppose it is not possible to select targets for Storm-copies like Gutshot or Dragonstorm other than the original spell?
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: Ai deck builders

Post by Zethfox »

not its only for single target cards for now.
excessum
Posts: 220
Joined: Wed Jan 16, 2013 5:03 am
Contact:

Re: Ai deck builders

Post by excessum »

Does the combohint syntax support wildcards or variables like <opponentlife> or {x} in the selections? For the mana engine combos, it will save a lot of hassle not to have to type restriction{opponentlife=x} and the respective totalmananeeded({x}) for each possible value of x for instant kills.

Alternatively, something like a combo macro to separate the mana generation part and the kill condition will be convenient.
#HINT:combo blah... to generate {x} mana (mana combo)
#HINT:combo blah... to kill^restriction{mana combo}
#HINT:combo blah... to kill2^restriction{mana combo}
#HINT:combo blah... to kill3^restriction{mana combo}
Locked