Artificial Intellgence / CPU player bugs, logical/programming mistakes, and my wishlist as an AI modder

TL;DR I’m requesting access to ai\personality*.scar (and ai*.scar) files in a tuning pack. Also, requesting access to ai_tuning, ai_formation_coordinator, ai_formation_path, ai_formation_target_priority, ai_statemodel_tunings, ai_updater in a tuning pack/mod editor.

Before I start, I have modded many RTS AI (and many Relic RTS also, starting from Age of Empires 2, Warcraft 3, Dawn of War 2, Company of Heroes 2 - proof : Steam Workshop::Zycat AI, and now this)

MONGOL AI BUGS :

Taken directly from cardinal_scoring_functions.scar :

	-- Typically Expansion TCs  placement style 'ExpansionBase' makes them build at 
	-- suitable expansion sites (good resources). This intern causes PlannedPlacementScore to
	-- modulate how many TCs we build.
	-- However all mongol structures use the build style 'NearBlueprint' which causes them 
	-- to build near the ovoo. With this in mind PlannedPlacementScore will always be positive
	-- causing the Mongol AIPlayer to spam TCs. Therfore we must limit mongol TCs

WHY? WHY would you create a TC near the ovoo? Both capital TC and extra TCs should act like an extra drop-off point. Especially bad on early game where the Mongols must wait for an ovoo to be built → TC to go there and build, THEN AND ONLY THEN will the villagers work. WHY? Why early ovoo when you can build Ger instead? Town Centers My AI mod’s workaround is to just build it at the starting position, at least it’s around 15 seconds earlier compared to needing to wait for 30-40secs and having villager idle time which is fatal.

TC limit is also easily implemented because the production function itself already has a limiter.

Unable to scout using Khan (needing to build a Scout early on). Easy solution would be categorizing Khan as a “scout” in the Dark Age, military on later ages.

Unable to use Khan abilities effectively. Khan has 3 shared cooldown abilities, and the way it’s specified in cardinal_tactics.scar the Khan will almost always use the movement speed ability and put all 3 into cooldown. Check the logic, easiest fix would be limiting movespeed ability to Dark Age. Again, I would be able to easily fix this if you give tuning pack access to ai\personality*.scar files JUST LIKE YOU DID IN Company of Heroes 2.

Also, mongol armies will eventually get stuck in an Ovoo on long (20+ mins) games. I think it’s because somehow the rally point is set to an ovoo, thus they want to get to the ovoo but cannot because the Ovoo is a path blocker (it’s a building!)

RUS :

Scouts are completely unable to attack wildlife to gain passive bonuses, and it’s a big thing since it’s the main Rus mechanic. Can you set Rus, and specifically Rus scouts to kill wildlifes?

China :

Officials can’t supervise buildings.

HRE :

Unable to garrison a prelate in the Aachen Chapel. Also placement of Aachen Chapel sucks.

Abbasid :

Unable to properly build to get Golden Ages. House of Wisdom is built way too early wasting precious wood that could be used for dropoff points. Also, won’t choose the Economic wing early on. My AI mod will almost always choose the Economic wing now with the Fresh Foodstuffs, which is GOOD. I suggest you look at telemetry/machine learning data and see if anyone ever uses other wings in Feudal. Also, it makes me think that the “Machine Learning” feature that you loudly touted aren’t even affecting landmark/upgrade selections.

Delhi :

Unable to use infantry to build things. Unable to garrison Scholars to military production buildings.

Villager Production “bugs” :

EASY - Limited to 14% of Max Pop Cap, Limited to one villager per 55 seconds.
INTERMEDIATE - Limited to 25% of Max Pop Cap, Limited to one villager per 45 seconds.
HARD - Limited to 37.5% of Max Pop Cap, Limited to one villager per 30 seconds.
HARDEST - Limited to 50% of Max Pop Cap

People go over 100 villagers in competitions. But I’m disappointed because the main limiting factor for the various difficulties is simply this and not overall “smarter” or “dumber”. Also, the starting villagers gathering system is not what I call good since it tends to split 3 food 3 wood. Watch various youtube openings/high level players.

Military Production “bugs” :
EASY - Limited to 1 per type
INTERMEDIATE - Limited to 2 per type
HARD - Limited to 3 per type
HARDEST - Limited to 4 per type

Way too low. Also way too low number of productions built and not even reaching the limit on Hardest.

Upgrades “bugs” :
Minimum 8 minutes must have passed to research any upgrades. Easy gets no upgrades other than incendiary arrow, applies to Easy Sultanate as well.

WHY? Some upgrades are best researched earlier, like wheelbarrow. I think if you have the machine learning data from people researching upgrades you’ll see what upgrades people take and when.

ALSO after 8 minutes it will scramble to get any and all upgrades, it’s like the 8 minutes time limit is a CRUTCH instead of proper upgrade prioritizing. It will upgrade all military units, all tiers without even producing sufficient military units to warrant upgrading them. Suggest to upgrade only when it has enough units. Remember, quantity is a quality on its own.

Outpost : Easy - 2, Intermediate - 4, Hard/Hardest - 8 max. Too low for some civs, fine for others. Outposts are cheap at 100 wood so it makes sense to spam them.

Trader “bugs” :
Traders will be built after 12 minutes (Mongol/French) or 15 minutes, therefore negating the early trading advantage of trading landmarks.

Naval :
When it’s a naval map it should concentrate the efforts to build large water army much earlier and much more aggressive. I achieved it by simply increasing all naval military utility value, and getting multiple docks built. I suggest that it should be able to build docks way earlier in the game (like 2-3 mins).

General feedbacks (and hope for Company of Heroes 3):
Relic Entertainment’s RTS AI (Company of Heroes series, Dawn of War series, and now this) are notoriously bad that I even think the AI designer/tuner team either does not play the game OR play on the older pre-alpha version of the game and is basically out of touch with the current metagame. The AI system and scripting itself is fine and quite powerful but it isn’t even utilized well, if at all. My tips : FIRST FEW MINUTES of the game must always absolutely be totally scripted and heavily optimized to the second (think of it like an opening in Chess), then after that you can go with the more machine-learning-y reactive AI.

Just give us access to ai\personality*.scar (and ai*.scar) files in a tuning pack already. Also, requesting access to ai_tuning, ai_formation_coordinator, ai_formation_path, ai_formation_target_priority, ai_statemodel_tunings, ai_updater in a tuning pack/mod editor. haha.

12 Likes

I totally agree with you. I’ve tried your AI mod, it’s quite challenging and interesting, thanks for your great work. And I want to build stronger AI as well. I want my AI to follow some tactics that are usually used by human players, such as build another TC at 6 min. I tried to observe what AI did in a game, it was terrible in every sense. If we give its 2 times resources in our mod, he will use them to produce more spearman! :smile: