Strategies for making the AI competetive without cheating

Originally, this was a thread started at the Valley of Wonders discussion boards (which no longer exist). Post of thread is time marked 04-04-2000 18:05:54.


I thought I’d start a discussion thread, on how to make the AI competetive without setting the AI to Emporer level. For me, doing that takes all the fun out of a map, but if I know the designer has designed a map with intelligence in mind, it makes it much more fun… I’ve come up with several strategies on how to make the AI more competetive and am willing to share them with you after I eat dinner. But to start there is one limitation for each game: Hero’s Defense can only be boosted to 6 through advancement. It can go as high as you want after that with armor, spells and other enhancers.

Problem #1: AI Leader gets killed too early in game or accidentally. What I do, is I put the Leader in the races “walled” capital city, with an assortment of ranged units, and then I plant that stack there using “guard”. I do this for each race, so it’s even, and then I create a custom Hero for each race. He then gets to roam, and acts in the same role as the Leader before the Leader was planted in “guard” mode in their home town.

Problem #2 AI does not explore and conquer through entire map. I’m short on ideas here. I’ve figured out how setting groups to patrol, scout, etc. affect how far they roam and their aggressiveness, so setting more beginning stacks to scout may be the best way to have them continually explore and conquer until they’re killed.


Ok here is my thoughts: Problem #1: A now known solution but perhaps only by Jason, The Jerk and a few others map makers. I think Jason uses this trick since LOTR v4 but unsure. In Midkemia, the huge Dragons stacks in the Warlord Citadels are in guard I think (otherwise my elves would be dead

I use a trick in a map, called the ‘Sanctuary Trick’: Putting an allied stack on guard near a player objective is in effect protecting it, as any computer player trying to kill a stack adjacent to this stack, or trying to grab this objective will drag into battle the guarding stack. I’m using it for an independent altar of life, that will then become protected by 3 angels when the player take it.

Problem #2: I have a begining of solution there. The AI seems to be drawn from objective to objective. I have noticed this trend on a map where the AI always take the same course of actions. So I suggest putting not too far apart from each others interesting objectives for the AI to take. And avoid at all cost great gap of lands where there is nothing interesting for the AI to grab. This would be interesting to see how we can influence the AI moves by cleverly placing a ‘necklace’ of objectives heading toward the soft belly of the player empire, or toward the richest region of a map.

Hint #3: Avoid putting independant stacks on guard in anything that don’t bring gold or mana (tower to name it) as the AI is reluctant to take it, even if interesting things are behind the bottleneck.

Also be sure to know that the AI will never enter a damaging terrain (holy ground), so don’t create impassable sanctuary.

If you wan’t to put a neutral bottleneck, put a one hex unwalled town, or a power node, with a stack on it.

Jeff you should perhaps work on an AI FAQ, so we don’t have to repeat each time the same things, and post it on your site. note on #2: Now that I think on it, in Jason’s Songs of Battle the Orcs were able to make some landings, because there was only a small water channel between them and the continent. But in my game the Elves were in an isle too far away, and never made ONE landing… So this corroborate (sp?) #2 IMO.

Ffyrst Todh:

Hint#4 If you like the CP (computer player) attacking with strong stacks give him plenty of gold and upgrade some CP cities to level 3 or 4.

a) The AI guards his cities with many units. Often the watcher units cost more upkeep than the income of the city. Only if the AI has more units than it thinks it needs for defending his cities it attacks with strong stacks.

b) If the AI has no upgrade in the cities it builds lots of level 1 units for defending the towns. These units cost upkeep and so there isn’t enough gold for building strong stacks of high level units.

But then: The AI comes with two 8-unit-stacks with Reapers and Red Dragons nearby the humans with 3 stacks of level 1 and 2 units. Wow, I think, that is it. But in the next turn the AI splits the stacks in many stacks with 2 units and – the human crashes these little stacks (*sigh*).


One thing to consider is that the AI will never face unknown opposition. Because of this the AI will never explore dungeons, castle ruins, caves, etc. If you want an AI side to have an item, or it needs it, you better give it to them because they will never go into the ruin and get it.

I’ve also noticed that the AI often runs around all willy nilly, never quite accomplishing anything useful. It seems to become confused by all the possibilities. I don’t know if you can guide it without unbalancing that side by giving it too many resources. I have noticed that changing the personality of the AI affects how much useless energy is wasted. Although, agressive personality will cause the AI to field a large army, this personality seems to be the most wasteful and easily confused. Try the one where the AI is concerned with exploration and expansion first, fighting second. The AI seems more directed with this personality.


One thing I’ve found for Problem #2 is that you need to open the map up. Too many choke points and you will cause the AI to be stupid. I made a really classic error in the map The Watering Hole, in that the whole underground is filled with towers that block single passages. The AI doesn’t have the guts to go for structures like walled towers, for a couple reasons. One it needs a siege unit to get through it. And two, the tower really does nothing for it strategically (doesn’t give an income). So it is a very low prioriety building to conquer.

Provide multiple directions at which the AI can come at you. If you do want to do a choke point, put a tower in a mountain pass for example, make sure that one side of the tower is Hills, that way it’s not a true choke point… Choke points are great if you only want to play against other humans, but it’s difficult to explain their value to an AI.

Also a way to get the AI all over the place is to provide teleporters, and portals up and down in the earth. AI has a definite advantage when it comes to teleporters because it resolves all paths via these teleporters nonvisually, whereas humans simply can’t see what is on the other end of the teleporters. In my map PRANK this is incredibly obvious by how the AI independents can WHIP through the teleporter maze as if it wasn’t there. Whereas the Human player is completely confused…

Use teleporters to determine move AIs remotely… Finally, one other trick that I just discovered is that the AI uses flyers pretty well. I’m almost tempted to give ALL my AI players access to Dwarven Airships, because I was impressed at how well it was able to get across the map. Of course it doesn’t use them 100% smartly. I was able to cripple the Dwarves I was fighting, when they had an Airship filled with Dwarven Firstborn, and all sorts of 3rd level troops, etc, that was over the water. I had a Beholder and just killed it. If it’s a strictly CPU only player, I might suggest you give Air Galleys to the AI. It won’t abuse them like a Human player, and they will go everywhere on the map with them…

Anyhow those are a few incites from myself on Problem #2. Make sure you put enough resources in remote locales that the AI will go there. Often we put things AI doesn’t care about. Or block it with towers and chokepoints, that the AI doesn’t care about. You might even consider GIVING the remote resources to the enemy AI as a start up bonus.


Hmmm…. this is an ironic thread because I’m dealing with ALL these issues in my current map. After doing two big and hard maps (LOTR and Midkemia) I wanted to make one where the player could be any race… this is very difficult since it means balancing the AI to give SOME challenge….

I think the problem with the “upping” of cities to level 3 or 4 is that it guarantees you have to make that race unplayable to the humans because that would be too big an advantage. The second problem is with creating too many resource “necklaces” because the human can fly around and get them just as easily and have some sort of MEGA income which will allow him/her to thrash the AI.

The trick for me has been trying to create maps that are diverse and don’t just feel like different story – same bag of tricks (don’t know if I succeed lol). That is why LOTR is definitely a HARD map through pumping the enemies, but Midkemia starts every playable race in multiple positions… this helps the human but it ALSO helps the computer because it has access to more of the map right away and tends to know how to plan better than the human (initially) what cities to buy to continue going up in income.

I don’t know if this will work… but here’s what I’m trying in my new map (damn.. hate to give away secrets ) I’m making ALL races start with some level 3 and 4 and with their cities upgraded but then I’m making the surrounding neutral cities and resources well protected … this will allow the AI to expand and have built up cities, while also retarding the immediate advantage of the Human player just finding the AI and squashing him because all the intervening terrain is filled with nasty beasts Remember – this is IN THEORY – I don’t have enough of the map done yet to see if it works… lol.

I’m a bit tired of relying on too many stacks of enemy AI’s ready to teleport in… so instead I’ve prepared some “neutral” surprises that effects every race at some point during the game.

Hmmmm…. (deep breath)… hope you aren’t tired of reading (lol). I think Terrain plays a huge role… and I have seen the AI go across large tracts of land/sea… I’ve played my own “Songs of Battle” 3 times and 2 of the 3 the Elves immediately came across the sea and smashed into the lower continent.. in fact in one game they came up and bought out some Highmen towns before I could get to them! It seems the AI has good games and really dumb ones. Likewise with LOTR, I’ve seen the Elves take the Wood Elves and then thrash the Goblin’s ass… but other times I’ve seen it dilly dally in Lothlorien until it’s overwhelmed… hmmmmm I’ve heard some people complain about how they want a fun game that moves along… and sometimes I agree… I don’t think every map can be a brutal and equal fight to the finish because it hinders design a bit much… No AI in a game with AoW’s diversity of strategy can out-think an intelligent human.

I like Rayb’s note about how the AI can figure out “paths” of movement quicker… I’m using this in my new map with a few teleportals but especially with underground tunnels… the whole map is mostly underground this time… also, I’ve found that placing rock amidst the dirt hinders the human player because you have to figure out where to dig…while the AI tends to pick the most appropriate path… of course in a sense this is “cheating”.. but I know of no game (Sid Meier the master included) who doesn’t depend on this type of advantage to offer human players a challenge.


Pocus, I’m not sure I understand the goal of the sanctuary trick. Could you explain it a little differently? Thanks. One point that’s worth repeating is I never realized the AI prioritizes objectives, and that’s why it would not attack a defended tower (thanks Rayb!).

Jason, I’m trying to the same thing as you. Allow the map to be playable by any race, and thus not giving one side an immense advantage if they choose to play it. It’s too bad the AI cannot pick up and equip items, this could circumnavigate the need for monster lairs and pyramids…

I think I will do an AI FAQ as soon as we have more input and post t on my website (thanks for the idea Pocus). I guess most of all, I’d like to see the AI upgrade and defend his cities well, and then march with a good sized army to beat the crap out of its human opponents. Which setting is best for this? Aggressive? Expansionist? Normal?

How could we best achieve this? I think setting the leader in the capital on guard with a strong stack of ranged units is good for one city, but and ideas on the rest, and for a strong marching army?


I will try to explain better this Sanctuary thing, but as a french (nobody is perfect English is always an exercice of style…

Let’s take an example: The player will have a good race, and you want him to be chased everywhere by the AI with some places where he can rests/developps. Set for example the High Men as AI only, allied with the player. Then put HM stacks on guards adjacent to independant resources (altars, towns…). If the player manage to get these resources first, they will then be protected by the High Men stacks on guard. I have done this for an altar of life protected by a triangle of 3 astras. If the player get to the place first, the evil AI races won’t be able to take it back without drawing into battle the Astras (as they are allied with the played they join battle). This is just a subsidiary trick, nothing of real importance… Jeff: I don’t know how you can have a competitive AI without some sort of cheat. If you consider that giving AI a King or Emperor level is cheating, then puting teleporters for the AI is cheating too, as AI ‘see’ the teleporters path and not the players.

So here is a trick, with the AI getting more gold *income* than the player (i.e King or above level): Set independant towns near all the starting positions. The players will have difficulties finding enough gold to buy them, but thanks to more income the AI will be able to do this. This enable you to have all races playable, but in effect every AI race will be able to start stronger than the player. More freedom of choice then…

Developing the necklace of resource idea, you can then put such a necklace (creating bottlenecks from time to time) with friendly troops inside. The player will either have to attack to get them fast, or buy them slowly. For the AI, this will be a fast process, and additionnaly will lead him on a determined progression road.

As for your question on which AI is better, expander or agressor, I think we must all do tests…

The Jerk:

What I´ve done in both “Banned” and “Pirates!” is that I use one of the races as an AI race only. This way you can still have 11 playable races but also a good AI challenge. The trick I use mostly to get the AI to act smart has already been mentioned…almost. I try to force the first couple of moves for the AI the way I want him to move. It´s pretty hard thing to accomplish but it´s defenately doable. In the two aforementioned maps I gave the AI more then one city from the start as well as composed a couple of troops capable of taking on cities early on. The position of these troops decide whether the AI will expand quickly or slowly. Position them at the heart of their domain and it will take some time before they really start expanding. Place them close to strategically important sites and cities and their expansion starts immedeatly. Why not give them the strategically important sites and citeies at once one might wonder. Randomness! The AI will act differently from time to time so instead of giving them the sites I put good troops close too them instaed, it increases replayability.


I use many teleporters in my map Sorcerers and warriors,and it takes not long before the AI is everywhere,looked at Phrank before i begun to make SaW.If anybody wants to look at my map the pass is ricko.Map functions very well exept that azracs maybe have too easy beginnig,but i think i got a well spred AI in the map.They uses the teleporters very well.

Ffyrst Todh:

Ok, it’s good to make maps with all races playable, but I have the problem to make some only-AI races a challenge and no solution. If I had a solution for this problem I could go to the next problem: all races palyable. My scenario is a 6 player coop against 3 CP (could be more or less than 3 CP).

The 3 CP’s have more ressources than the 6 humans and have teleporters to the human races with 20 day fire. The beginning is ok. After day 20 the CP teleports strong stacks in the lands of the humans and there are heavy fights, there is a real challenge.

But if the humans have learned to handle these attacks and go to counterattack, there is only little defense from the CP and there is no challenge, there is only boredom. The CP builds less units than he could build, he has resources for many more units but doesn’t build it. Now I’m experienting with indenpendent units, watchers etc. But this is not really a solution.

I have all the hints and tips in this thread careful studied, but don’t find a solution. Any ideas?


How about trying this:
It depends on the problem. Is the Human Player getting to the teleporter too fast? If so, ruin it. Now, the AI has a direct route there, but the Human does not. Also, if you set some men (indp.) to help them(as in guard the teleporter so that the Human Player can’t set up a nasty surprise for any teleporting stacks) or perhaps use the Firewall trick, that may help as well.


If the computer has enough resources, it will build units, I never saw in any game I played a computer don’t build units when he could. That is IF you have set the computer to Emperor…

If you don’t mind that the computer has more resources than the player, you can put independant town with friendly units toward the computer behind a firewall timer. When the fire time out, the computer will access the towns and buy them, giving him more units, and more structures to build additional units. This can serve you also as an easy test: if you don’t see the computer buying town, then this means he lacks of gold. Now you perhaps want to make CONDITIONAL renforcements, not based on a timer. Can it be done in AOW? Yes, but it starts to be tricky:

The idea is to react to the players progression:


When the player(s) reach the Teleporter exit (T) they have to follow a path (*). To continue toward the computer main base of production (BASE) they have to kill independants guards (G). This action then free the computer reserve (RSV) that is now able to counter attack.

This is a conditional renforcement. As long as the players don’t use the teleporter (or reach any passage of your choice, I’m just taking one example here) and then kill the neutral guards, the computer reserve won’t do anything, because the computer never attack independant sitting on an open hex. The computer will perhaps aglutinate against the IDP guards. In order to lure the players in killing them, you should perhaps make a computer teleporter arrival adjacent to the guards so that the players don’t see CP units before it’s too late.

Ffyrst Todh:

The Teleporters are one-way from CP to HP. The HP has to go a long way to the CP. So he has to defend the teleport spot and at the same time has to go to attack. This part of the scenario is a good challenge. But if the HP comes to the cities of the CP, there is only little defense and there is no challenge.

Pocus – genial! I will use this and I think it could be a great help. Hm, the CP has to get a one way teleport for his units and …. oh, wow, starting editor … hours later … “… make a computer teleporter arrival adjacent to the guards …” – but then there is no condition for the reinforcements, the guards don’t stop the reinforcements. ??????????

I have used another trick for a reinforcement trigger. The HP has to drill a field and this field is a teleport spot for reinforcements. Only for underground, but a nasty surprise. Because the CP units, maybe I have erred, I will look once more at the numbers.


I guess the thing I did not like about Emporer level was the thought of massive amounts of gold and mana being given to the computer for free, with no way to turn it off – such as winning several mana nodes, cities, or mines from the AI race.

This was the biggest AI cheat I wanted to design my maps around. At that point you may have an almost invincible computer hero, and then you end up countering by making a “superhero” hero, and that cycle is what I was hoping to see us be able to break out of. I love the idea of a hero that is not invulnerable, that you must take some care of, which means you must think much more strategically. Otherwise it’s just another RTS but a slower clickfest (throw everything you got at whatever and you win). If the computer AI surprises me and has a chain of 4 stacks of 8 units. I want to be afraid I will lose that battle, and not smugly know I’m not really in big trouble because my hero can barely ever be hit…

At any rate, that’s my wish, and maybe it’s for AoW2, but if we can continue to come up with challenging ideas, that trick us into thinking the weak computer AI we’re playing feels a little bit more human, that would be great!

By the way, thank you everyone for the great ideas and lengthy explanations. This will help everyone with the creative process, so please keep them coming!

Ffyrst Todh:

“with no way to turn it off” – but if you take the gold/mana-sites from the CP he can’t produce units and will be a boring enemy. I like it to give the CPU-Emperor 500 extern income in gold and mana. I see no other way to get a challenge from this crappy (is this word ok?) AI.

“you may have an almost invincible computer hero” – Huh? I have never experienced an almost invincible computer hero. Their lvl 30 heros are no match for a lvl 4 stack and I don’t make a super hero, I use heros almost only for magic, seldom in combat. So I have only low and middle level heros (my best hero is mostly around lvl 15).


That’s why I started this thread. To see if there’s a way that we can do it. Make it more challenging without letting it cheat so much. So you feel like you’re more up against a human. Knowing that the computer has 500 extra gold and mana each turn, doesn’t make me feel like I’m up against a human. It makes me feel like I’m up against some poor AI with unlimited resources. Along those lines though, I wonder if there are specific things we could offer the programmers to help them “easily” make the AI a little better competitor?

To which the thread ends, with all agreeing that this was one of the most interesting discussions of all time. If I have to pick something that represents and demostrates the closeness of the mapmaking community and the willing exchange of ideas, this thread would be the one.

Back to Scenario Design Main Menu