A little while back there was a thread in the Armory section where, long story short, Buggo mentioned Relic is compiling AI issues for future patches. I see a lot of threads where people mention the AI has serious shortcomings, but the specific problems are scattered here and there. I figured I start a thread to list what the problems are. This is in no way a rant against Relic - I understand programming a "smart" AI would be very difficult. I just know that there are many of us who play primarily or exclusively against the CPU AI, and a better more competative AI would be a tremendous asset.
During the life of this thread, Buggo has said she's keeping an eye on it, and, around page 19 or so, has asked for a "fixable" list. Hopefully we will get her what she needs to make fixes in future patches.
List is in devs hands and currently still being updated. Also, since this thread and list were started, I have started some AI coding and a combination or "best of" Warnstaff and Capt Combat's mods can be very effective.
***************************************************************************
Master List of complaints
Here is a running list of items listed in this thread (mostly in order of mentions from most to least).
This list is a compilation of all the posts in the thread - some of the descriptions will be based partially on what was posted and partially on my interpretation. I am in no way a coder for AI or otherwise, but I'll do my best. Between Capt Combat's mod and Warnstaff's mod, just about all of these have been addressed, SO I STRONGLY SUGGEST RELIC DEVS TAKE A LOOK AT THE TWO MODS AND SEE WHAT WAS CHANGED.
From Capt Combat as far as most of the below issues -
Link to Capt Combat's Mod -If you look over the code in my mod you can see how I've implemented some of this stuff. Really pretty simple coding.
http://forums.relicnews.com/showthread.php?t=173948
Link to Warnstaff's mod -
http://forums.relicnews.com/showthread.php?t=137865
I'll try and list :
Problem
When it happens
Possible fixes
1) Problem : Unit spam of all sorts (vehicle spam mentioned the most) - both CPU opponent and ally. I think I've seen almost every non-infantry unit mentioned, though light vehicles (pumas, kettens, bikes, etc...) are mentioned the most, and transport vehicles are very common.
When : can happen during any game, but is most obvious when the AI is "cut off" (via chokepoints or blocked/blown bridges) and creates units that do not attack
Solutions : Create a cap of sorts for the AI to produce each unit. There have been numerous suggestions for how to break down what the caps would be - one is a percentage based system where each type of unit (inf, support, light veh, heavy veh, etc...) should make up a percentage of overall force. Another would be a set number capped at certain number based on type of unit based on approx mid-game popcap levels. I would suggest using a % for each type of unit based on real life military ToE and military doctrine (I'm always a stickler for realism).
Create code for the AI to be aggressive and be able to break through blockages (see also below). Can't stress enough the need for a combined force arsenal.
From Capt Combat -
Building multiple units: Again its the demand system where the flaw is due to the inherent way it select units to build and management of manpower. I've incorporated a method that is tied to area control by the ai to the amount of manpower it must have before it will select a unit. Thus as the AI gets more territory it will try to purchase more expensive and better units
2) Problem : Unit grouping and standing still at odd places - usually at his base (includes CPU ally, and is often transports, though other units certainly camp). Also, not reinforcing units while at base.
When : can happen in any game, but, again, happens most frequently when AI is cut off.
Solutions : Create code that keeps AI aggressive and break through blockages.
As far as transports specifically :
From Capt Combat -
For the problem in general - from Capt Combat :HTs: There is a bug in the demand system for upgrading HTs. This is fixed in my mod by making a direct call to build the upgrade. (There are some other upgrades that encounter this same difficulty) Relic needs to look this over and come up with a fix
Why units stand at HQ: 2 reasons
1) they are trying to get reinforced. Problem with original code demand system as it gets lumped in with the same code for building units. Since the value of this is very small, the ai opts to build units instead of reinforcing. Fixed in my mod by revamping the way the ai reinforces. The code makes a direct call to reinforce when certain parameters are met. Additionally original ai can only reinforce one squad at a time regardless the amount of manpower it has. Fixed in my mod so that it can call reinforcements for multiple squads at once if it has the manpower necessary
2) Bad targeting. As the ai loops through all military points it can defend, it assigns a numeric value based on the point's importance. Since Base structures have a high importance they often override everything else. Fixed in my mod by removing these buildings if they are not under attack. If a base building does come under attack, the ai will only defend this building until it is no longer under attack. I've excluded activating the base defense algorithm if under attack by artillery within a certain range of the base. The added benefit of this code is that the AI will now aggressively defend its base. Also support units (i.e. HTs) will only sit in the base until they have the necessary upgrade to make it an offensive weapon. Exception to this is when vehicles can cap points and the HTs will move out before the upgrade is complete
Example screenshots of point 1 and 2 :
http://forums.relicnews.com/showpost...&postcount=248
http://forums.relicnews.com/showpost...9&postcount=37
http://forums.relicnews.com/showpost...8&postcount=38
3) Problem : Poor usage of British emplacements - whether it be not building at places where it should, building them where they shouldn't, or not building them at all (includes slit trenches, 17lb, 25 lb, and mortars - could also include US mg nests and WH bunkers). Also doesn't use abilities like button.
When : As far as my experience, I've NEVER seen any emplacements besides mortar pits, and I've never seen abilities used.
Solutions : Create code that makes AI build them (again, I know nothing about coding, but Capt Combat and Warnstaff have achieved this in their mods) and build them where it makes sense. See also BlackOmne's ideas towards bottom of list for possible solution.
From Capt Combat concerning Brit emplacements :
4) Problem : AI not using built artillery pieces (builds 'em - just doesn't fire 'em). Some units, like stukas, are obsessed with attacking your base rather than key troop or defense positions on the rare occasion they do fireSeveral problems are included in this specific issue and I'll try to highlight them the best I can
1) Placement of emplacements: The current code for placement relies on a request for production that can only build within certain parameters (i.e. Near_base, BS_defend etc) because of this placement is an issue. In my mod I have solved some of the placement issue based on percentage of territory held. But this is still not adequate. This specific code is also what hampers the AI from building obstacles. need better parameters for placement.
2) Demand for emplacement: Again the demand system utilized by the AI has inherent problems all based on priorities for the different building systems (i.e. request production calls) I've tweaked the priorities in my mod and it has had an impact. Brits will build ALL emplacements (tested and verified...right down to slit trenches), but again placement is somewhat of an issue
3) Abilities associated with emplacements, namely the facing ability for AT guns. The current facing ability has a error (too far much detail to explain it here) with one of the modifiers that cause it to cease functioning after one call. I've modified this and created additional code so that AT gun will face the enemy to engage. Thus the AT guns are, at best, difficult to deal with without artillery
4) Balance: Both PE and British emplacements count against the population cap while Wehr and US do not. This has a significant impact on play for the brits especially late game when they are trying to assault a base but have limited assets to do so. Needs to be addressed and balanced out.
When : As stated, very rarely used though they are often built
Solutions : Create code that suggests AI uses artillery when enemy units reach "critical mass" in one area or prior to attacking defended area. Base attacks should be last resort (or not until a well manned "base rush" is attempted). Could be one of the most important fixes, since good artillery usage can be so important to breaking defenses and a good overall attack. Playing against the AI without the fear of artillery completely changes the strategy used - if you don't have to worry about artillery, you can sit emplacements and emplaced units in cover bunched up in any way you want. It's defenses like these that the AI keeps ramming it head into time and time again (see below).
From Capt Combat -
suicide mortars and lackluster nebs: Fixed. there is a problem with the barrage call in both of these abilities. I've fixed this in my mod. Beware of the Nebs. They are devestating to infantry now. (All other artillery functions now work also)
5) Problem : AI value system/threat determination - AI seems to think +5 fuel or useless strat point are just as important as +12 - includes putting OP's on low level points and too often. Also, doesn't attack/defend most logical point at given moment, as well as doesn't build right unit for given time in game or situation. Also similar, doesn't seem to understand the cost/benefit for given units in given situations under certain circumstances (and "wastes" resources rather than save them for something important like teching up or building necessarily strong units for the given units on the field), and builds "obsolete" units late in the game.
When : happens in most games, though the degree varies from game to game.
Solutions : there is a system in place, but it needs to be improved upon. As far as units, a better combined arms way of building would be easiest since they will be able to tackle any situation. Maybe add into code for the AI to choose doctrine based on enemy or enemies play style. As far as determination of importance of points and areas, it's hard for me to say.
6) Problem :AI mortar usage - whether it be charging to death or just not used correctly. Can also apply to snipers.
When : AI usually creates these units, so it happens frequently.
Solutions : Create code that keeps distance units at a distance using the FOW cheat to know enemies LOS. Also, retreating when attcked sooner. Base attacks should be last resort. See also Capt Combat's quote from # 4
7) Problem : AI not using off map abilities/attacks in their arsenal, or just some abilities in their arsenal (even if they're key abilities or good/important ones, and certain abilities like wire cutters are never used)
When : It's hit or miss (usually miss) when they're used
Solutions : As with on-map arty, should be coded to be used when an enemy group reaches critical mass and would do the most good. Unused abilities should be coded in same manner, used when they will do the most good (i.e. using wire cutters to cut through enemy defense to break blockage)
8) Problem : No infantry or not enough infantry in late game, and sometimes in early game. Also (had to fit it in someplace) not building units out of forward HQ.
When : happens often in games
Solution : create the combined arms that is mentioned above. Forward HQ should also be coded to create troops to assist in creating combined arms.
9) Problem : Not setting up a defense at base, or not going to defend it when it's attacked. Also, not knowing how to break a defense. Will ram his head into it time and time again without any chance of success (artillery, on or off map would help).
When : any game, especially when blocked in and very rarely defends base
Solutions : using arty to break through defenses and making sure they have sufficient fire power to break through defense. Also, code to recognize when base is starting to be in danger and start setting up defense (again, from what I understand Capt Combat has come up with a way to make the AI defend his base better - see his 2nd quote under point # 2). Also maybe add ability to engis/pios to deconstruct tank traps and roadblocks.
From Capt Combat -
10) Problem : British putting trucks in bad places (adjacent to other truck(s), where enemy is present, not on logical resource points, etc...)Dealing with obstacles is an easy fix. I've given all engineer types breaching charges and they will attack both TT, Wire, and Sandbags as well and military structures. Thus obstacles are no longer true obstacles for the AI (path finding sometimes impact this, but that beyond my control).
When : just about every Brit AI game
Solutions : from what I understand this has been an issue for the AI mod coders, but I assume some sort of recognition for what makes the most sense. Need to find a way for trucks to be put on high resource spots and not all clumped together, while not putting them in danger.
11) Problem : Not building Kampfkraft center or getting vet for Wehr
When : seems to be the worst on Hard and Expert
Solutions : code to suggest AI slowly vets up
12) Problem : The inability to choose AI ally/opponent doctrine or company
When : any game with AI
Solutions : allow for in code - allow for option pregame to choose or make random. Also choose "commander" type or leave random
13) Problem : Not re-building/repairing base buildings after damaged/destroyed. Also, not making units from HQ when repaired
When : often when buildings are destroyed, though not major
Solutions : code to force rebuilding when building is essential to counter enemy. Rebuilt buildings should be able to be recognized as if they were never destroyed
14) Problem : AI absent in early game
When : happens most on lower levels
Solution : may be necessary on lower levels, but reduced or eliminated on higher levels
15) Problem : The need for a wider range of difficulties. Some have actually mentioned that the AI is too good - so, make easy for the noob and expert (or levels higher than expert) for the truly highly skilled
When : all games
Solutions : may not be needed if a good balance and diversity between the levels is created. May be needed if "expert" isn't hard enough or "easy" becomes too difficult with other changes. Possibly add an option for selecting AI resource rate increase to add difficulty if the player wants.
16) Problem : PE repairing at bad times
When : during most battles with PE AI. Bad times meaning when attacking or retreating in heat of battle is a better option.
Solution : code to recognize when it is "safe" to repair
17) Problem : AI only building one unit at a time
When : often in games
Solution : change code. See also possibly Capt Combat's point in # 1
18) Problem : units like HMG's or mortars capping
When : at times during games
Solution : could be coded to avoid capping at all costs
19) Problem : it was suggested by Saw that Brit Lt. and Capt. "maintain command range" deactivates when leaving an entered building. Also allow Lt. and Capt. to retreat with squad when retreating
When : when a Lt. or Capt. has maintain range activated and squad enters, then leaves building. May not retreat with selected squad
Solution : fix bug
20) Problem : snipers attcking units (vehicles) unnecesarily ruining cover. Also any unit attacking unit it cannot damage
When : when a camoed sniper encounters vehicle it can not damage. When inf attacks things like tanks it can not damage.
Solutions : have units, especially snipers, avoid attacking units that it is impossiblt to do damage to. Allow hold fire for snipers.
21) Problem : All three of these mentioned once - not repairing bridges, not using Bergetiger, using too much fake arty
When : occasionally with bridges (though it may be by choice of AI), fake arty when used by Brits (though it has been argued that it is a valuable tool for the AI), and bergetiger seems to never be used for it's intended purpose.
Solutions : bridge repair may not need solution, though it could be double checked as it was coded for OF. Fake arty could be toned down (but I happen to agree it's OK as is). Bergetiger would need to be reworked.
Some suggestions/ideas made by BlackOmne in solving the problems the AI has in placing obstacles or emplacements in good spots (or at all) -
- Modify the World Builder and existing official maps to allow mappers to place wire, mines and tank trap placeholders in good strategic locations on their maps (where they think wire and TTs would be best used to limit the front to a few deadly choke points or expected heavy traffic areas for mines). Then, allow AI pioneers and engineers to “turn these placeholders on” through the normal building animation, when they come close to them (and have sufficient resources in the case of mines). Yes, eventually these locations would become predictable to human players, but if built in strong strategic locations, that still doesn’t lessen the headache of cracking those defenses and there would still be some randomness to finding them based on whether the AI had time or resources to build them. There should be two sets of placeholders on every map, one for Axis, one for Allies. The placeholder tool should be similar to the one used in the game, allowing the mapper to drag lines of “ghost” wire or traps or mines across the map. They should roughly bi-sect the map such that slightly more than half the map/resources and VPs are behind the line. I would gladly volunteer my time for free to modify the official maps for Relic if the tools were in the World Builder, because I think I have a good eye for defensive lines and reading the terrain after 30+ years of wargamming.
- Currently, the AIs appear to build bunkers/emplacements/mines based on a range factor (that modders can adjust) away from ANY map point, without consideration for that points value or the terrain around it. AIs tend to build at the nearest points to their starting points before running out of resources including pop in the applicable cases. The facing of these items seems unreliable also – it might be facing in the direction of the enemy base or it might not. This makes the AI look stupid and inefficient. To fix this, I recommend doing something similar to what I suggested above for defensive stuff. Modify the World Builder and official maps to allow the mappers to place placeholders for bunkers, emplacements, howitzers and Brit HQs where they think the best strategic locations would be for these. The appropriate building unit would build these things, like above, when they get close to those locations and go through the typical animations to to turn the placeholders on. Again, you would need two sets of placeholders, one for each side. Again, these locations would become predictable but the same arguments, including the random factor, would apply. The placeholders would allow type (eg, Wehr MG or medic bunker) and facing to be specified. Again, I would volunteer my time for free to modify the official maps for Relic if they modified the World Builder. In the case of Brit HQs, there should a prioritized set of multiple locations for each HQ type so that there is enough randomness that the human can’t pre-empt the Brit AI by taking a singular set of deployment locations causing the HQs to possibly suicide themselves.
As far as pathfinding and other type issues...
1) Problem : General vehicle pathfinding
When : whenever vehicles are present and too heavily grouped or have "tight" areas to pass through
Solution : improve pathfinding code
2) Problem : Units stuck on barbed wire - making barbed wire looks like a circus (loved that quote)
When : see above pathfinding
Solutions : see above pathfinding
3) Problem : AI "cheats" like seeing into FOW or knowing your units/doctrine (although this was disputed by several posters as being necessary, and I have to agree with that)
When : constant
Solutions : heavily debated as necessary.
From Capt Combat as far as need for AI to see into FOW
4) Problem : Units running out of cover when they shouldn't or not "listening" to ordersFOW viewing.
having done extensive testing, the AI can not target into FOW with any weapon system or ability. Exceptions to this are the abilities that can target into the FOW, but these are also available to human players as well.
Does the AI look into the FOW. Most certainly. And there is a reason and need for this. Unlike humans, the AI does not have the ability to reason nor does it have intuition. It can only rely on hard data and make logical decision based on this data. Therefore in order to make the AI play a little more smartly, it has to be able to look into the FOW to gather data and process it. My mod makes use this data to generate the necessary data to make reasonable decisions on what to do. Without this, it would be like playing against me with your screen turned off. I'm not the best player, but with those kinds of odds, I'm going to mop you up pretty quickly. Hence, while complaints about the AI looking into the FOW are valid, playing against a poor opponent would generate far more complaints.
When : often when using cover and being attacked/attacking
Solutions : create better code "enforcing to the soldiers" the importance of cover. Should stay in cover unless they have fire superiority or are retreating.
5) Problem : Tanks getting in closer than necessary when told to attack
When : often when telling a tank to attack a specific unit
Solutions : code for tanks to recognize best distance for engagement (i.e. out of range of other attacking units if possible)
6) Problem : AI not noticing foot bridges and attempting to cross them with units it can't cross with
When : often when foot bridges are present on map
Solutions : code to recognize unpassable bridges
7) Problem : After Brit buildings are destroyed, AI still pumps out HQ's preventing game from ending.
When : occasionally when all are destroyed
Solution : seems to be a bug that needs to be taken care of
8) Problem : After PE Scorched Earth HQ is destroyed, still drops sector arty
When : obvious
Solutions : see above
9) Problem : BRIT SIMENGINE ERROR - GREATLY AFFECTS PLAYING WITH OR AGAINST BRIT AI.
When : when playing with or against Brit AI and they call in second or third truck.
Solutions : I've read elsewhere that Relic knows what the problem is, so hopefully we will get a fix soon. EDIT - FIXED!
10) Problem : AI can use CP abilities even after their HQ is destroyed (see # 8, but may apply to other abilities). Also, in the case of sector artillery, AI can target in non-friendly and neutral territories.
When : May only apply to certain abilities (Sector artillery use is confirmed and Henschel possible) but occurs after AI HQ is destroyed.
Solutions : Appears to be a bug, and has been reported in several different ways.
Maps with AI issues -
1) Lyon 2p and 4p
Problem - AI shuts down after first couple of minutes on occasion
When - possibly tied to the "locked sector" next to the road bridge behind gates that need to be destroyed
Solution - go back to 1.71 version of maps
2) Hochwald Gap 8p
Problem - when AI uses framhouse next to windmill as forward HQ, units built there there get stuck
Solution - change exit to other side, away from stream
*******************************************************************************
If anyone can think of new things to add, or some specifics to add to the list, go ahead and post and I'll add it. If you just want to just chime in and add that you would also like the AI to be fixed for some or all of the above reasons, do so as well - it would be like adding your signature to a petition in way.



That thread and many similar are what caused me to start this one. Whether it be players wanting smarter AI for their own units, better AI for their CPU ally, or a more challenging CPU AI opponent, there are things that can be improved. It just seems as if the threads were spread a little too thin to draw attention.
Definately drives the point home.
