The AI

Options
UweTellkampf
UweTellkampf Posts: 376 Mover and Shaker
edited October 2017 in MtGPQ General Discussion
I missed the thread in which we asked the new developers questions, I had many myself, but one topic has been on my mind a lot recently, especially after the last change in it's behaviour: the AI. My questions would have been about the "future of the AI", but maybe the issue is important enough for its own thread. 

I will start by saying: AI is as stupid as a brick. Its weaknesses are well-known. I actually can't see anything that the AI handles well. Starting with its gem-matching "ideas" and ending in the use of the cards, the timing, the mistakes, the self-mutilation, the AI plainly and simply makes bad/wrong decisions which lead to way too many way too easy wins for us.

I don't mind winning, no one does, I believe. But there is the aspect of "how" the wins are accomplished, that makes me more and more bored with the game: I am not winning because I am playing well. I am winning because AI plays disastrously. In the prospect for the future of this game, and especially to the challenge that it creates, I would like to propose tweaking the AI to – well – just play better. 

Here is what I think should be addressed if such re-programming would be done, please feel free to correct me or add stuff:

1. Gem-Matching. For no apparent reason, the AI is not matching 5-gems anymore, or really rarely, when match-5 is the only possibility to match anything at all. You don't need to be a genius to see how this works against the bare principle of a puzzle-gem-matching game structure. Before the last update, it was different, and it did hit almost every match-5. Here you could just change the code to how it was before the update.

2. Gem-Matching, advanced. The avoidance of match-5 is not the only problem. The AI never ever seems to take the whole board in account when matching the gems. I mean, there are chess games out there which compute millions of possible next moves in milliseconds. Our AI computes one move: The one that is making right now. And that never (except randomly) includes the probabilities of something else happening, a landfall of sorts, a cascade or whatever. To give us harder time, this could be probably easily implemented - let "Greg" try to achieve more than just a simple match of its own color, maybe even match a neutral color which would move the gems in a way that more mana would be created. Or just make it a priority for the AI to try to get as much mana as possible out of the current board situation (after it matched-5 if there is one around)

3. Handling of cards. There is some kind of algorithm in place which tells the AI what cards too choose and play next, but this algorithm is flawed. It leads to casting "Mirrorpool" after casting "Ghea's Revenge" (and many other poorly chosen sequences), it leads to never withholding cards but playing whatever has enough mana, and in the most extreme cases it leads to destroying it's own creatures.
At the smallest instance you should please try to correct the last mentioned behavior of self-destruction and generally casting cards to a bad or no effect for the AI. This includes such cards like "Floodwaters", and casting them when there is no enemy creature on the board, or "Censor" when the first card in the player's hand has no mana to be drained and many more. But also: teach the AI to withhold stuff. Prioritize cards. Or let us do it - create preference in which order we want the cards to be played, and the AI could be made to follow this order.

4. Handling of PW abilities. This has been said one million times before, here I go again: Let the AI use its 2. and 3. ability and not only the 1. Yes, it does use the 2. and the 3. sometimes, but only if there was some crazy cascade going on, and it randomly got enough loyalty. There are even some PW where using the 1. ability is totally useless, like Sorin's first without the creature, but the AI still pulls the trigger. I would be glad if the way how the abilities are handled would be completely random. That sometimes the AI would use the 1. ability, but sometimes it would wait and use the 3. Bonus would be of course, if it reacted to the situation on the board, but I believe I would be asking too much if I'd ask for that.

These are the four topics in which I see the most need for action and change. If AI played more carefully and thoughtfully, if it matched better and made better card decisions, the game would become somewhat harder, perfect points somewhat rarer, our own thinking about the board somewhat more strategic, and in the end, I believe it would lead to more satisfaction, because the feeling would be not as it is now: "I have beaten a brick", but really an accomplishment of sorts.

For starters I would also be just glad if Greg would return to a state in which he was before the last update. 
 
Tagged:
«1

Comments

  • theyrejustelves
    theyrejustelves Posts: 34 Just Dropped In
    Options
    Totally agree!  
    I like to win as well, but this is crazy.
    I would be fine with losing more often at least knowing that "Greg" was "trying".
  • ElvaanStride
    ElvaanStride Posts: 62 Match Maker
    edited October 2017
    Options
    There's a universal problem with match-3 games and how to program the AI. I've played over a dozen of these games extensively and it's the same across the board.

    You have to balance the AI so that it provides a challenge to older players while not scaring off newer players.

    Trust me you do NOT want a flawless AI. Humans will miss the "optimal" swap and so must the AI or else you will get a vast increase in difficulty.

    The AI also tends to cascade more than a human experiences, I attribute that to the AI trying to balance your strategic advantage against it's simplicity.
    ------------

    With how the AI is, I have experienced difficulty in facing Red decks as spamming is their strength. Conversely, Blue decks are actually easier to face than others. The AI doesn't play cards in the "correct" order and has no concept of control.

    I would recommend instituting a "priority list" to the AI. Development can set them for the AI fights and players can set their own for their decks. To do this on a grand scale would cause WAY too many issues with 1400+ cards (I've seen this fail with 300 and less repeatedly). You could also implement a "priority scale" for which colors to target.

    Players LOVE customization in any form.
  • madwren
    madwren Posts: 2,227 Chairperson of the Boards
    Options
    I lost points on the red node today because four times, my opponent cast a creature and then destroyed it with Liliana's Defeat on the same turn, thereby causing me damage. Since two of those were during enraged, I wound up taking too much damage....despite the fact I would have taken zero if the AI would stop destroying its own creatures. 

    It was fantastic. 



  • ElvaanStride
    ElvaanStride Posts: 62 Match Maker
    Options
    How does the game decide what player decks to use?
  • majincob
    majincob Posts: 732 Critical Contributor
    Options
    How does the game decide what player decks to use?
    I believe they chose a random deck from among those that have been played in the event already.
  • octal9
    octal9 Posts: 593 Critical Contributor
    Options
    madwren said:
    I lost points on the red node today because four times, my opponent cast a creature and then destroyed it with Liliana's Defeat on the same turn, thereby causing me damage. Since two of those were during enraged, I wound up taking too much damage....despite the fact I would have taken zero if the AI would stop destroying its own creatures. 

    It was fantastic. 



    This is a card implementation bug; it has the wrong value set for "valid targets"
  • madwren
    madwren Posts: 2,227 Chairperson of the Boards
    Options

    Trust me you do NOT want a flawless AI. Humans will miss the "optimal" swap and so must the AI or else you will get a vast increase in difficulty.


    The current iteration isn't that the AI sometimes misses the optimal swap. It's that it always, deliberately misses the optimal swap because it's coded to do so.  I'm admittedly no coder, but surely there is a way to find the middle ground between "flawless" and "clueless". 
  • ElvaanStride
    ElvaanStride Posts: 62 Match Maker
    Options
    The AI definitely hits 5 matches still, I can name 2 instances:

    When the 5 match is a straight line

    When it completes an L and there isn't another 4 match available
  • Sirchombli
    Sirchombli Posts: 322 Mover and Shaker
    edited October 2017
    Options
    The ai seems to have a lot of quirks. Many are bugs. Liliana's defeat and Skywhaler's shot have both saved me a time or two because the ai targets its own creatures. That's obviously a bug. Some things aren't, though. I can accept a certain amount of derp to the ai, but I'd be perfectly content if it just stopped killing itself. We're enraged. Ai is at 28 with 3 creatures on board. Casts eliminate the competition. That's just annoying. I love winning, but the ai is suicidal 
  • Krishna
    Krishna Posts: 205 Tile Toppler
    Options
    The AI definitely hits 5 matches still, I can name 2 instances:

    When the 5 match is a straight line

    When it completes an L and there isn't another 4 match available

    From what I've seen since the AI was "updated", The AI will only match 5+ gems 10% or so of the time. I've even seen the AI use gems from a potential 5+ gem match to make a 3 or 4 gem match. A 5 gem match does happen, but it's actually kind of rare.

    There was a question I wanted to ask too, but it would be answered with a "we cannot reveal at this time". Are we getting Vraska?
  • Ohboy
    Ohboy Posts: 1,766 Chairperson of the Boards
    Options
    Landfall priority is higher than match 5. That's all there is to it. 
  • Mainloop25
    Mainloop25 Posts: 1,935 Chairperson of the Boards
    Options
    ^or popping one of your activated gems. 
  • Krishna
    Krishna Posts: 205 Tile Toppler
    Options
    Ohboy said:
    Landfall priority is higher than match 5. That's all there is to it. 

    what about AI matching 3 gems over 5?
  • Mburn7
    Mburn7 Posts: 3,427 Chairperson of the Boards
    Options
    The AI (usually known as Greg) has been broken for some time.  First it was killing its own creatures (which it still does sometimes with direct damage, btw), and casting buffs on your creatures (Also still happens, albeit rarely), now it no longer prioritizes your supports or match 5's (there was actually a fix ages ago because Greg couldn't see L-shaped matches, that seems to have vanished). 
    When I first started playing this game the AI was actually pretty smart.  Lily 1 even wouldn't use her first ability unless you had cards in your hand, for example.  Every update has dumbed it down until now, where it feels like Greg is just taking pity on us and letting those perfect scores fly.
  • ElvaanStride
    ElvaanStride Posts: 62 Match Maker
    Options
    @UweTellkampf

    I reread your excellent OP and you say the AI will not withhold cards. I have witnessed this multiple times. 

    In fact, I cannot get 100% on the first Story chapter block because the AI stops playing cards after I kill 4 creatures (need 6 on 1.2). I kill them, destroy all Supports and it sits there with 6x fully charged cards.
  • octal9
    octal9 Posts: 593 Critical Contributor
    edited October 2017
    Options
    Liliana's defeat and Skywhaler's shot have both saved me a time or two because the ai targets its own creatures. That's obviously a bug.
    Mburn7 said:
    First it was killing its own creatures (which it still does sometimes with direct damage, btw), and casting buffs on your creatures (Also still happens, albeit rarely)
    Again, these issues are specific to card implementation.

    The AI has considerations that help it determine what to do, but these are only reflected in the Match 3 game (i.e. which gem to swap), the priority of cards in hand (e.g. prioritizing Decimator of the Provinces over Deploy the Gatewatch), and which planeswalker ability (this is why AI controlled Ob Nix and Sarkhan can and will commit suicide) to use. It does not affect card targeting at all. The card implementation contains multiple fields (type, filter, priority, resolver) that affect targeting functionality which determine how it casts a card such as Liliana's Defeat.

    edit: With all that said, any discussion of improving AI should be steered that way - again, its awareness in the Match 3 game, card prioritization in hand, and how to use certain planeswalker abilities.
  • Mainloop25
    Mainloop25 Posts: 1,935 Chairperson of the Boards
    Options
    @UweTellkampf

    I reread your excellent OP and you say the AI will not withhold cards. I have witnessed this multiple times. 

    In fact, I cannot get 100% on the first Story chapter block because the AI stops playing cards after I kill 4 creatures (need 6 on 1.2). I kill them, destroy all Supports and it sits there with 6x fully charged cards.

    I'll just assume you don't have turn to frog, imprison in the moon or Dubious challenge yet. Maybe you have necromancer summons? Hopefully you have Unburden/lay bare the heart already to unclog his hand. 
  • octal9
    octal9 Posts: 593 Critical Contributor
    edited October 2017
    Options
    Volrak said:
    .
    In an ideal world, more than one possible mode of AI would exist in the game.  A more difficult mode could be reserved for high-tier players, or for high-tier challenges (or both).
    My pipe dream is matchmaking vs an AI that utilizes machine learning to determine how to optimize its Match 3 abilities and how to play the hand it's dealt. Note that this is born from my own bias: I hold the belief that live PvP is not ideal for this game and thus shouldn't be implemented.

    In this ideal world players would have an ELO rating, and the AI would pull the values that match the player's ELO from its dataset .
  • Ohboy
    Ohboy Posts: 1,766 Chairperson of the Boards
    Options
    I've given thought to the machine learning route too.

    The problem is, if you learn from players, the first couple of weeks/months will see some really stupid behavior. 

    If you're self learning, where do you stop on the curve? An entirely self learning machine just completely trashed the partial learning go AI that made news less than a year ago for beating the best human players.