If X then Y - programmable AI


This train of thought was re-ignited by @Buryyourdead on the You Know When… Thread.

It’s not a concrete specific idea, but some blue-sky thinking for comment and future development.


We are all aware that the AI in the game is pretty rudimentary and predicable.

I’m fairly sure the chain of events is:

  • Fire charged heroes left to right
  • Fire diamonds then dragons
  • match three

In Raid/War Defence:

This simple pattern can easily be manipulated and is one of the reasons raid offence is far stronger than defence.

So could we, the players, be given a set of rules to choose to make defence more compelling and nuanced?

A set of rules that might include targeting of specials perhaps?
Select hero and add a rule to

  • target enemy with highest/lowest health/mana
  • prioritize enemy with healing/hitting ability
  • fire special when buffs/debuffs active on allies/enemies
  • prioritize tank/flank/wing

Would this make a mundane hero like Chao suddenly more interesting - if he could be set to hit heroes with highest mana?

It wouldn’t always be the best choice, but it would often be the more logical choice.

Similarly, the AI causes heroes with splash damage to hit outer most enemy on the wings, wasting a portion of the damage.

Would Scarlett, Grimm et al and Gravemaker be better if this illogical choice could be managed.

So how about this being an earned trait?

Raise the ascension ceiling of every hero by adding the ability to learn one rule?

Or have it as an unlockable feature on each character when a particular item is added.

(Ok, ok, I can hear the groans at the thought of more materials being required, but if you don’t find a way to monetize an idea, it’s never going to be considered).

In Auto-farming:

When you are autofarming 8-7 while making a sandwich, and quickly stop and pause it before the AI uses an AoE attack on 1 nearly dead mob.

Finish him off with tiles, and resume autoplay, and before getting back to the sandwich, you end up having to restart the level on autoplay.

And none of this seems like an issue as you just can’t believe how inefficient the AI can be…nvm the inefficiency of making the sandwich

So how about being able to customize the auto-pay AI?

We’re all familiar with 8-7.

Could we add a rule to prioritize green tiles?

Could we add a rule to allow for the use of items?

Or, in the above example, could it be taught to only fire diamonds if there are 2+ or 3+ monsters remaining?

Anyway, just some ideas. Yes, I agree that AW matches are a priority… and whether Guin is skewing the development of all other tanks…But they still had some computer power left for raid shields!


Raids - that annoying second hit

Straight up… I really appreciate the thought that you’ve put in to improving this aspect of the game.

I hope that you don’t get a bunch of “Yeah but”, comments attempting to pick holes in your concepts.

To my mind, you’re thinking is very sound. It allows us as the players to porgram our Defence and Farming teams to our liking. Much like we would if we were running it ourselves IRL.

The “Earn the Learn” idea is particularly interesting to me. SGG have said that they are working on ways to enhance fully-ascended heroes. Now, given that they’ve announced that, I’m positive that they have worked out what that enhancement will be, and are well down the track of implementing it. But… they should consider your concept. Yes (groan), I don’t want to have to find even more Ascension mats, but maybe there’s another way to trigger this feature? For example, the character must be in your Raid/Defence team(s) for 100+ raids before it becomes programmable?

Great post!


I really like that bit. A way for heroes to earn some XP. I think that idea has been suggested before but not linked to an AI skill.

As long as it wouldn’t reduce diversity. I’m keen to encourage the use of more variety of heroes, rather than make it more unattractive to change them.


I agree. Let’s get the best out of what we have…


It has to be said. Once you posted a Simpsons reference, i was 100% on board with whatever you suggested! Lol


That may or may not have been the intention…



Your ideas will strike a chord with SG



Lol. I clearly have no idea how to post a gif


This is a compelling idea, and I think it makes sense that it would require training/experience and/or materials to be able to use it.

Newer players would likely be confused and overwhelmed by this, so it’s most appropriate for more experienced players who are looking to refine their gameplay. Creating a natural barrier to progress that required time and prioritizing would fit it nicely into the nature of the game, and make it unfold more approachably for players who already have other components of the game down.

Great suggestion, I hope something like this is explored more by SG!


Yeah, but…

(Someone had to say it) :grin:


Yeah, but… let’s hope ur the only one. Lol


Ok, I’ll put a “Yeah, but…” in.
Which is not a concern about the idea itself (which is great to me), but about the expected outcome.
Consider this: we’ve asked aloud for months a way to easily count war flags. EZ. Well recently we got it, and yes, it is better than scrolling the attack history, but I think everyone expected for something more “easy to use”: we still have to roam the whole battlefield and click all players in both fields.
So my point is, if something as easy to implement as a flag counter ended in something that is still disappointing and cumbersome to use, how could the implementation of a customizable AI end?
And I’m not saying it would be devs fault, because this would not be an easy task. I mean do this exercise, try to figure in your mind how it should work: is there a button to access the feature and where is it? what GUI opens up? how are controls? you have a field for each possible move (match, dragon, diamond, pure sniper skill, sniper skill and debuff, sniper skill and buff, splash skill, splash skill and debuff…)? and for each one you select preferred targets, or condition to trigger it? How are conflicting rules solved (splash not on corner may conflict with splash not on perfect riposte), you give maybe a priority to each one?

So my point is that the interface would require a considerable design effort and the result may be disappointing because “it lacks the possibility to do < some very important feature >” “I’m sure my defense doesn’t do what I want because I keep losing defense raids!!” and so on.

So to keep it positive, because I’d really like a feature like this implemented, here’s my proposal: make this thread a collector of ideas to design this feature in its very details, like a GUI mockup, rules and their dependencies and so on. Maybe the community effort can make it easier for this idea to be developed and to be great


Well this gets my vote for best use of “Yeah, but…” @alcaselzer

A really sensible, constructive response!

The best ideas come from the meeting of many minds. Your suggestion to form a type of ‘creative commons’ around @JonahTheBard concept is fantastic.

Let’s see if this grows organically. If it doesn’t, we may need to seek advice from a moderator about how to structure it. I haven’t been on the forum long enough to know if this approach has been attempted before.

I’ll throw my thinking cap on in the meantime


Hang on @alcaselzer and @FishDreams… shouldn’t we have dug trenches and be firing back and forth about drop rates by now??!

This is uncharted territory!

I really like your input @alcaselzer - the challenge to suggest something credible, without just smashing the idea to bits.

I would suggest, having seen the pickle the Devs are in with war matching, that a very limited initial phase would be the first step.

Concentrating on raid defence:

I propose a button next to ‘defence team’ on the ‘edit team’ tab. This would then show a selection of rules that could be applied to just three heroes.

So just three rules per team, with each rule attributed to an individual hero. The rule only applies to special attacks.

The rule would be limited to:

Attack enemy with highest/lowest health/mana

Fire special when buff/debuff active/inactive

Use support special (i.e. healing) when team HP/hero HP falls to 75%/50%/25%

Any thoughts on those for starters?

My experience is predominantly with 4* heroes, who tend to work quite simply.

I expect there are more serious opportunities for unbalancing some of the more complex new 5* heroes.

As for thoughts on this as a developing idea, it would be great to keep sharing, and I am confident that the community managers will be aware of it. But the odds of it becoming code are pretty long.

Still, all the new additions to the game started somewhere :grin:


Favourite. Thread. Ever.

I’ll write a proper response when i’m not constipating/concentrating on AW.

Sleep time now, but i’ll be back tomorrow.

(Just pretend I inserted a really cool and insightful Simpsons gif right here)


So you want a “robot” to end up drawing robots by following a drawing instruction manual… on how to paint itself!

Do you really call this … AI?


I do know now why you didn’t “integrate” the following entry, few days back, in your so called “forum/game relevant” …

Pause …
For an unspecified and unpredictable amount of time.

Credits: Painting by Johan Scherft

Just the place for a Snark! I have said it once

It’s sensible to Begin by concentrating on just one aspect. As a starting point, i think ur suggested rules work well. As you say, it will evolve with input from others.

I have a practical consideration. The ideas/opinions that get traction within the game and on the forum are almost always underpinned by documentation or a spreadsheet. The ‘Bible’ and Anchor’s Hero Grading are two examples.

We’ll lose momentum if we just post ideas to this thread. We need to catalog, track or archive the concept.

You’ve seen that my technical competency doesn’t even extend to posting gifs. I’m not the person to be given such a task. I have the will, but not the way.

So we either find a way to generate this ourselves. Or we approach one of the established groups like 7DD, To assess their interest in exploring a new path to presenting more fully realised concepts to SGG.

What do you think? @JonahTheBard @alcaselzer


Hey there, sorry for late reply. On the bright side this will bring the thread back in main page :slight_smile:.
I agree with you @FishDreams that a shared living document may be a good way to organize the ideas. I don’t see a real benefit in using ghseets for this kind of project since we’re collecting ideas, not data to be processed, better something that allows to draw a sketch like gdocs or even gslides. I can create one (here’s the link to an example gdoc with integrated ideas from the last 3-4 posts), but I won’t be able to maintain it, so if anyone is up to the task I can give editing permissions to it (I think it is better to keep collecting ideas on the forum and have only few admins that integrate the shared doc).
@JonahTheBard, I like your idea of not giving full control, but put some limits like “choose 3 rules and apply to 3 heroes”. That reduces a lot the complexity and the probability of everyone having the very same rules :+1:
About the rules you are proposing they all make a lot of sense, but I would make one step back. This thread has started because there’s something in the game that doesn’t work well, the AI, so I’d start from analyzing the problem itself, enumerating the ways in which the AI doesn’t work well and then move to proposing ideas to counter those malfunctionings. It may seem like doing the work twice, but I think that the list of what is not working could itself be an interesting by-product that SGG may take into consideration for implementing some general built-in improvements in the AI.
I’ll start a list but I’m pretty sure it won’t be complete.

Issues related to dteams

  • Heroes use splash attacks on corners or isolated heroes
  • Heroes use sniper attacks on almost dead enemies
  • Heroes attack enemies with riposte active
  • Heroes heal when there’s no one hurt
  • Heroes dispel team when there’s no one debuffed
  • Heroes dispel enemy team when there’s no one buffed
  • AI doesn’t prioritize finishing off almost dead heroes
  • AI doesn’t draw mana from almost charged enemies
  • AI activates specials always from left to right (just suboptimal, may fire a sniper attack before using a special that buffs attack or reduces enemy defence)

Issues related to auto-play

  • Heroes use AoE attacks with few mobs alive
  • AI doesn’t prioritize matches that create dragons, diamonds or make combos
  • AI always blows dragons even if they don’t hurt anything
  • AI always blows dragons even if they don’t charge any hero
  • AI always blows diamonds even if there are few tiles of that color
  • AI always blows diamonds even if there are few targets to hit


The Devs are either watching this thread with absolute dread, or keen interest! :smile:

This is such a thorough and well thought through response @alcaselzer . Thanks so much for the time and grey matter committed to it.

The only one I’d add is:
“AI occassionally, and randomly, repeatedly attacks a single hero in a full roster for no apparent reason” (especially Scarlett for some reason) :thinking:

I’m half-joking. I suspect its a by-product of the current coding, rather than something that needs to be addressed.

I haven’t had a chance to look at your document yet, but I will. The next 48 hours are crazy, but I promise to get to it. I just wanted to respond to keep the momentum going on this thread and to let you know I’ve seen it.

I’m good to be one of the editors. But leaving me as the only one is about as sensible as leaving the nuclear codes in the tiny hands of Donald Tr… ummm, never mind. I’d feel more comfortable if there were other editors more Google literate.

Not being presumptive, but doesn’t it make sense that the editors are myself, you and the freshly annointed @JonahTheBard ?

I really hope others take the time to read through this thread and add their thoughts. You have both conceived quality concepts so far, that will benefit from more input.

Either way, I’m keen to keep this ball rolling…


If you want to be an editor you’ll need to ask for the invitation, here’s a screenshot on how to do that:

Of course if you guys prefer a different file format no offense taken, this is just a first draft to show a way to do it