It is currently 28 Apr 2024, 23:50
   
Text Size

Card AI (Improvements) Requests

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

Re: Card AI (Improvements) Requests

Postby Agetian » 06 Sep 2014, 18:10

The AI will happily waste all its equipment on a card that can neither attack nor block due to e.g. Arrest. A typical case: the AI has Inkfathom Infiltrator and two equipments in play (in my case it was Whispersilk Cloak and Kitesail). I cast Arrest on the opponent's Inkfathom Infiltrator. The next turn the AI still attaches both Whispersilk Cloak and Kitesail to its useless creature, *after* which (in Main 2) it casts another creature that is a much better candidate for the equipments.

EDIT: r27234: Added an experimental improvement that is aimed at getting rid of corner cases in which the AI mistakenly selects a useless creature (a tapped+non-untapping one, or one that can neither attack nor block) as a target for equipment (typically when it's the only creature on the board). I tested it in some broader cases (e.g. a high-CMC but Arrest'ed creature and a low-CMC creature on the table; the AI correctly picks the low-CMC but active one) and it looks like it works fine, but feel free to improve/comment if you have any concerns about this change.

- Agetian
Last edited by Agetian on 07 Sep 2014, 06:12, edited 1 time in total.
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

Re: Card AI (Improvements) Requests

Postby lujo » 06 Sep 2014, 19:53

Possibly easy to fix: The AI will often try to block a card which it has used Maze of Ith on, wihch makes no sense, and is unnecessary as that creature by default deals or recieves no damage. This comes up in The Dark drafts more often than one would think.

------------------------------------

Another thing is that the Ai doesn't seem to grasp banding at all, and since it's everywhere in the older drafting formats it's kind of broken. If you want it to make a proper calculation for blocking purposes it:

Total power in a band = damage monster will recieve
Guaranteed trade for anything at all = total toughness in a band - number of people in a band (all will be redirected, but something should die).

This is excluding combat tricks and abilities, but it alone should make it much better at dealing with it. I'm really not sure it's counting it right as it is.

-------------------------------------

Another thing that the AI doesn't pay attention to is Deathtouch. I attacked with 3 guys, all with 2 power, 2 of which it could kill and 1 which it couldn't but it had deathtouch - and it blocked the the deathtouch guy for no reason.
---

My Shandalar deck pack folder is avaliable here:Dropbox
Leave feedback on particular decks here: Google doc
Ask for instructions, give feedback and complaints here: Thread
User avatar
lujo
 
Posts: 557
Joined: 20 Nov 2013, 13:17
Has thanked: 224 times
Been thanked: 70 times

Re: Card AI (Improvements) Requests

Postby kestell » 07 Sep 2014, 13:38

homicidal seclusion

The AI drops creatures even though he has the game in control with one creature.

Evernight shade.

AI sits behind 6 untapped swamps, not attacking into a 2/4 flying, lifelink and a 2/1 flying that can prevent damage ( which could explain it, except he is attacking with other creatures into that same creature )

also he is on 18 life, so blocking isn't the issue. he has 1 card in hand, which he didn't play post combat.
kestell
 
Posts: 70
Joined: 04 Oct 2013, 12:03
Has thanked: 5 times
Been thanked: 0 time

Re: Card AI (Improvements) Requests

Postby lujo » 07 Sep 2014, 18:05

Another question, there's probably reasonable answers for this, but what is exactly the problem with the AI being crazy with repeatable activated ability spam?

I can imagine quite a few reasons, but the way things are it's so unreasonable with repeatable activations of insignificant stuff that simply having them in their deck is often autoloss for it. It's essentially blowing all it's mana with 0 gain. More concretely

- It pumps creatures which aren't in any danger
- It pumps creatures which can't enter combat to make use of the increased stats
- It adds combat relevant abilities to creatures with no hope of entering combat (first strike but most other things too).
- It seems to prioritize activating abilities with effects which expire at end of turn instead of putting more dudes on the board
- It even fails to take into account activated ability combat tricks, the Cow deck for examply won't attack with 2 2/3 dudes into a 3/3 dude even though it has a tap:+1/+1 pumper on the board, skipping the attack when that is clearly the only non-sensible option.

Would it at be possible to limit certain sort of ability use to certain combat phases or situations where the creature is targeted / in danger? How about setting it's priorities to leave mana open for stuff it has in hand?

It's probably work and stuff, but too many cards are strictly worse than unusable for the AI right now.
---

My Shandalar deck pack folder is avaliable here:Dropbox
Leave feedback on particular decks here: Google doc
Ask for instructions, give feedback and complaints here: Thread
User avatar
lujo
 
Posts: 557
Joined: 20 Nov 2013, 13:17
Has thanked: 224 times
Been thanked: 70 times

Re: Card AI (Improvements) Requests

Postby friarsol » 09 Sep 2014, 00:12

The AI activates Tariel, Reckoner of Souls without any creatures in the graveyard.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card AI (Improvements) Requests

Postby Agetian » 09 Sep 2014, 04:12

lujo wrote:Another question, there's probably reasonable answers for this, but what is exactly the problem with the AI being crazy with repeatable activated ability spam?
I can imagine quite a few reasons, but the way things are it's so unreasonable with repeatable activations of insignificant stuff that simply having them in their deck is often autoloss for it. It's essentially blowing all it's mana with 0 gain. More concretely: <...>
lujo wrote:Would it at be possible to limit certain sort of ability use to certain combat phases or situations where the creature is targeted / in danger? How about setting it's priorities to leave mana open for stuff it has in hand?
Yes, this is a problem that has caught my attention recently too. I'm not sure which version you're using (whether it's the latest beta or the latest snapshot), but I tried to do my best to introduce some changes in post-1.5.25 builds that will hopefully partly remedy at least some of the issues you mentioned. In particular, there will be some predictive analysis now related to pumps that allows the AI to reserve mana for a future spell (e.g. when evaluating whether to pump a creature or not the AI can decide to save some untapped mana sources to cast a spell later in Main phase 2); also, the AI will at least consider pumping creatures that it's attacking with and that will not be blocked so that there won't be the "attack with a non-blocked pumpable 0/1, but don't pump it" kind of stupidity. However, these changes will not prevent the AI from doing other stupid things that you mentioned in your list.

Sadly, I'm no expert at coding AIs, but hopefully the pump AI will be further improved later to make it perform smarter actions. Maybe Sloth will be able to do something to improve the situation when he is back from vacation. I'll also take a look at what else I can do without breaking the whole system, if anything. :)

- Agetian
Last edited by Agetian on 09 Sep 2014, 16:46, edited 1 time in total.
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

Re: Card AI (Improvements) Requests

Postby lujo » 09 Sep 2014, 16:32

^ Certainly good to hear, any improvement in this area would be welcome. I'm using a 1.5.25 build, not sure which one, and also not sure where to get the latest one.

I'm also interested in helping out with at least coming up with a decent banding use for the AI, since it's kind of a core feature in older sets, and not being able to use it or deal with it properly is kinda gimping the AI in drafts with give a lot of rewards if you win.
---

My Shandalar deck pack folder is avaliable here:Dropbox
Leave feedback on particular decks here: Google doc
Ask for instructions, give feedback and complaints here: Thread
User avatar
lujo
 
Posts: 557
Joined: 20 Nov 2013, 13:17
Has thanked: 224 times
Been thanked: 70 times

Re: Card AI (Improvements) Requests

Postby lujo » 09 Sep 2014, 21:42

Also, a few more terminaly stupid ways the AI messes up with counterproductive activations (noting them because someone is one day probably be doing something about it):

- Kamigawa Genju cards (like Genju of the Fens):
- the AI will activate the ability even if it causes it to tap the land in the process
- the AI will also prioritize it instead of developing the board which ties up it's mana in the crucial early turns (it's almost like free time walks).

- Cards which can "level up" - it prioritizes leveling them up instead of developing the board (even when it could do both in moderation) which also turns into free time walks for the human
---

My Shandalar deck pack folder is avaliable here:Dropbox
Leave feedback on particular decks here: Google doc
Ask for instructions, give feedback and complaints here: Thread
User avatar
lujo
 
Posts: 557
Joined: 20 Nov 2013, 13:17
Has thanked: 224 times
Been thanked: 70 times

Re: Card AI (Improvements) Requests

Postby lujo » 09 Sep 2014, 22:05

And also, unrelated:

- Matsu-Tribe Sniper , the AI isn't using it. It should be using it on the opponents turn before combat on the biggest flier the opponent has / can attack with. It's a pretty high pick in Kamigawa draft, and not using it just lost an AI an otherwise won game.

- The timing of Ghost Warden pump is also insane, the AI pumps creatures which have been tapped by a tapper and can't possibly attack.

- Also, the AI builds 2 color decks in invasion block draft, but it casts volvers as soon as possible (and the whole point of them is to cast them with kickers, see Rakavolver). So it picks them with hight priority and wastes them completely.

- Mantis Engine (but other things as well) get their non-stacking abilities activated a million times. Even if they've been tapped before attack. Might've been fixed in a more recent build, but just putting it out there.

- Kicker as an ability really ought to have a hidden sub clause which would prevent the AI from casting certain cards without kicker except if in serious danger. Faerie Squadron and a few others from the Invasion block really need this applied to them on a case-by-case basis, as if you're not paying their kicker they're total dead weight in a draft deck, and if you are they're legit limited bombs. (Which means if this isn't applied, both the draft AND play is messed up).

List:

Duskwalker, Faerie Squadron, Desolation Giant, Desolation Angel, Dralnu's Pet, Emblazoned Golem, all 5 volvers (Ana, Ceta, Dega, Raka, Necra - at least one kicker), all ***scape battlemages ( least 1 kicker), at least a few emissaries, Skizzik (tricky, but casting it w/o kicker if he has another mana in hand is probably the worse option in limited), and Vodalian Serpent. Others are kinda fine either way, these are critial, at least as far Invasion block goes.
---

My Shandalar deck pack folder is avaliable here:Dropbox
Leave feedback on particular decks here: Google doc
Ask for instructions, give feedback and complaints here: Thread
User avatar
lujo
 
Posts: 557
Joined: 20 Nov 2013, 13:17
Has thanked: 224 times
Been thanked: 70 times

Re: Card AI (Improvements) Requests

Postby RichardHawk » 11 Sep 2014, 18:35

AI targeted itself with Fatigue for no particular reason.

AI plays Molting Harpy on turn one.

AI plays Dark Triumph's alternative cost with one creature on board.
RichardHawk
 
Posts: 31
Joined: 24 Mar 2014, 04:12
Has thanked: 2 times
Been thanked: 0 time

Re: Card AI (Improvements) Requests

Postby excessum » 13 Sep 2014, 11:28

lujo wrote:Another question, there's probably reasonable answers for this, but what is exactly the problem with the AI being crazy with repeatable activated ability spam?

I can imagine quite a few reasons, but the way things are it's so unreasonable with repeatable activations of insignificant stuff that simply having them in their deck is often autoloss for it. It's essentially blowing all it's mana with 0 gain. More concretely

- It pumps creatures which aren't in any danger
- It pumps creatures which can't enter combat to make use of the increased stats
- It adds combat relevant abilities to creatures with no hope of entering combat (first strike but most other things too).
- It seems to prioritize activating abilities with effects which expire at end of turn instead of putting more dudes on the board
- It even fails to take into account activated ability combat tricks, the Cow deck for examply won't attack with 2 2/3 dudes into a 3/3 dude even though it has a tap:+1/+1 pumper on the board, skipping the attack when that is clearly the only non-sensible option.

Would it at be possible to limit certain sort of ability use to certain combat phases or situations where the creature is targeted / in danger? How about setting it's priorities to leave mana open for stuff it has in hand?

It's probably work and stuff, but too many cards are strictly worse than unusable for the AI right now.
Agetian wrote:Yes, this is a problem that has caught my attention recently too. I'm not sure which version you're using (whether it's the latest beta or the latest snapshot), but I tried to do my best to introduce some changes in post-1.5.25 builds that will hopefully partly remedy at least some of the issues you mentioned. In particular, there will be some predictive analysis now related to pumps that allows the AI to reserve mana for a future spell (e.g. when evaluating whether to pump a creature or not the AI can decide to save some untapped mana sources to cast a spell later in Main phase 2); also, the AI will at least consider pumping creatures that it's attacking with and that will not be blocked so that there won't be the "attack with a non-blocked pumpable 0/1, but don't pump it" kind of stupidity. However, these changes will not prevent the AI from doing other stupid things that you mentioned in your list.

Sadly, I'm no expert at coding AIs, but hopefully the pump AI will be further improved later to make it perform smarter actions. Maybe Sloth will be able to do something to improve the situation when he is back from vacation. I'll also take a look at what else I can do without breaking the whole system, if anything. :)

- Agetian
When describing AI bugs it would be preferable if you can provide a game state (see http://www.slightlymagic.net/wiki/Forge_DevMode) so that the exact circumstances can be reproduced. Given the sheer number of variables involved, reporting that sometimes the AI does this or that with this or that without the full picture is not very useful.

With regard to the specific issue of the AI repeatedly pumping to gain abilities, I managed to replicate this for AEtherling where the AI activates unblockable for no reason. This is due to "pumpedDmg > c.getBaseAttack()" in line 587 of PumpAiBase. One of the hidden gotchas of ComputerUtilCombat.damageIfUnblocked() is that it implicitly adds attack/defence bonuses from other abilities so the above comparison is always true . Replacing it c.getBaseAttack() with "dmg" will prevent this but the additions from r27158-9 will be invalidated. I have not personally encountered the other examples of spamming pumps so without an example there really is nothing to do here.
excessum
 
Posts: 177
Joined: 21 Oct 2013, 02:30
Has thanked: 0 time
Been thanked: 19 times

Re: Card AI (Improvements) Requests

Postby lujo » 13 Sep 2014, 12:18

Ok, I will try to make my reports more helpful in the future.

A short one I've noticed of the unhelpful kind - the AI, when using the Easy Quest Morph deck (doc Holliday) keeps casting Thelonite Hermit non-morphed (which sort of makes it completely useless). Not sure if easy AI or just a blunder, because it keeps casting stuff with marginal morph benefits as morphs.
---

My Shandalar deck pack folder is avaliable here:Dropbox
Leave feedback on particular decks here: Google doc
Ask for instructions, give feedback and complaints here: Thread
User avatar
lujo
 
Posts: 557
Joined: 20 Nov 2013, 13:17
Has thanked: 224 times
Been thanked: 70 times

Re: Card AI (Improvements) Requests

Postby Pux » 13 Sep 2014, 19:41

The AI will double-block Inferno Elemental even though all creatures blocking it will die before assigning any damage.
Pux
 
Posts: 99
Joined: 12 Feb 2013, 13:48
Has thanked: 12 times
Been thanked: 6 times

Re: Card AI (Improvements) Requests

Postby Agetian » 13 Sep 2014, 19:56

excessum wrote:With regard to the specific issue of the AI repeatedly pumping to gain abilities, I managed to replicate this for AEtherling where the AI activates unblockable for no reason. This is due to "pumpedDmg > c.getBaseAttack()" in line 587 of PumpAiBase. One of the hidden gotchas of ComputerUtilCombat.damageIfUnblocked() is that it implicitly adds attack/defence bonuses from other abilities so the above comparison is always true . Replacing it c.getBaseAttack() with "dmg" will prevent this but the additions from r27158-9 will be invalidated. I have not personally encountered the other examples of spamming pumps so without an example there really is nothing to do here.
Yeah I was trying to find some kind of an optimal solution to this but was yet unable to devise one - either the AI "underpumps" (as in "refrains from pumping at all while attacking with e.g. pumpable 0/1s", or it "overpumps" (and sometimes gets to spam useless abilities). For now the latter is kind of partly limited by the fact that the AI tries to reserve mana for a future spell, so at least it hopefully won't spam all its mana when it needs some, but obviously some kind of a better solution will be necessary here (such that the AI can tell the difference between actually useful, e.g. power-buffing, pumps that will allow it to deal more damage, and the "non-stacking" ability pumps (first strike, unblockable etc.) that only make sense if the creature doesn't have this ability on it yet. Sadly, I haven't found a way to implement that yet. If anybody knows how to make this better, please assist.

- Agetian
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

Re: Card AI (Improvements) Requests

Postby Fizanko » 13 Sep 2014, 20:01

While playing vs the Beast AI , at some point it played Frost Giant (that has Rampage 2) and attached to it a Nemesis Mask .
That in itself is very smart play considering on my side i have 8 creatures deployed (most of them from the AI playing Mercy Killing on my Wild Celebrants and giving me plenty of 1/1 elf warrior tokens)

So if Frost Giant attack, it will force all my creatures to block it (as all are able to block), and would get get a +14/+14 (as it get +2/+2 for each blocked attacker beyond the 1st if i understand well rampage), meaning i wouldn't be able to kill it and it could easily wipe the floor with everything i have currently deployed, making my side of the battlefield empty.

The problem is that the AI hasn't attacked with Frost Giant in the 2 rounds it could have after he got the Nemesis Mask and as a result i won 2 turns later as i had numbers on my side by then.
probably outdated by now so you should avoid : Innistrad world for Forge (updated 17/11/2014)
Duel Decks for Forge - Forge custom decks (updated 25/10/2014)
User avatar
Fizanko
Tester
 
Posts: 780
Joined: 07 Feb 2014, 11:24
Has thanked: 155 times
Been thanked: 94 times

PreviousNext

Return to Forge

Who is online

Users browsing this forum: No registered users and 206 guests

cron

Who is online

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

Login Form