# Question about the AI

**URL:** <https://community.gemsofwar.com/t/question-about-the-ai/9673>\
**Category:** Gameplay Chat (PlayStation/Xbox)\
**Created:** [July 16, 2016, 1:05am UTC](https://community.gemsofwar.com/t/question-about-the-ai/9673 "2016-07-16T01:05:09Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Personette](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/personette/32/3845_2.png) [@Personette](https://community.gemsofwar.com/u/Personette)\
**Post date:** [July 16, 2016, 4:01am UTC](https://community.gemsofwar.com/t/question-about-the-ai/9673/21 "2016-07-16T04:01:07Z")

</div>

Wait, am i getting this: you, who routinely post about how mobile players play the mobile game & how mobile-exclusive troops work, think i shouldn’t discuss cognitive function… Because you’re talking about the console version?

That’s funny.

FWIW, i’ve often thought, “gee, it’s like the AI wants the game to be over,” same as i’ve thought, “dammit, AI, you cheat!” … And then i toss those thoughts in the garbage where they belong.

---

<div class="post-metadata">

**Author:** ![Lyya](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/lyya/32/3650_2.png) [@Lyya](https://community.gemsofwar.com/u/Lyya)\
**Post date:** [July 16, 2016, 4:14am UTC](https://community.gemsofwar.com/t/question-about-the-ai/9673/22 "2016-07-16T04:14:48Z")

</div>

Wow, okay, yeah. I can tell you beyond a shadow of a doubt that the PC/mobile AI would never have made those moves. This is definitely a discrepancy between PC/mobile and Console.

---

<div class="post-metadata">

**Author:** ![VegaDark541](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/vegadark541/32/7875_2.png) [@VegaDark541](https://community.gemsofwar.com/u/VegaDark541)\
**Post date:** [July 16, 2016, 4:18am UTC](https://community.gemsofwar.com/t/question-about-the-ai/9673/23 "2016-07-16T04:18:24Z")

</div>

Yes this type of move happens on console fairly regularly once the AI apparently determines there’s no chance to win.

---

<div class="post-metadata">

**Author:** ![Lyya](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/lyya/32/3650_2.png) [@Lyya](https://community.gemsofwar.com/u/Lyya)\
**Post date:** [July 16, 2016, 4:20am UTC](https://community.gemsofwar.com/t/question-about-the-ai/9673/24 "2016-07-16T04:20:27Z")

</div>

That’s really interesting. Maybe @Mr.Strange or @Nex can shed some light on why this would differ from the PC/mobile behavior. In case you were not aware, on PC/mobile the AI follows very strict rules as to what it’ll match next, with randomness seemingly only occurring when there’s a tie to break, or whether or not to fire a spell. I don’t see the Console version as “wrong” necessarily, assuming the AI still puts up a (reasonable) challenge; the unpredictability might actually serve to make the Console AI more frightening.

---

<div class="post-metadata">

**Author:** ![TaliaParks](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/taliaparks/32/11738_2.png) [@TaliaParks](https://community.gemsofwar.com/u/TaliaParks)\
**Post date:** [July 16, 2016, 4:24am UTC](https://community.gemsofwar.com/t/question-about-the-ai/9673/25 "2016-07-16T04:24:51Z")

</div>

It won’t always do that, as you see it will match Skulls if there are multiple Skull matches or if you refuse to match the Skulls yourself.

I never viewed it as an issue. Hell, humans give up as well. I was just curious because the description of the PC AI sounded more vicious than the Console’s. It appears to be exactly that.

---

<div class="post-metadata">

**Author:** ![TaliaParks](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/taliaparks/32/11738_2.png) [@TaliaParks](https://community.gemsofwar.com/u/TaliaParks)\
**Post date:** [July 16, 2016, 4:26am UTC](https://community.gemsofwar.com/t/question-about-the-ai/9673/26 "2016-07-16T04:26:59Z")

</div>

All I was alluding to is that you have to play the Console version (or just watch the videos) to actually experience this phenomenon.

---

<div class="post-metadata">

**Author:** ![killerman3333](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/killerman3333/32/4068_2.png) [@killerman3333](https://community.gemsofwar.com/u/killerman3333)\
**Post date:** [July 16, 2016, 5:01am UTC](https://community.gemsofwar.com/t/question-about-the-ai/9673/27 "2016-07-16T05:01:44Z")

</div>

> [@TaliaParks](#):
>
> Aren’t you people tired of being proven wrong on a daily basis? I’m sure as hell tired of doing it, but if you want to masochists…

Not sure if sarcasm or serious.[quote=“Personette, post:8, topic:9673”]  
in general, once we have a fixed belief any additional information will be interpreted as confirmation–even if we have to tie ourselves up in knots to make it work.  
[/quote]

Confirmation bias. You explained confirmation bias.[quote=“UKresistance, post:10, topic:9673”]  
The game doesn’t have AI.  
[/quote]

Tell that to the devs.

---

<div class="post-metadata">

**Author:** ![TaliaParks](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/taliaparks/32/11738_2.png) [@TaliaParks](https://community.gemsofwar.com/u/TaliaParks)\
**Post date:** [July 16, 2016, 5:09am UTC](https://community.gemsofwar.com/t/question-about-the-ai/9673/28 "2016-07-16T05:09:04Z")

</div>

In computer science, an ideal intelligent machine is a flexible rational agent that perceives its environment and takes actions that maximize its chance of success at some goal.

So by definition this game has an AI.

The criterion you describe @UKresistance is more or less applied to sentient life.

---

<div class="post-metadata">

**Author:** ![UKresistance](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/ukresistance/32/7558_2.png) [@UKresistance](https://community.gemsofwar.com/u/UKresistance)\
**Post date:** [July 16, 2016, 5:32am UTC](https://community.gemsofwar.com/t/question-about-the-ai/9673/29 "2016-07-16T05:32:18Z")

</div>

The devs know what an actual AI is, and how incredibly difficult and much less fun the game would be with an actual AI.

I actually saw a video once of a player that wrote an AI to play one of them gem matching games. Had a web cam look at his phone, wrote code to identify where the gems were and it played intelligently by evaluating the best move. It was an insane amount of cascades and four matches. Not sure which gem matching game it was, but I want to say a capcom street fighter one.

---

<div class="post-metadata">

**Author:** ![Lyya](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/lyya/32/3650_2.png) [@Lyya](https://community.gemsofwar.com/u/Lyya)\
**Post date:** [July 16, 2016, 6:20am UTC](https://community.gemsofwar.com/t/question-about-the-ai/9673/30 "2016-07-16T06:20:14Z")

</div>

I’m a dev, and I know what an AI is. The meaning differs from situation to situation. In the context of any meaningful discussion about Gems of War, the “AI” is how the computer behaves on its turn. Everything else is just debating semantics.

---

<div class="post-metadata">

**Author:** ![UKresistance](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/ukresistance/32/7558_2.png) [@UKresistance](https://community.gemsofwar.com/u/UKresistance)\
**Post date:** [July 16, 2016, 6:41am UTC](https://community.gemsofwar.com/t/question-about-the-ai/9673/31 "2016-07-16T06:41:07Z")

</div>

You are of course right Lyya, I am being overly picky with semantics. I suppose it’s just the way I was taught AI back in college a looooong time ago.

At least the game when it panics it skips the computer’s turn instead of just freezes. So at least they coded for that situation.

---

<div class="post-metadata">

**Author:** ![Smuggler007](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/smuggler007/32/5320_2.png) [@Smuggler007](https://community.gemsofwar.com/u/Smuggler007)\
**Post date:** [July 16, 2016, 2:53pm UTC](https://community.gemsofwar.com/t/question-about-the-ai/9673/32 "2016-07-16T14:53:49Z")

</div>

I just figured the battles are programmed to end in the shortest time possible. Sometimes, the computer team will put up a fight to the bitter end and thus prolong the battle. But sometimes it does give up. The so-called random gem drops will favor either one of these patterns as well without fail. Same goes for spells. When you or your ally have a random spell, its random alright. Not so for the computer playing team. So-called random chance actually targets whomever it considers as the greatest threat on your team. If it has a 25% chance to devour/ eliminate/ damage, its actually 100%. When it converts or adds a gem color, it places it precisely where it needs to be on the board to manipulate it in its favor which can lead to the worst case scenario: The cascading nightmare as some players have called it.

Yet, as @irishfury187 , pointed out, when you are close to victory, the ‘_gems start falling more favorably for me_ [or you]’ along with everything else like it had for the computer team. It’s really quite a thing to observe this each time. The latest version has somewhat tamed it but its still functioning as before even at Normal difficulty when that combo-breaker is suppose to be in effect. lol yeah, right.

Is it a bug? It’s easier to write it off as a bug. Then it can be patched. Or is it the law of unintended consequences at work? The computer will do as programmed, as scripted. It would require the Devs to reprogram, to rewrite the script to prevent the computer player from continuing its _end justify the means_ logic. It does not know how to think for itself. Its just following each line by line… until the desired result is accomplished.

---

<div class="post-metadata">

**Author:** ![gregsgroi](https://avatars.discourse-cdn.com/v4/letter/g/ccd318/32.png) [@gregsgroi](https://community.gemsofwar.com/u/gregsgroi)\
**Post date:** [July 16, 2016, 3:21pm UTC](https://community.gemsofwar.com/t/question-about-the-ai/9673/33 "2016-07-16T15:21:24Z")

</div>

AI will ignore skull matches even if there are four troops up. It is probably to stop the AI skull matching again and again vs a troop with 75% damage reduction.

The only time the AI is forced to match skulls is if they have a spell charged.

I would also say it is impossible for the AI to make a bad move early on in the game due to having all the colors. I’ve seen an AI team with only three colors make bad moves right from the start.

---

<div class="post-metadata">

**Author:** ![PowerPlay](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/powerplay/32/3886_2.png) [@PowerPlay](https://community.gemsofwar.com/u/PowerPlay)\
**Post date:** [July 16, 2016, 4:07pm UTC](https://community.gemsofwar.com/t/question-about-the-ai/9673/34 "2016-07-16T16:07:50Z")

</div>

This is why my motto is “never let me live”.

To quote TeamFourStar: Hit me as hard as you can. Not half as hard, not some arbitrary percentage.

---

<div class="post-metadata">

**Author:** ![TaliaParks](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/taliaparks/32/11738_2.png) [@TaliaParks](https://community.gemsofwar.com/u/TaliaParks)\
**Post date:** [July 17, 2016, 4:01pm UTC](https://community.gemsofwar.com/t/question-about-the-ai/9673/35 "2016-07-17T16:01:18Z")

</div>

> [@Smuggler007](#):
>
> I just figured the battles are programmed to end in the shortest time possible.

I find, other than the times the AI quits, that the AI will do everything it can to PROLONG the battle. Up to, and including, refusing to drop your Banner color(s)

---

<div class="post-metadata">

**Author:** ![Robert](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/robert/32/12802_2.png) [@Robert](https://community.gemsofwar.com/u/Robert)\
**Post date:** [July 17, 2016, 4:09pm UTC](https://community.gemsofwar.com/t/question-about-the-ai/9673/36 "2016-07-17T16:09:12Z")

</div>

I wish the AI quit earlier when I was left with celestia against a traited goblin king. Was torturous, after 10 minutes, and ever increasing health for both, I had to retreat

---

<div class="post-metadata">

**Author:** ![Theicla](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/theicla/32/3624_2.png) [@Theicla](https://community.gemsofwar.com/u/Theicla)\
**Post date:** [July 17, 2016, 5:22pm UTC](https://community.gemsofwar.com/t/question-about-the-ai/9673/37 "2016-07-17T17:22:02Z")

</div>

This subject was explored in the [AI gets really lucky thread](http://community.gemsofwar.com/t/ai-gets-really-lucky/5823/19) a few months ago where jeffr23 described the “AI gives up” behaviour on console:

> [@AI gets really lucky](https://community.gemsofwar.com/t/ai-gets-really-lucky/5823/18):
>
> Most of the problem is that it’s allowed to get lucky. As I understand it, on the PC the AI will never pass up a 4-match or a skull match. Here in console-land, sometimes it does, and when it passes up skull match in favor of a 3-match only to have the top row fall in with 4 skulls (and so on), our monkey brain’s confirmation bias thinks that happens more often than the times when is does a 3-match for no good reason.
> 
> (Also, the AI seems to completely give up once it’s down to a single troop, only taking skull matches maybe 20% of the time or so then. Does the PC version do that?)

At the time, I suggested this is an efficiency mechanism to simply speed up the console endgame when the odds have fallen overwhelmingly in the player’s favour.

I’ve also said that if you’re particularly boneheaded and continue to make dumb moves even at that point, the A.I. will turn around and bite your arse off. You will LOSE… spectacularly.

Happened a few times to me until I stopped goofing around with the A.I.‘s last troop heh. Memo to lil’ kitten Warlords: Don’t ever try playing with your food unless you’re guaranteed an Extra Turn for the kill!

---

<div class="post-metadata">

**Author:** ![Mr.Strange](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/mr.strange/32/2762_2.png) [@Mr.Strange](https://community.gemsofwar.com/u/Mr.Strange)\
**Post date:** [July 17, 2016, 9:00pm UTC](https://community.gemsofwar.com/t/question-about-the-ai/9673/38 "2016-07-17T21:00:35Z")

</div>

I’ll look into this. But to the best of my knowledge, the AI has no provisions for anything other than:

1 - Match 5, if possible.  
2 - Match 4, if possible.  
3 - Match 3 skulls, if possible.  
4 - Cast a spell, if possible.  
5 - Match 3 gems of a mana type I need, if possible.  
6 - Match 3 gems of a mana type the opponent needs, if possible.  
7 - Match 3 gems.

At low level (under 200) the AI deliberately “misses” skull matches sometimes. And when frozen came out there was a bit of logic to skip steps #1 and #2 if they would cause the turn to end. But that’s 100% of the AI routine to the best of my knowledge. There is absolutely no concept of “winning” or “losing” or any sort of evaluation of the board, or opponent’s troops (other than step #6, which tries to deny mana colors a bit) at all. Putting something like that in would have been a major feature.

But looking at the videos, I can see that it’s not behaving as expected. So there could be a bug there, but I promise there’s nothing complex, or reactive to the board state.

---

<div class="post-metadata">

**Author:** ![TaliaParks](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/taliaparks/32/11738_2.png) [@TaliaParks](https://community.gemsofwar.com/u/TaliaParks)\
**Post date:** [July 17, 2016, 9:07pm UTC](https://community.gemsofwar.com/t/question-about-the-ai/9673/39 "2016-07-17T21:07:06Z")

</div>

I notice the AI will prioritize mana denial (#6) much higher (up to #3) when you have a Mana transformer/generator a lot. It’ll target the color that the transformer/generator makes.

---

<div class="post-metadata">

**Author:** ![Strat](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@Strat](https://community.gemsofwar.com/u/Strat)\
**Post date:** [July 17, 2016, 9:15pm UTC](https://community.gemsofwar.com/t/question-about-the-ai/9673/40 "2016-07-17T21:15:43Z")

</div>

> [@AI Extra turns INSANE since update!](http://community.gemsofwar.com/t/ai-extra-turns-insane-since-update/9740/17):
>
> . It will always highlight 5 matches, then 4 matches (which is useful), will favour skulls over gems (which is sometimes useful)… It pays no attention to your team colours or any results of cascades (which is not useful)… It’s simplistic, yes, but not set to deliberately cheat you… Keep in mind while this the case on PC/mobile. It is NOT at all how the AI works on console. This is just applies to Console players: The AI routinely very often “misses” matches. Including 5, 4, and Skulls. …

I always assumed that the AI “missing matches” on console was on purpose. Not part of a win loss thing just adding more randomness.

@Mr.Strange please read my link. The AI on console does not “see” all the matches for some reason. That randomness is then attributed to theories the AI is trying to looses or win respectively based on user perception.

[Previous page](https://community.gemsofwar.com/t/question-about-the-ai/9673.md?page=1)

[Next page](https://community.gemsofwar.com/t/question-about-the-ai/9673.md?page=3)
