If X then Y - programmable AI [AI Improvements Master]

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

1 Like

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

1 Like

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)

1 Like

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


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

1 Like

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

1 Like

I think I just did that. You can respond to the email address that is attached to my Google doc. And we can work out where to go from there … thanks again for the work you’re putting into this.

Hi guys, love seeing all the thoughtful work on this.

I’m suddenly a bit snowed under, but will have a proper read through as soon as possible

1 Like

No hurry. Let’s not rush this. Good things come to those who take the early bird…

Auto play is great, saves time and lets us make coffee while the game defeats whole creeps for us. But all we know manual play is more advanced, we can use heros special skill more efficently. I would like to see game could provide us better auto play in 2019 like;

  • Healers should not be active every time, it should check the healt of each alive heros healt if one of them is under %80-%90 then the healer should heal.

  • if there is a diamond chanse system should detect it is stead of wasting it!!

  • Splash skills should target to middle of team

  • We know where we can play auto, we sense it, no one wants to lose energy, so if a heros special skill effect is still on the team, activated hero should not use its speacial skill should wait next time.

  • When is time to face BOSS most powerfull speacial skill attach should target the Boss first.

*Speed boost would be great. Most of the time we need Recruits with lees energy. So we attack the weak creeps it takes much time.

what more we can add?

@JonahTheBard you will like the post I am not compalining this time. Do we have chanse to see advanced auto play in 2019?


I like it very much as it agrees very closely with an idea I proposed myself.

Will it be implemented? SG have given themselves a long to-do list in 2019 but it could be the next big thing :blush::+1:


Dear developers,

I have been playing E&P for about 2 years now, and still have fun with it. Thanks!

There are of course a lot of ideas on this forum about what heroes should be buffed, how the ascension mats should occur more often, and so on. While many sound good in theory, I am pretty sure that implementing them would affect a sort of equilibrium that exists in the game, and either make it too simple, or too hard.

Anyway, what I am addressing here is another issue: the quality of the auto-play. It is very often the case that when auto-playing a level the AI makes the weirdest choices of gem combinations, leading to very long and boring battles. Sometimes, one might even lose a battle that should have been a win. As I am a programmer/computer scientist myself I tried to figure out what you guys are doing and also to propose another solution for that.

Firstly, my impression is that the current algorithm is somehow deterministic. Kind of: look quickly for a match, make it; explode gems or “cross”-tiles if they occur (“cross”-tiles first), etc. Maybe I am wrong, and maybe your search is a bit more sophisticated, but it is clearly nothing very complex (like game trees, etc.) - in the end you want something that works fast and is lightweight. As said, this may lead to weird choices of matchings, sometimes very frustrating w.r.t. the choice of heroes in the attacking party.

Secondly, we come to my proposal. It is pretty often the case that many good puzzle game-engines use now Neural Networks and machine learning. Why not use this too to design the auto play. As I see it, the problem can be (at least on a starting level) easily formulated as follows: given a 5x7 matrix of numbers from 1 to 5, the NN needs to decide what two adjacent positions should be switched. So, we have as input the matrix, we need to compute a move. With a sort of deep architecture this should be learnable, provided that we have enough training data. Want to make it more difficult: add the colors of the attacking team in the mix.

Data is something that you should maybe have: just record all the games in beta-testing. For each tile screen one get, record the move the player made. Many beta-players are good players, so it should be easy to learn “good-moves”. Also, there are enough beta-players to avoid over-fitting.

I am pretty sure that this approach could be as fast and lightweight as your current one. And maybe it would increase the level of the auto-play.

Dr J.


Would be nice to set up a “defense team strategy” that would default your defending heroes to target certain types of heroes or target specific situational elements.
Either a team strategy that is very broad such as:
-Target Healers First
-Target Flanks
-Target Lowest HP
-Target Elemental Opposite
Or for more in-depth AI strategy, you could select a specific behavior for each hero.
-Tiburtus - target in order, center - flank - rear
-Lianna - Target Lowest health
-Kageburado - target healers first
-Joon - Target Hero with most mana ( special activated first)
Something along those lines of being able to select default targets for your defense to strike.
I’d probably limit the targeting to special skills only.

This is a great idea. Could offset the current balance in wars a bit.

There is just one part of your example I do not get.

Why would you setup something like this for Lianna?

I like this idea too, and was going to suggest the same. Unfortunately since we cannot actually watch our defense teams in action it would be difficult to judge the effectiveness of our choices though.

1 Like

It’s an example. Literally, just picked a name, and an example of an effect…


1 Like

Cookie Settings