Brad Wardell's views about technology, politics, religion, world affairs, and all sorts of politically incorrect topics.
Published on April 24, 2012 By Draginol In Elemental Dev Journals

Update: 

Hour long AI test video for the truly die hards who want to see all the mistakes:

http://www.youtube.com/watch?v=nnPKHQIksrA&feature=youtu.be

 

I see all. I know all. At least, when it comes to this map.

image

In the top left we have Markin, leader of the AI civilization of Gilden.

In the bottom right, we have me, Draginol, leader of Pariden.

How many turns will it take me to wipe them out? What mistakes will the AI make that can be exploited (and fixed)?

First…some notes

This build is 0.911 which has some balance updates to make sovereigns and champions a little less powerful. The monsters are somewhat more aggressive and the AI has had some general improvements since 0.91.

Second…help me!

If you see me making a mistake, let me know.

Early Game:

I train up two pioneers and then the tower of dominion. I recruit a champion and send the champion in one direction and my sovereign in another.

(to be continued).

image

Othollo vs. Black Widow monster. Othollo has stone skin enchantment on him already.

Othollo wins.

Opinion: Level 1 champion shouldn’t be able to take out a black widow. Suggestion, Stone skin should do +4 defense plus +4 per earth shard.

image

Same issue:

image

My first level sovereign took out a troll by himself.

Opinion: Troll should get 2X more HP than it currently does.

AI Early game: Meanwhile…

image

Lord Markin just did the same thing. However, he isn’t using stone skin.

Opinion: Stone skin should be a “gotta have” for the sovereign.

Let’s look at the code…

Ok, this is where “strategy” comes into play in AI writing.  The code is very conservative about casting spells with regards to mana.  So at the start of the game, it doesn’t cast a lot of spells even though, IMO, it should cast some spells as early as possible even if it means lowering the available mana.

There are a few ways to do this:

1. Have an XML value for “Early Game AI multiplier” which tells the game to multiply the value early on.

2. Have the code take into account that the value of storing mana should be different at different times in the game.

3. Treat certain unit targets different than others (the value of a spell that affects a sovereign is different than a spell that might target a champion that is stationed in a city).

etc.

AIs in the mist

image

As you can see, the AI is intent on building a civilization. An admirable goal to be sure.  But not a good strategy.

By contrast…

image

My early development has focused on training up pioneers and now soldiers to go out and conquer.

With those units, I go out and level up:

image

 

By contrast, the AI leader is Soloing it:

image

Mind you, it’s not that I don’t think about sending units to reinforce the sovereign.  It’s always a balance between how far should it send them and how long should the sovereign wait around? What’s the attrition rate of units getting to the sovereign? Should I send the sovereign home or keep him in the field?

There’s a lot of tweaking that goes into this sort of thing that improves iteration by iteration.

Combining Heroes

image

One thing the AI does is that once champions get to a certain level, it will gradually put 2 in an army and potentially 3 or more depending on their level.

This is something I have to tweak almost every build because what is a “high enough” level changes.

Now, In this battle the AI is escorting pioneers with two champions and a Drolgard (a mid level Gildenian unit).

image

The AI (bpttp, left) casts stone skin on himself and then gift of iron right off the bat.

Gilden’s Drolgard unit is better than my Destiny’s Guard unit but he only has 1 of them (the other is a scout). But he does have two champions.

Let’s see what he’s done with his champions:

image

Yeesh. Level 12.  This is why I get nervous about changing the soloing behavior. Because there is a cost to having the AI wait around for escorts even if he does get killed a lot more often.  If sovereigns got injuries, I’d have to rewrite this.

His other hcampion isn’t that great.

image

vs.

image

It’s going to really boil down to whether I can take out his units and his extra champion I think.

image

On the second round, the AI Markin cast growth on himself. Then his champion cast haste on him. So this is not looking very promising.

image

The growth spell AI Markin has is self explanatory. And bad for me.

image

So if I should have done something differently there, feel free to tell me.

 

…later, Lord Markin is alone. How powerful is he?

 

image

This is a bit of an ambush but let’s see what I can do against him.

His first turn he casts growth.

His second turn he casts stone skin.

His third turn he casts gift of iron. Very wasteful. Will check his mana after the battle. But it’s pretty bloody nasty combo. He has a 63 defense.

Here is how the rest of the battle goes:

http://screencast.com/t/uuG8UvkqKO

He only has 65 mana left so he must have determined that he needed to win that battle.

So that’s enough for today.  Plenty to integrate in for this week.


Comments (Page 5)
5 PagesFirst 3 4 5 
on Apr 26, 2012

DsRaider

Quoting DragonRider862, reply 53I'd say that a very big part of the problem with sovereigns/champions is the way magic progression works. It's kind of crazy. The only thing you need to do to get more spells is to pick new ranks of the spell school when you level up. The difference between rank 2 in an element and the maximum rank of 5 is potentially as little as three level-ups (in practice it will be more, since you're unlikely to get the option every single time, but it won't take long if you prioritize spell ranks whenever you can). The result is that your sovereign has become an archmage with access to the most powerful spells their discipline has to offer at a stage where the rest of the world still thinks putting pointy ends on their beating-sticks is a pretty neat idea. The results are what you'd expect.

Actually there are level requirements on magic traits so you can't get Earth4 until your level 7 for example. You could make an argument for increasing the required levels but personally I find that level 2-3 spells are all you really need to be cheap with magic.

Agreed. The traits and the number of shards do the rest.

on Apr 26, 2012


This is a bit of an ambush but let’s see what I can do against him.
His first turn he casts growth.
His second turn he casts stone skin.
His third turn he casts gift of iron. Very wasteful. Will check his mana after the battle. But it’s pretty bloody nasty combo. He has a 63 defense.
Here is how the rest of the battle goes:
http://screencast.com/t/uuG8UvkqKO
He only has 65 mana left so he must have determined that he needed to win that battle.

I wouldn't criticize the AI who just kicked your ass

Seriously though, I think the AI made a good call - the last place you want to be is staring at a defeated 1hp Sovereign rooted in your capital, with 80 mana in the bank that could have saved him. All resources are just a means to an ends, they're useless if they're not used, it all comes down to who wins the battle. And even if he could have won without spells, how much more hp would he have lost? Health is a limited resource too, it doesn't regen that quickly.

I'd much rather an AI that wins but wastes resources doing so, than one that loses by not using them when it needs them. If your solo sovereign is ambushed by an army with a champion, I'd say better safe than sorry and spend the mana.

on Apr 26, 2012

Tactical AI is making obvious non-optimal moves. It's casting defense after it casts an offensive buff that lowers defensive capabilities. Is the AI able to consider what it will do on the following turn?

on Apr 26, 2012

The AI is getting better - though I would like to see it use a wider range of spells in battle. While all the AI's tends to use buff and debuff spells, I always use direct damage spells that are very effective with traits that boost spell damage +50%, +50%, etc.

PS: Any chance of adding a powerful, intelligent, and magically adept fire or ice breathing ancient dragon to the monster list?

on Apr 29, 2012

OK I finished playing a full game on challenging (with Magnar) yesterday as I consider this to be the standard difficulty setting for someone who isnt a noob but desires a challenge - it's still a cakewalk although I saw some promising developments with the AI both tactically and strategically. Strategically, I noticed the AI made sure it had large garrisons for it's cities and it used a mix of strong units (e.g. spearmaiden) bulked out with cheaper units (more cost effective) and I should imagine this would be further supported with ranged units as they build them. Tactically, the AI seems to make sensible decisions with spells and also sits back on ranged units if it has alot of these units.

In terms of suggestions to boost the AI I have a couple of suggestions:

1) I noticed the AI training small scouting warbands and then parking them next to big monsters (which I notice still ignore the AI opponents) - the problem with this is that they arent doing anything except costing resources in maintenance and opportunity cost - I think if the AI is blocked by a big monster it should send those units scouting elswhere or return them to cities as a garrison force

2) The AI seems to overproduce units IMO - the more units are made, the higher the maintenance costs which involves raising taxes (massive penalties to research and production for a little gildar) and this leads to stagnation - I personally only build units with a clear purpose in mind (scouting, attacking, guarding) and I dont train beyond that becuase I dont want to get screwed by maintenance any more than I need to - when I see the AI traning and parking loads of units with no clear purpose, I know thats hitting their production and research pretty heavily and that they are falling behind the tech race

3) After playing the latest beta, I remain convinced that it's quite possible to do fine for a long time without racing to build additional cities in the early game - the additional cities get hit by higher unrest which means they develop slower and you have to spend resources training guards for those units, which means even more maintenance costs that need to be met by higher taxes

I'm going to play another game on a much higher setting today to see how much harder the higher settings are and will feedback after completing the game

on Apr 29, 2012


OK been playing ridiculous setting and the AI puts up a much bigger fight as they are able to pretty much ignore maintenance costs they are also keen to attack and I noticed some nice multi-pronged attacks and bypassing well defended cities for weaker cities, that was all good to see.

The AI also makes a crapload of mages too which is pretty effective as they bypass armour, although cloak of nature plus one of the elemental rings works well against this strategy. The AI did appear to react to my anti element approach by broadening it's range of troops so that was good to see too.

Some AI weaknesses I saw were cities with nothing being built and also enemy sov poorly choosing his equipment - I was able to get magnar to surrender and I discovered he had items that he wasnt wearing, instead he chose weaker items (e.g. he preferred to use a club over a balanced axe   ).

I'm about 200 turns in and I've wiped out 3/5 rivals with just Tarth and Pariden left - apparently Tarth is twice as powerful as me (power rating is something like 400) however I have no doubt I'll win because my Sov is now a level 19 god and will be able to kill em off by himself I expect. Would have played it through tonight however the game has glitched on me (won't let me end the turn) so I can't be bothered to go back a few turns at the mo and will finish it off tomorrow.

Brad, would it be possible to have 2 options for AI difficulty in the start game - one for AI algorithms and another for AI bonuses - I'd like to play against opponents where all the tactics are used but without the AI starting with mountains of gildar and resources.

The AI is getting better but I feel it's a long way from kicking my ass yet - I applaud your efforts though Brad, it must be hard to programme the AI with all these variables for it to consider

 

edit: I've actually abandoned the ridiculous game now - I'm certain that I would win but the game kept forcing me to reload my save after a gamebreaking bug that wouldnt let me end the turn after being attacked by 2 armies

on Apr 30, 2012

It would be great if the AI could have differing strategies to employ based on their characteristics.  When you talk about ensuring each of the groups are distinguishable from one another and have really interesting differences, this could be one other area to compare them.  It's something that would be apparent to the player as well.

on Apr 30, 2012

Watching the video ~ 18 minutes in and I think I see a problem.  I am sure others have noticed as well.  The AI does not value troops enough, at least not anything like how I do it and I am rolling the normal AI with no possibility of losing.

 

You shouldn't lose guys.  Make them run away til they level a few times while your sov kicks butt.  Also, all the buffs in tactical are a waste of mana.  If you need the buff cast it from the map, if not don't cast it.  Leveling your sov or first hero (whichever is going to be your uber titan) is priority one and two.  Grow and expand and all that but all monsters with their precious XP are for the titan and his band of merry men that stay out of harms way til they are leveled and upgraded a few times.

on Apr 30, 2012

Finished the video and I am even more convinced that the AI needs to value troops more.  Once a unit is low on health it needs to retreat and strike carefully rather than stand in and take the killing blow.  Attrition is the biggest problem with a game like this.  Not only does it stall your advances, it slows the game down with long periods of run back and restock, or long supply chains to the front.  A unit saved from death is brought back to useful much faster than getting new troops to the front (not to mention the XP loss, a few levels makes a big difference and that's a good thing)

5 PagesFirst 3 4 5