It is currently 24 Apr 2024, 05:38
   
Text Size

Card AI (Improvements) Requests

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

Re: Card AI (Improvements) Requests

Postby cc-drake » 09 Aug 2014, 09:11

In AI's begin of combat phase, AI activates his Vodalian Knights over and over again, giving him several instances of flying. I control no Islands, if that matters.
cc-drake
 
Posts: 570
Joined: 14 Aug 2010, 07:15
Has thanked: 29 times
Been thanked: 6 times

Re: Card AI (Improvements) Requests

Postby mastroego » 13 Aug 2014, 12:04

AI casts Divine Reckoning when I have exactly one creature.
mastroego
 
Posts: 236
Joined: 22 Sep 2013, 14:04
Has thanked: 28 times
Been thanked: 16 times

Re: Card AI (Improvements) Requests

Postby friarsol » 18 Aug 2014, 02:58

The AI incorrectly activates a Cadaverous Knight when I cast an Incinerate at the Knight. Regenerating normally would be right, except Incinerate prevents that from working.
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 mastroego » 18 Aug 2014, 12:01

-EDITED OUT
mastroego
 
Posts: 236
Joined: 22 Sep 2013, 14:04
Has thanked: 28 times
Been thanked: 16 times

Re: Card AI (Improvements) Requests

Postby GregBonnu » 18 Aug 2014, 16:20

The AI keeps playing Freed from the Real on his own creatures that have no tapping abilities & then repeatedly tapping & untapping them until he runs out of lands and is thus never playing anything else. The AI also activates Mimic Vat every turn, wasting lands, even when there's no creature copied.

I'm also having problems with the AI having a bias against me when playing Take Possession, Control Magic, and even abilities like Sower of Temptation. I'll have a Giant Octopus & opponent B has an Avatar of Woe, Player A will then precede to use one of the above abilities on my Octopus instead of the obviously better creature.

The AI has the same bias when playing Terror and will often kill the Grizzly Bears I control while another opponent has multiple 8/8's on the field.
GregBonnu
 
Posts: 3
Joined: 02 Jun 2014, 16:21
Has thanked: 0 time
Been thanked: 0 time

Re: Card AI (Improvements) Requests

Postby elcnesh » 18 Aug 2014, 17:08

GregBonnu wrote:I'm also having problems with the AI having a bias against me when playing Take Possession, Control Magic, and even abilities like Sower of Temptation. I'll have a Giant Octopus & opponent B has an Avatar of Woe, Player A will then precede to use one of the above abilities on my Octopus instead of the obviously better creature.

The AI has the same bias when playing Terror and will often kill the Grizzly Bears I control while another opponent has multiple 8/8's on the field.
These problems are caused by the AI almost always picking (cards from) the human player when making choices. It's not really fit for multiplayer yet.
elcnesh
 
Posts: 290
Joined: 16 May 2014, 15:11
Location: Netherlands
Has thanked: 34 times
Been thanked: 92 times

Re: Card AI (Improvements) Requests

Postby Phoenix » 25 Aug 2014, 12:40

AI had 1 point of life left in a quest duell and played Rakdos Cackler using its Unleash-ability causing his creature not being able to block and losing the match.
Phoenix
 
Posts: 77
Joined: 15 Dec 2011, 10:23
Has thanked: 6 times
Been thanked: 3 times

Re: Card AI (Improvements) Requests

Postby Agetian » 25 Aug 2014, 15:09

AI apparently does not use the ETB ability of Glowing Anemone correctly - it doesn't ever target my lands to return them to my hand and instead it targets its own lands (which also, for some reason, do not return to the AI's hand - maybe it "reconsiders" and cancels the return after targeting or something?)

- 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 Agetian » 28 Aug 2014, 17:57

Something's not right with the AI deciding to pump Killer Bees (I'm playing vs a Shandalar world opponent). The AI is continuously attacking me with two Killer Bees (0/1). It has four untapped forests yet it does not ever utilize them to pump the bees, even though I have nothing to block those bees with. At first I thought it's conserving mana for spells (in which case it's stupid to attack anyway), but it turns out that the AI doesn't pump even if it has nothing else to cast... [this is as of SVN r27155, also true for the latest snapshot in the 1.5.24 release thread].

EDIT: The thing is, the AI *will* pump Killer Bees but only if I block it and it can deal lethal damage to my creature. However, if it attacks with Killer Bees (as 0/1) and I do not block, the AI does not use the opportunity to deal damage to me directly by pumping the creature.

EDIT 2: I committed an experimental change (r27157) that allows the AI to pump a potentially unblocked attacker or an attacker that is not predicted to be destroyed in combat. I'm not sure if this is optimal or if this may have any unwanted side effects elsewhere in the pump AI logic, please help/correct if it does.

EDIT 3: An observation from my testing is that the change above makes the AI use non-stacking pumps multiple times during the Declare Blockers phase (e.g. Goblin Balloon Brigade gets pumped multiple times for the Flying effect, which is senseless). I haven't figured out a way to change this yet, please assist if possible.

EDIT 4: Added a simple check so that the AI will only keep pumping the creature according to the rule I added if it increases the effective power of the said creature. Still suboptimal, I think, but better than multi-pumping senseless effects and losing mana (I think). I think I'm mostly done with this simple check, so any further updates to this logic is welcome from our expert AI coders.

P.S. I noticed that with the current AI logic (both without my modification at all - i.e. before r27158 - and with my current modification as it is in r27159) the AI doesn't pump e.g. a Goblin Balloon Brigade even once (for its flying effect) in order to e.g. attack for 1 damage when the human player has Wall of Wood in play. Not sure how to remedy this.

- 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 Agetian » 30 Aug 2014, 15:30

The AI does not always utilize the temporary creature stealing effects correctly (e.g. Act of Treason, Traitorous Instinct, etc.). In particular, while the AI will correctly steal the best creature the opponent has most of the time, it will not attack with it in case it sees a threat to that creature (e.g. if it believes the creature will die once blocked by the opponent). In this scenario, stealing the creature becomes senseless because it wastes mana and produces no effect (the creature goes back to the opponent at end of turn). It would be better to make the AI always attack with temporarily controlled creatures that last till end of turn - even should they die due to the opponent's block, it's typically the opponent's loss.

- 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 excessum » 02 Sep 2014, 00:42

Agetian wrote:Something's not right with the AI deciding to pump Killer Bees (I'm playing vs a Shandalar world opponent). The AI is continuously attacking me with two Killer Bees (0/1). It has four untapped forests yet it does not ever utilize them to pump the bees, even though I have nothing to block those bees with. At first I thought it's conserving mana for spells (in which case it's stupid to attack anyway), but it turns out that the AI doesn't pump even if it has nothing else to cast... [this is as of SVN r27155, also true for the latest snapshot in the 1.5.24 release thread].

...

P.S. I noticed that with the current AI logic (both without my modification at all - i.e. before r27158 - and with my current modification as it is in r27159) the AI doesn't pump e.g. a Goblin Balloon Brigade even once (for its flying effect) in order to e.g. attack for 1 damage when the human player has Wall of Wood in play. Not sure how to remedy this.

- Agetian
Pumping Goblin Balloon Brigade to make it evasive is based on potential damage over the opponent's life so I presume the human player has 10+ life so the 1 damage is too small to be worthwhile. If the creature was something like Agent of Horizons with higher power, the AI is more likely to activate it. Your check for increasing the effective power is effective enough since the other solution of checking for abilities gained is horribly painful, involving hunting the stack for other "pump" effects.

The AI has no way of gauging the "value" of pumping other than obviously killing or saving a creature for card advantage. Repeatable pumps that cost 1 mana like Killer Bees or Nantuko Shade sounds reasonable but there are creatures like Zof Shade and worse around and the AI will happily waste its mana on them instead of doing something else. The fact that most sorcery-speed spells are cast after combat makes it worse since it cannot save or hold up mana in anticipation. There is no simple solution for this until the AI has a concept of holding mana to cast its spells in later phases.
excessum
 
Posts: 177
Joined: 21 Oct 2013, 02:30
Has thanked: 0 time
Been thanked: 19 times

Re: Card AI (Improvements) Requests

Postby kestell » 02 Sep 2014, 05:00

ai has ajani steadfast on the field, but no creatures. 2nd main phase plays a creature but then just pass, without activating ajani for loyalty.
kestell
 
Posts: 70
Joined: 04 Oct 2013, 12:03
Has thanked: 5 times
Been thanked: 0 time

Re: Card AI (Improvements) Requests

Postby Agetian » 02 Sep 2014, 06:17

excessum wrote:The AI has no way of gauging the "value" of pumping other than obviously killing or saving a creature for card advantage. Repeatable pumps that cost 1 mana like Killer Bees or Nantuko Shade sounds reasonable but there are creatures like Zof Shade and worse around and the AI will happily waste its mana on them instead of doing something else. The fact that most sorcery-speed spells are cast after combat makes it worse since it cannot save or hold up mana in anticipation. There is no simple solution for this until the AI has a concept of holding mana to cast its spells in later phases.
Yes, I agree, and actually holding mana is probably one of the most important concepts for the AI to implement as far as mana effectiveness goes, since there is more than one spot where this might show as the AI being "wasteful" with mana before the important spells come into play. Is there any way in the current code base to implement a "look-ahead" to try and predict what the AI will cast in Main 2 anyway given the current mana base (basically, applying the same logic as in M2 but instead of actually casting things just counting the mana that is going to be spent)? For the initial "simple" version of the solution, maybe it's possible to code a look-ahead like that and, if there is anything waiting to be cast, then hold out on pumps, at least on the ineffective ones (and "ineffective" can possibly be initially defined (for simplicity) as costing 3 or more mana or something like that).

- 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 excessum » 02 Sep 2014, 06:43

Agetian wrote:Yes, I agree, and actually holding mana is probably one of the most important concepts for the AI to implement as far as mana effectiveness goes, since there is more than one spot where this might show as the AI being "wasteful" with mana before the important spells come into play. Is there any way in the current code base to implement a "look-ahead" to try and predict what the AI will cast in Main 2 anyway given the current mana base (basically, applying the same logic as in M2 but instead of actually casting things just counting the mana that is going to be spent)? For the initial "simple" version of the solution, maybe it's possible to code a look-ahead like that and, if there is anything waiting to be cast, then hold out on pumps, at least on the ineffective ones (and "ineffective" can possibly be initially defined (for simplicity) as costing 3 or more mana or something like that).

- Agetian
AFAIK the AI considers every possible choice everytime it receives priority unless otherwise specified. Every decision it makes is completely independent unless the developer(s) specifically add code to handle specific cases (ie. I added a variable to store the AI decision for Boros Charm otherwise it "forgets" the logic and makes a separate random/stupid choice).

The concept of having a proper AI decision matrix was bounced around but nobody ever got around to building it since it is hideously complicated and tedious.
excessum
 
Posts: 177
Joined: 21 Oct 2013, 02:30
Has thanked: 0 time
Been thanked: 19 times

Re: Card AI (Improvements) Requests

Postby Agetian » 02 Sep 2014, 06:49

excessum wrote:AFAIK the AI considers every possible choice everytime it receives priority unless otherwise specified. Every decision it makes is completely independent unless the developer(s) specifically add code to handle specific cases (ie. I added a variable to store the AI decision for Boros Charm otherwise it "forgets" the logic and makes a separate random/stupid choice).

The concept of having a proper AI decision matrix was bounced around but nobody ever got around to building it since it is hideously complicated and tedious.
Oh, bummer, I thought it would be possible to sort of "pre-execute" the AI decision making for M2 trying to see what will be viable, but if it's not possible it certainly complicates matters... Anyhow, I might be looking a bit into the AI code soon enough, so if I dig anything useful up I'll try to improve the code base to the best of my ability.

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

PreviousNext

Return to Forge

Who is online

Users browsing this forum: Google [Bot] and 56 guests


Who is online

In total there are 57 users online :: 1 registered, 0 hidden and 56 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: Google [Bot] and 56 guests

Login Form