Topic: are there still plans to teach the AI to micromanage level 10 soldiers? (and other stuff about AI efficiency)
king_of_nowhere Topic Opener |
Posted at: 2016-08-19, 18:22
Some time ago, someone was trying to get the AI to get level 10 soldiers by micromanaging. For those not familiar with the process, it goes like that (I'd like to be able to put this under a collapsible spoiler to make the wall of text easier to navigate; some indentation would be good too):
Level 10 soldiers are very expensive, but since they will go heal after winning a fight, they can mow down legions of lesser soldiers with negligible losses. And a human using that strategy has a huge advantage. Currently, the AI takes 5-6 hours at least to get level 10 soldiers. I was playing "large ocean" in hardcore mode (1v7 starting from the worst position), and I was mildly disappointed. Starting is difficult. You'll get attacked by 2 enemies before you can really make a good economy. Hard to survive while you work on that first level 10. But then... Then it becomes a piece of cake. With a handful of level 10 soldiers, you plow through your starting opponents. Then you keep expanding, you meet new opponents, and you tear them apart too - and all while hardly losing any soldier. The later opponents, far from facing a human weakened by a prolonged struggle with their allies, face a human who has made a much better economy than they did, and crumble like a wet paperbag. Only the final foes in their islands will manage, by the time you get to reach them, to provide some good soldiers to challenge you, but only a handful of them; most of their resources will be squandered on half-promoted soldiers. So you face 10-20 fully promoted soldiers, and then it's back to tearing apart wet paper bags. So, in the interest of providing a consistent challenge to skilled human players, I got some ideas there. As far as I know, those previous attempts to teach the AI to micromanage failed because they could not get the AI to use a soldier with evasion in the training camp. All the soldiers with evasion would go to man the front line, and a poor rookie would go to the training camp and get all the weapon and armor promotions. Which is a huge waste, because a soldier fully promoted on attack and defence but lacking evasion is hugely expensive, but nowhere near as effective as a fully promoted one. It does easily, and with it the resurces to make a couple dozens lesser soldiers. My idea is, could we teach the AI to do the micromanaging trick only as long as it has no enemies in sight? If there are no enemies around, the fully promoted soldiers would not go to the front line. Therefore they would be available to go in the training camp and get fully upgraded. Therefore, when the human finally get to meet them, they will be able to field some fully promoted soldier. And the human won't be able to steamroll over them without taking losses, and will be happy to have found a more significant challenge. Another idea: some promotions are clearly more cost-effetive than others. Evade promotions are the best, because they take no metal. Then attack promotions, because they can triple the attack value of your soldier. Last are the defence promotions; they only increase the survivability of the soldier by about one third; a soldier with attack and evade but without defence still has a 30-35% chance against a fully trained soldier - and it costs much less. It may even be more cost-effective, in fact. The AI does not take that into account, so you can see soldiers trained in defence but not in attack, and often not even in evasion. I can't overstate how huge a waste of resources that is. A barbarian soldier fully upgraded in defence (I've seen the likes many times in the armies of the AI) costs like a half-dozen lesser soldiers, not counting the food needed for the training, and it is only mildlly more effective. So, we could simply instruct the AI to focus on the important promotions first. How? By telling it to stop the higher training until the front line is manned with the best soldiers. Such an AI will initially remove all the food from the training camp because the arena has to work to get all the front soldiers to evade. Once all the soldiers in the buildings set with "prefer heroes" have evade promotions, the AI will get food and weapons to the training camp, but not armor/helms. Those will arrive only when all the soldiers in the aforementioned buildings are fully promoted in attack. Oh, and of course the training camp won't train any soldier lacking evasion; it will kick it out instead (we could allow attack 1 because it's cheap enough to go to a soldier without evade, and it makes a pretty goood difference). For the atlanteans it's going to be a bit trickier because the HP promotion is cost-effective, the shields are not; so the order is evade - HP - attack - shields. This would vastly increase the efficiency of resource allocations. Last, since many humans don't know/want to micromanage, those settings could be activated by a specific AI level, which could be called the hard level (since so far we lack one). By the way, the description of the AI levels could be improved. As far as I know there is no description anywhere of what the difficulty levels do. We could have a window like we have for the game mode, that appears if you hover the mouse cursor over the option. The description could be as simple as: very easy: the AI is severely limited in its production, and won't be able to upgrade its soldier at full - easy: the AI is moderately hindered in its production capacity, though that only becomes apparent on larger maps (remember that as of right now all the difficulty levels do is setting hard limits to how many buildings the AI can make) - normal: the AI has no special limitations - hard (if we implement it with my proposal) the AI has no limitations and will be able to perform some tricks with micromanagement. Of course all this stuff is targeted at build 20. P.S. The soldier levels page (https://wl.widelands.org/wiki/SoldierLevels/) still is not updated for the increased attack values we gave the barbarians during a rebalance some five months ago. Edited: 2016-08-19, 18:29
Top Quote |
Tibor |
Posted at: 2016-08-20, 22:05
Well I would implement some of your ideas, but they seems too complicated for me to code. Could you for the beginning suggest 1 or 2 simple rules for trainingsites that would improve current situation? Top Quote |
DragonAtma |
Posted at: 2016-08-21, 06:02
To clarify, training buildings use two groups of resources. This post calls them:
Edited: 2016-08-21, 06:10
Top Quote |
king_of_nowhere Topic Opener |
Posted at: 2016-08-21, 09:05
Why would you consider strong beer to be equipment? it only costs grain and water, it is food. "equipment" is what costs metal. But, let's see if I can codify some simple instructions for the proposals: a) the AI micromanage fully promoted soldiers when no enemy is around
This should return a fully promoted soldier. Modifications for atlanteans:
This set of instructions would not be executed if enemies are on sight. b) the AI micromanages to get the more cost-effective promotions first when enemies are on sight
This is more complicated for atlanteans:
Top Quote |
DragonAtma |
Posted at: 2016-08-21, 10:08
It's true, strong beer is definitely not produced from iron -- but I wasn't categorizing them by what they're made of. Instead, I was categorizing them by how many upgrades required them: 1-2, or all/nearly all. Top Quote |
Tibor |
Posted at: 2016-08-21, 19:19
Well, the proposed change looks like a work for 50+ hours. If it was like 2 hours, I would gladly do it, but it is too much for me... Top Quote |
king_of_nowhere Topic Opener |
Posted at: 2016-08-22, 09:07
From the point of view of cost-effectiveness, the important thing is how much it ddoes cost and what benefits it does provide. Top Quote |
gnarfk |
Posted at: 2016-08-22, 09:23
Personally, i have another idea to solve this. Instead of trying to teach the AI micromanaging, why don't we change the way the training sites work ? We could think of a "train the best soldiers first" button ? and something like in the military buildings "prefer heroes". In that way, micromanaging will not be needed to create fully upgraded soldiers. Top Quote |
Tibor |
Posted at: 2016-08-22, 20:24
+1 Top Quote |
fk |
Posted at: 2016-08-23, 12:16
@Tibor What you need is the possibility to suppress the training of rookies. Top Quote |