# Devs: How many moves does the AI look "ahead"?

**URL:** <https://community.gemsofwar.com/t/devs-how-many-moves-does-the-ai-look-ahead/26600>\
**Category:** Gameplay Chat (PC/Mobile)\
**Created:** [June 29, 2017, 6:07am UTC](https://community.gemsofwar.com/t/devs-how-many-moves-does-the-ai-look-ahead/26600 "2017-06-29T06:07:24Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mad\_Butch](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/mad_butch/32/22903_2.png) [@Mad\_Butch](https://community.gemsofwar.com/u/Mad_Butch)\
**Post date:** [June 29, 2017, 6:07am UTC](https://community.gemsofwar.com/t/devs-how-many-moves-does-the-ai-look-ahead/26600/1 "2017-06-29T06:07:24Z")

</div>

As a player, you often look at: if I make this move then that will fall, and it will create that.

For example, if I make a horizontal 3er between 2 same colored gems above and below my 3er, then I will also create a 4er.  
Or, if I make this useless 3er, then that gem will fall down and create a 3er of the gem color I need.

Does the AI do anything like this?

---

<div class="post-metadata">

**Author:** ![GoldPhoenix0](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/goldphoenix0/32/35599_2.png) [@GoldPhoenix0](https://community.gemsofwar.com/u/GoldPhoenix0)\
**Post date:** [June 29, 2017, 7:02am UTC](https://community.gemsofwar.com/t/devs-how-many-moves-does-the-ai-look-ahead/26600/2 "2017-06-29T07:02:20Z")

</div>

> [@Mad\_Butch](#):
>
> Does the AI do anything like this?

tl;dr - Nope.

> [@Dear devs, please fix your cheating AI on console](https://community.gemsofwar.com/t/dear-devs-please-fix-your-cheating-ai-on-console/20562/78):
>
> The AI has no knowledge on what is going to be dropped next on the board. The AI will make a move based only on what the player can see, the board and spells it can cast. There isn’t even any code in there to line up any further moves or check for cascades, and as much as I would love to add that into the AI, I know that all it would cause is more complaints about “Cheating AI”, as much as it would then be closer to a smarter human opponent.

---

<div class="post-metadata">

**Author:** ![GoldPhoenix0](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/goldphoenix0/32/35599_2.png) [@GoldPhoenix0](https://community.gemsofwar.com/u/GoldPhoenix0)\
**Post date:** [June 29, 2017, 7:07am UTC](https://community.gemsofwar.com/t/devs-how-many-moves-does-the-ai-look-ahead/26600/3 "2017-06-29T07:07:01Z")

</div>

This thread goes into more detail on how the Console AI works, (and explains what the current PC AI does as well slightly)

> [@How often are YOU running into the "super lucky" opponents?](http://community.gemsofwar.com/t/how-often-are-you-running-into-the-super-lucky-opponents/20082/122):
>
> Hey @RyuuHou24 and everyone else, I can confirm that we did change the AI in our last Console 2.1.5 as stated in the patch notes. I’m not sure we have ever misled anyone about this, but I cannot comment for before we took over development of the game. There were issues with the AI system which was in the console version before 2.1.5, which was getting some complaints on the forums. While looking into this code, there was sections where it would first check for a 4 of a kind, then a skull match…

---

<div class="post-metadata">

**Author:** ![Gilgamesh](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/gilgamesh/32/29022_2.png) [@Gilgamesh](https://community.gemsofwar.com/u/Gilgamesh)\
**Post date:** [June 29, 2017, 7:23am UTC](https://community.gemsofwar.com/t/devs-how-many-moves-does-the-ai-look-ahead/26600/4 "2017-06-29T07:23:11Z")

</div>

I’ve never been a fan of the whole ai cheats argument. However the cat is out of the bag that “random” gem creation is anything but…

My query would be what is the ai handicap on %based proc of traits and spells. I’ve seen enough unbiased player collected data to conclude that their is in effect such an included function, or something is misrepresented, or not working as intended.

---

<div class="post-metadata">

**Author:** ![Mad\_Butch](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/mad_butch/32/22903_2.png) [@Mad\_Butch](https://community.gemsofwar.com/u/Mad_Butch)\
**Post date:** [June 29, 2017, 7:23am UTC](https://community.gemsofwar.com/t/devs-how-many-moves-does-the-ai-look-ahead/26600/5 "2017-06-29T07:23:55Z")

</div>

Thanks for the quick reply… I was wondering if that was something I was seeing 🙂

Btw, I hope the AI misses will come to PC as well, that definitely is something I like about the console version.  
Missing a 4er or 5er, or making a 4er instead of a 5er.

Makes me feel less bad when I do it myself 🙂

---

<div class="post-metadata">

**Author:** ![Mad\_Butch](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/mad_butch/32/22903_2.png) [@Mad\_Butch](https://community.gemsofwar.com/u/Mad_Butch)\
**Post date:** [June 29, 2017, 7:24am UTC](https://community.gemsofwar.com/t/devs-how-many-moves-does-the-ai-look-ahead/26600/6 "2017-06-29T07:24:37Z")

</div>

> [@Gilgamesh](#):
>
> I’ve never been a fan of the whole ai cheats argument.

I wasn’t inquiring because of cheating, I was just wondering if the AI did what I do to.

For the record 😉

---

<div class="post-metadata">

**Author:** ![Gilgamesh](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/gilgamesh/32/29022_2.png) [@Gilgamesh](https://community.gemsofwar.com/u/Gilgamesh)\
**Post date:** [June 29, 2017, 7:26am UTC](https://community.gemsofwar.com/t/devs-how-many-moves-does-the-ai-look-ahead/26600/7 "2017-06-29T07:26:31Z")

</div>

I know, I didn’t imply you were.

---

<div class="post-metadata">

**Author:** ![Sirrian](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/sirrian/32/35758_2.png) [@Sirrian](https://community.gemsofwar.com/u/Sirrian)\
**Post date:** [June 29, 2017, 7:42am UTC](https://community.gemsofwar.com/t/devs-how-many-moves-does-the-ai-look-ahead/26600/8 "2017-06-29T07:42:27Z")

</div>

> [@Gilgamesh](#):
>
> However the cat is out of the bag that “random” gem creation is anything but…

I think we’ve been pretty up-front about that a number of times since it was implemented 15-18 months ago.

Usually you don’t even notice this behavior kicking in though… it was mainly included to stop unpleasant amounts of extra turns happening when a troop/board started looping, and seldom kicked in until at least 3-5 extra turns had been obtained.  
After we re-balanced the number of gems created during gem-spam to not scale off magic, it became quite rare in fact.

I think it was only when the bug was introduced a few days ago that it became really noticeable again. And we’ve toned that right down again now, so it should be close to where it was before.

---

<div class="post-metadata">

**Author:** ![Gilgamesh](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/gilgamesh/32/29022_2.png) [@Gilgamesh](https://community.gemsofwar.com/u/Gilgamesh)\
**Post date:** [June 29, 2017, 8:11am UTC](https://community.gemsofwar.com/t/devs-how-many-moves-does-the-ai-look-ahead/26600/9 "2017-06-29T08:11:37Z")

</div>

Well yes and no. I might have been presumably under the assumption incorrectly an integer value was randomly assigned as a trigger to the streak breaker code so in turn assumed that at least the fist or second cast would have a “fair shake” at being random. I’m still playing mobile exclusively so I still have an entire class of troops that are fairly pointless to use between this script and the gem overwrite.

With the addition on the increased speed just how unfavourable is letting random actually be random? If I have a board with say 22 of a color and I use a spell creating an additional 9, I should be able to reasonably calculate the odds of those gems producing a free move and that’s not been the case.

---

<div class="post-metadata">

**Author:** ![Mithran](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/mithran/32/18064_2.png) [@Mithran](https://community.gemsofwar.com/u/Mithran)\
**Post date:** [June 29, 2017, 8:17am UTC](https://community.gemsofwar.com/t/devs-how-many-moves-does-the-ai-look-ahead/26600/10 "2017-06-29T08:17:33Z")

</div>

> [@Sirrian](#):
>
> Usually you don’t even notice this behavior kicking in though

We noticed. Even before last week, we noticed. Last week just shows that the code has undue influence about where they spawn, period, because with it reversed, you would never miss after _one_ extra turn. Can we try turning this off completely for a while?

---

<div class="post-metadata">

**Author:** ![Jarod0000](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/jarod0000/32/11775_2.png) [@Jarod0000](https://community.gemsofwar.com/u/Jarod0000)\
**Post date:** [June 29, 2017, 8:18am UTC](https://community.gemsofwar.com/t/devs-how-many-moves-does-the-ai-look-ahead/26600/11 "2017-06-29T08:18:37Z")

</div>

Noticing a lot that vertical matching in guild wars also is dropping a lot of skulls is this intentional, I’m not a complainer but watching 2 Guild War matches where the skull drop from non createable skull troops was almost 12 skulls on like I said vertical matches, has anyone else experienced similar behaviour during guild wars doesn’t occur in explore or pvp,

---

<div class="post-metadata">

**Author:** ![Arturo](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Arturo](https://community.gemsofwar.com/u/Arturo)\
**Post date:** [June 29, 2017, 8:49am UTC](https://community.gemsofwar.com/t/devs-how-many-moves-does-the-ai-look-ahead/26600/12 "2017-06-29T08:49:21Z")

</div>

agreed. there shouldn’t be anything trying to prevent random spawns from making extra turns after 3 loops or 300. Nothing stops target converters from looping. nothing should stop random converters either.

(#MakeRandomSpawnsGreatAgain

---

<div class="post-metadata">

**Author:** ![Annaerith](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/annaerith/32/13840_2.png) [@Annaerith](https://community.gemsofwar.com/u/Annaerith)\
**Post date:** [June 29, 2017, 4:02pm UTC](https://community.gemsofwar.com/t/devs-how-many-moves-does-the-ai-look-ahead/26600/13 "2017-06-29T16:02:52Z")

</div>

> [@Sirrian](#):
>
> it should be close to where it was before.

it doent seem anywhere close to where it was before withwhat ppl are reporting recently

> [@Official Change the Created Gem's Algorithm , Bad game!](https://community.gemsofwar.com/t/official-change-the-created-gems-algorithm-bad-game/26597/2):
>
> I’ve tested many matches and I can’t get a free turn unless there are 20+ gems on the board and then its about a 40-50% chance. The other problem is when you cast, it leaves 2-3 free turns on the board for the AI to take.

> [@Official Change the Created Gem's Algorithm , Bad game!](https://community.gemsofwar.com/t/official-change-the-created-gems-algorithm-bad-game/26597/1):
>
> Official seems avoid 4 match and above at randomly create gems. When I use troll troops just 3 matches in board, the board have 12 same color gems. It have 12\*2+4=26 gems in the board, and not any 4 matches, just not once.

> [@So how is everyone experiencing the console cascades?](https://community.gemsofwar.com/t/so-how-is-everyone-experiencing-the-console-cascades/26097/247):
>
> Edit: after 20+ more games of testing, Elemaugrim at 4 burns(12 gems) still kinda gets consecutive extraturns by the sheer amount of gems he spawns, but with a lot more misfires than he used to.  
> Jarl is just aweful now, in these 20+ games i didn’t get him to get 2 consecutive extraturns once, and it was a hustle to even get him started with one often

> [@So how is everyone experiencing the console cascades?](https://community.gemsofwar.com/t/so-how-is-everyone-experiencing-the-console-cascades/26097/216):
>
> I cannot get a 4 match to save my life. Dark troll with 14 purples on the board, 18 spawns and no extra turn.

---

<div class="post-metadata">

**Author:** ![Rasper](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/rasper/32/2363_2.png) [@Rasper](https://community.gemsofwar.com/u/Rasper)\
**Post date:** [June 29, 2017, 4:40pm UTC](https://community.gemsofwar.com/t/devs-how-many-moves-does-the-ai-look-ahead/26600/14 "2017-06-29T16:40:01Z")

</div>

29 purples on board filling nearly the bottom half of the board as tightly as it could without having a match, then casting elemaugrim to create 11 purples, and they all appear in the upper half in just the right configuration to give a single match 3.

No, this is NOT “where it was before”. This isn’t in the same zip code of where it was before. There is something in the code specifically deciding “thou shalt not get an extra turn”.

---

<div class="post-metadata">

**Author:** ![en9nhcet](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/en9nhcet/32/1673_2.png) [@en9nhcet](https://community.gemsofwar.com/u/en9nhcet)\
**Post date:** [June 29, 2017, 4:53pm UTC](https://community.gemsofwar.com/t/devs-how-many-moves-does-the-ai-look-ahead/26600/15 "2017-06-29T16:53:41Z")

</div>

[![](https://us1.discourse-cdn.com/flex019/uploads/gemsofwar/original/3X/0/9/09519a13b3aef65b9456cdba2d4d654e2595db83.jpg)](https://imgflip.com/i/1rq0af)[via Imgflip Meme Generator](https://imgflip.com/memegenerator)

[![](https://us1.discourse-cdn.com/flex019/uploads/gemsofwar/original/3X/4/4/44e8b87d8d7db50a5fbddafd356b13cee7081cfa.jpg)](https://imgflip.com/i/1rq0dh)[via Imgflip Meme Generator](https://imgflip.com/memegenerator)

---

<div class="post-metadata">

**Author:** ![Rickygervais](https://avatars.discourse-cdn.com/v4/letter/r/b77776/32.png) [@Rickygervais](https://community.gemsofwar.com/u/Rickygervais)\
**Post date:** [June 29, 2017, 4:55pm UTC](https://community.gemsofwar.com/t/devs-how-many-moves-does-the-ai-look-ahead/26600/16 "2017-06-29T16:55:08Z")

</div>

Better use the red phone

---

<div class="post-metadata">

**Author:** ![beanie42](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/beanie42/32/19802_2.png) [@beanie42](https://community.gemsofwar.com/u/beanie42)\
**Post date:** [June 29, 2017, 5:12pm UTC](https://community.gemsofwar.com/t/devs-how-many-moves-does-the-ai-look-ahead/26600/17 "2017-06-29T17:12:43Z")

</div>

> [@Sirrian](#):
>
> I think it was only when the bug was introduced a few days ago that it became really noticeable again. And we’ve toned that right down again now, so it should be close to where it was before.

Based on your previous comments, I think the old “combo breaker” code was supposed to trigger after 5 extra turns, starting at a 20% “penalty” and increasing from there. The recent issue seemed to invert the logic, so instead of a penalty it provided a bonus, and now the fix seems to have toned things back down again. However, on PC/Unity, it feels like this “combo breaker” is triggering after the first turn rather than after 5 turns, which would explain why extra turns after the first seem much more crippled than on the old PC/mobile code.
