How often are YOU running into the "super lucky" opponents?

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, then a spell, then a normal board move. There are obviously some problems with making code like this here, where suddenly the AI would always make skull matches instead of casting spells (often referred to skull baiting). Basically, the AI started becoming predictable (and exploitable).

On top of this, the old AI system was created in a way that each troop had to have it’s own bit of code on what and when it should cast it’s spell. This system was fine when the game was released, but with an expanding game like Gems of War, this no longer became viable, especially with the console version reaching 300+ troops, and heaps more weapons.

Just to inform everyone on how the new Console AI works, every possible board move and spell is calculated and given a score. This score is calculated and is changed according to certain aspects of the move. For board moves, there are multiple factors which changes this score. Here is a breakdown from highest to lowest -

  1. 5 of a kind
  2. 4 of a kind
  3. 3 match of a troop on your side which is still alive and still requires mana
  4. 3 match of a troop on the opponents side which is still alive and requires mana
  5. Any other board match

Troop and Weapon spells are a lot more complicated to work out, as each troop has a unique spell. Instead of one targeting code per troop and weapon, each spell is broken down into pieces and given a score instead. This means that if a troop was to poison a troop, then a ranking would be given for “poisoning a troop”. Damaging a troop has a different score, where True Damage gets a better score (but only if the troop still has armor). This code starts getting even more complicated when more complex situations come into place, like chance to devour Goblins, or double damage for Yellow troops, or casting manaburn when the target has higher mana values. On top of all that, what troop should it target, what gem should I target, can I only target the first or last troop; these all have to be taken into account, and this score needs to be calculated per target. This code is complex, and all these things are taken into account. This all produces a score per spell per target, which can then be compared against all other spells and board moves.

Basically, the AI tries to take into account anything a normal player could take in to make their decision. Depending on difficulty and player level, there is some random numbers multiplied in there to make sure that there are some mistakes made by the AI, but they should be similar to what anyone could make.

I do apologise if any any of these changes have made the game seem like it is cheating. As mentioned, it is a complex system which may still require more fine tuning, and evolve over time as more spells are created.

I’ve looked into the board dropping calculations and I can confirm that this code has not been touched since we have taken over the project.

7 Likes