# Sirrian's post explaining AI behavior

**URL:** <https://community.gemsofwar.com/t/sirrians-post-explaining-ai-behavior/9231>\
**Category:** Gameplay Chat (PC/Mobile)\
**Created:** [July 7, 2016, 12:34pm UTC](https://community.gemsofwar.com/t/sirrians-post-explaining-ai-behavior/9231 "2016-07-07T12:34:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tacet](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/tacet/32/35_2.png) [@Tacet](https://community.gemsofwar.com/u/Tacet)\
**Post date:** [July 7, 2016, 12:34pm UTC](https://community.gemsofwar.com/t/sirrians-post-explaining-ai-behavior/9231/1 "2016-07-07T12:34:07Z")

</div>

Does anyone recall where Sirrian’s full reply is where he explains how the AI functions? I tried looking for it for about 10 minutes and can’t find it.

---

<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:** [July 7, 2016, 12:42pm UTC](https://community.gemsofwar.com/t/sirrians-post-explaining-ai-behavior/9231/2 "2016-07-07T12:42:12Z")

</div>

> [@Request AI refinement](http://community.gemsofwar.com/t/request-ai-refinement/6749/32):
>
> There’s actually quite a bit more to it than you listed, but big-picture-wise you’re not far off Determine a priority on colors… based primarily on what I need, and secondarily on what I should deny (sometimes in this step it MAY put denial as its #1 priority, usually not though, despite what you might think… I believe when it DOES deny it’s just very memorable, and recall bias kicks in) If there is a 4/5 skull match, take it if there is 4/5-match of a color, then take it (preference for 5’s …

---

<div class="post-metadata">

**Author:** ![Tacet](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/tacet/32/35_2.png) [@Tacet](https://community.gemsofwar.com/u/Tacet)\
**Post date:** [July 7, 2016, 12:45pm UTC](https://community.gemsofwar.com/t/sirrians-post-explaining-ai-behavior/9231/3 "2016-07-07T12:45:51Z")

</div>

Thanks! 🙂

---

<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 8, 2016, 5:06am UTC](https://community.gemsofwar.com/t/sirrians-post-explaining-ai-behavior/9231/4 "2016-07-08T05:06:01Z")

</div>

Clarification please.

•if there is 4-match take a **random instance**  
•if there is skull match **take a random instance**

What on earth does this “random instance” actually mean? That if there are several skull match-3’s on board, it will choose one of them randomly?

I guess I don’t follow this logic because the A.I. almost never misses the simple gem match-4’s except when it deliberately converts them to match-3’s. Thus if it always finds a gem match-4 and then systematically targets all similar match-4’s on the board, there’s nothing “random” about those instances.

---

<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:** [July 8, 2016, 5:10am UTC](https://community.gemsofwar.com/t/sirrians-post-explaining-ai-behavior/9231/5 "2016-07-08T05:10:40Z")

</div>

> [@Theicla](#):
>
> What on earth does this “random instance” actually mean? That if there are several skull match-3’s on board, it will choose one of them randomly?

Exactly… if it sees a number of things of equal value, it will choose one of those things at random (biased towards vertical matches lower down on the board)

---

<div class="post-metadata">

**Author:** ![Kharybdys](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/kharybdys/32/2023_2.png) [@Kharybdys](https://community.gemsofwar.com/u/Kharybdys)\
**Post date:** [July 8, 2016, 6:40pm UTC](https://community.gemsofwar.com/t/sirrians-post-explaining-ai-behavior/9231/6 "2016-07-08T18:40:04Z")

</div>

I am probably thinking too much as a programmer, but it seems a simple way to improve the AI would be for us to be able to specify the priority order for the spells in each team. Eg my herdmaster/soothsayer/valkyrie/druid team would have a priority order of druid/valkyrie/herdmaster/soothsayer.

This would solve the problem of gorgotha only spamming its spell instead of acting as a mana generator etc.

A logical second step is to be able to define a “don’t cast this spell”, eg on a troop with stoneskin in slot 1 that is blocking some of the worker troops’ colors. Or possibly “don’t cast unless it kills a troop”. My preference would be a simple “don’t cast”.

---

<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:** [July 8, 2016, 6:49pm UTC](https://community.gemsofwar.com/t/sirrians-post-explaining-ai-behavior/9231/7 "2016-07-08T18:49:14Z")

</div>

The AI when frozen is still a bit fuzzy. Like taking a match 4 of a frozen color over a match 3 of skulls
