uran21 wrote:Thanks for sharing your experiences. It is very useful indeed.
You're welcome, I wasn't sure if my personal anecdotes were any good, because those are real-time first-person shooters designed for multiplay, which is as far as it can get game-wise from Panzer Corps.
Placing focus only on how AI should deny victory to the player or how it should make greater damage to the player and in the same time neglecting its interactive value and role can be missleading in development process. Predictability, not only, in "obviously stupid" situations can also be a result of searching for optimal solutions where one action is chosen as optimal for all situations. An example, AI can hit three units. Attacking first unit causes one point of damage but in terms of prestige it is the most expensive one. Attacking second unit causes two points of damage and it kills unit because it was understrength. Attacking third unit causes three or more points of damage and it reduces unit significantly. This is very easy solution to achieve because it takes only randomness factor on top of decision making where decision is to attack a unit if odds are favourable. What is much harder to achieve would be a decision between killing a unit and blocking the path to a unit which is about to enter last victory hex thus potentially ending scenario. Parameters that are taken into account in decision making is the hard part but even without it in the sphere of already possible realm there is much much more room for improvement when it comes to unpredictability.
That is a very good explanation, yes, it's relatively easy to let the AI calculate odds for single, seperate engagements but very hard to get it to execute a 'battle plan'. I'm not very experienced in the desired 'human-like' and imperfect behaviour vs. optimization strategies when programming AI, but one of the friends I play with has a degree in Artificial Intelligence, so I have a bit of experience discussing this subject. As further examples, other typical human behaviours that seem hard to replicate would be things like a 'sacrificial' attack by one or more units to gain a long-term advantage for other units, diversionary attacks to draw away enemy resources, or a premature withdrawal into a better position to contain (potential) breakthroughs.
Situation you described with attacking unit supported with artillery during bad weather can be applied for any situation on the edge of fog of war. Bomber is visible but escorting fighter is hidden. AI will attack bomber and suffer casualties but what it should do is "deselect" itself to observe the area first and than calculate how favourable shot is. This example is also good on showing AI with human-like characteristics. No doubt AI should use this tactic but certain percentage of randomness, like 10% or 20%, in "forgetting" about it would create human-like error.
Yes, good example, I recognize the situation, I always try to attach fighter escort where the AI will have the worst chance of spotting it. This 'forgetfullness' percentage of randomness can also be used to adjust the AI flavour or in other cases to adjust the difficulty. Although, as a side-remark, in the current game 'deselecting before firing' can be modded out in the gamerules.pzdat (depends on settings the modder enters), so every extra AI ability added could require a lot of extra testing or force the developers to limit those sort of player-selectable options which might complicate AI decision-making too much.
Which brings me to my other point, proper AI coding seems to require a lot of testing, and is harder to perfect than just adding extra tanks and maps to a game. So if developers have limited resources it appears to me that it is economically unattractive to spent a lot of time and money on it, if the game content is reduced too much as a result. This extra investment will pay itself back much later, because than map designers won't have to spent hours redesigning map triggers/zones or rewrite AI rules everytime a new type of unit gets introduced. But that means a game has to be economically viable first, so initially spending a lot of resources on AI optimization always seems have a worse risk/reward ratio than simply add more content.
This is the 'quality vs. quantity' argument, which ultimately depends on opinions and economics. I am a perfectionist, so I tend to go for quality, but in a lot of situations, I am a 'macro-perfectionist' where I look for the most long-term cost-effective solution for a problem. This is usually actually more dificult than just selecting the option which will give me the best quality, because the time I spent on achieving this quality will degrade my abilities to solve other problems equally well. Which is why, I think, it is easy to make AI like a perfectionist, but making the AI as a 'macro-perfectionist' will be very hard, because it will need planning/timing skills and long-term risk assesment (for example it needs to evaluate the chance of a possible weather change).
I'm not sure if it is true, but my experiences with PC games during the years give me the impression that progress towards real AI sophistication seems almost at a standstill, the biggest improvements seem that, with the increased computing powers, more advanced calculations can be made (better, faster choices when presented with more options) and being able to do that for more AI game-entities at the same time. But really sophisticated, adaptive abilities still seem far away. On the contrary, scripting the AI to make it seem clever is as popular as ever, which can produce impressive results, but only once, usually. Once again, I am not sure, it just seems that way to me.
Anyway I am of opinion that investing in areas that do not seem so attractive on the first look like AI and its interaction with terrain as precondition to its interaction with friendly units around it and finally its interaction with enemy units in terms of positioning against them would create good foundation to build upon. Without a single shot fired so far... Varied iteration sequences, combat and a little bit of memory but not for cheating would be the next step. It would be interesting to see the difference between shortest route to objective is "obviously" optimal route as well as it would be challenging creating something different.
I agree with your opinion, this would also give the AI a lot more built-in flexibility to deal with extra content or user-made maps. Without having to provide the scenario files with all kinds of different AI 'rules' for each specific situation that could occur during scenarios this would save time in the long run as map-making and unit balancing would be far easier I suspect.
About the use of terrain and routes to objectives, a nice example of that is in the final map of the latest DLC West 42-43, Volturno Line. I encountered a typical situation which could have been solved by the sort of attention to AI interaction with friendly units and terrain which you describe. On this map, Casserta (6,22) gets attacked by the AI by many units in two waves. The terrain layout around the hex is very good for defending, the AI has to cross a river, and there are swamps on the northern side. I could repeatedly stop them crossing the river with just four units, one in the city hex, one in the hex against the river, both were covered by a single artillery and the artillery was covered by anti-aircraft or a fighter.
The AI mostly entered the river hex, and stopped, did not attack because they would lose badly. They were easily destroyed, because their artillery would not move up (traffic jam), and the only problem I had was running out of ammo. They would sometimes try to cross the river one hex further away, but with the same results. The funny thing is, four hexes away, at Castel Volturo (2,25) there was a similar crossing, but although the AI captured everything around Naples, they usually would never seriously try to cross there. I could actually sent a tank over the river at that point for hit-and-run attacks on vulnerable units. There was never an attempt to flank Casserta or make a simultaneous attack on both crossings. This could be simulated by carefully placed triggers and orders, but I agree that is would be far better, and in the long term more efficient, to make the AI capable of applying these skills on its own. Then it would have attacked repeatedly in a single turn to deplete my ammo, making it possible to damage my units, or keep me occupied at the main crossing while sending fast units around the flank.