AI Behaviour - Printable Version +- Forums (https://www.theblitz.club/message_boards) +-- Forum: The Firing Line (https://www.theblitz.club/message_boards/forumdisplay.php?fid=1) +--- Forum: Tiller Operational Campaigns (https://www.theblitz.club/message_boards/forumdisplay.php?fid=11) +--- Thread: AI Behaviour (/showthread.php?tid=74447) |
AI Behaviour - neonlicht - 02-18-2021 I bought games (e.g. East Prussia, Sicily) from the JTS website specifically because they say that it's possible to create custom scenarios for play against the AI. And so I've spent some time experimenting with the scenario editors. While learning how to create custom scenarios, and how to create AI Orders, I've noticed some AI behaviours that are baffling. Maybe there are good reasons for the AI's behaviour, but I'd be interested to learn of the rationale behind it. For example: I create a scenario with several objectives. The AI has 3 army corps. I assign AI Orders to each AI corps, instructing them to move on certain objectives. In testing, the AI begins moving its 3 corps as desired, but then something odd happens: one AI corps begins moving backwards, another stops completely and remains static, the third carries on and takes the objective after a firefight and assault. This pattern repeats every time I test the scenario. Maybe there are good reasons why the AI behaves/reacts like this, but I can't work it out. Would be interested to learn more about AI Orders and AI behaviour in JTS games, with a view to enhancing single-player custom scenarios. Thanks in advance for replies. :-) RE: AI Behaviour - LordFowl - 02-18-2021 Just curious here: are you testing by, for example, holding back your forces well out of visual range, to see if the AI would indeed proceed to take undefended objectives? Alternatively if you have forces defending the targeted objectives, is this a case of perhaps something about the disposition of the defenders and how the AI is programmed to deal tactically with particular circumstances? Perhaps it considers one nut easier to crack than the other? Does each objective have a VP with the same points, or are some worth more than others? Although I know how to set AI in scenarios, I'm ignorant about the inner workings of the JTS PzC AI - but I know that in many wargames there are two threads of AI: higher level, such as what you're mentioning with each Corps and their specified objectives; and the lower level, e.g. what should artillery target given several options, or where to form defense given terrain features etc. Very interesting topic, neonlicht. RE: AI Behaviour - neonlicht - 02-18-2021 Hi and many thanks for this---appreciated. :-) After further testing, including letting the scenario run for much longer, I found that the AI eventually does act on all the AI Orders defined in the Editor. But why it delays some AI Orders I don't know. Likewise, I don't know why it shunts units back and forth for no apparent reason. At first I thought maybe the AI was shunting units back and forth because it was hampered/confused by obstacles like rivers---despite there being plenty of bridges & fords available---but even after repositioning AI units on the map (in order to avoid rivers), the same odd behaviour was apparent. As for the objectives in my custom scenario mentioned above, the VPs do vary. Actually, I should have stated that the objectives are also timed to expire on certain turns: e.g. one objective (worth 10 VPs) expires on Turn 10; the next (15 VPs) expires on Turn 15; and the next (20 VPs) expires on Turn 20. In testing, the AI makes for all three objectives right away, but only pushes home attacks on the first two. The final objective (timed to expire on Turn 20) is dealt with differently by the AI: yes, the relevant AI army corps pushes a couple of units towards the objective at the start of the scenario, but then stalls the attack and goes firm. The AI corps then resumes the attack with its full force on Turn 18---long after the first two objectives have either been taken or expired. RE: AI Behaviour - LordFowl - 02-19-2021 OK, if I understand your description of the behaviour of the AI taking timed objectives, it sounds like it does take into account priorities. Which is reassuring. Although perhaps leaving only two turns to take the final one is optimistic! Unfortunately while I do have several JTS games, I don't have East Prussia or Sicily. If you're testing on Sicily I can imagine the terrain presents extra challenges to the AI. As with many AI's, I think the JTS one has problems prosecuting a competent attack, and needs extra forces to challenge a human. I won't go into the merits of other wargames where I consider the AI to be very good, except to say that with one of them with modded AI and knowing how long it takes to calculate, many users here would not like the extra time taken for a similar AI to consider all its moves. On a large campaign I can imagine you would need to leave PzC running overnight to complete an AI turn, even on a decent PC :) RE: AI Behaviour - neonlicht - 02-19-2021 Hi & thanks for this. Yes, I hear you. I once played a computer wargame called (I think) "Tigers Unleashed" (?) and while it had a capable AI, turn-resolution was very long indeed. Seems to me that, with JTS games (from Squad Battles to Operational Campaigns), the best approach is for the human to play as the attacker, against the defending AI. I also think that interesting & replayable scenarios can be created---even against a weak AI---as long as the Scenario Editor provides lots of features, design options, and tools that facilitate the introduction of random factors, in order to keep the human player off balance. That said, I would have hoped that---at the very least---any AI in a commercial game would be capable of moving units from A to B at a given time, and within a given timeframe, and that's what baffled me about the JTS AI, making me wonder if I was missing some obvious trick?! As for my custom scenario, the AI left it too late to take the timed objective, which expired on Turn 20, and so back to the drawing board on that! RE: AI Behaviour - LordFowl - 02-19-2021 Depending on how much patience you have - I wonder if you set the objective to expire on turn 22 for example, does the AI still attack at the same time and therefore succeed because of the extra two turns? I used to experiment a lot with AI in a different wargame which provided triggers. e.g. if a human controlled unit reached a particular zone it would execute a counter-attack, or withdrawal. This meant the AI could be a little bit more reactive, but only up to a point. In games where the AI is a basic script, such as here, I once resorted to making several versions of the same scenario, and ran an external script to randomly swap in one of the versions to the game folder. That way I never quite knew exactly which AI plan I would be facing. I'm not sure if this can be achieved in JTS with the 'strategies' AI option. Do you know? As in, giving the AI three different strategies - will it randomly choose one. Or is that only for reinforcements. So many questions! And thank you for the discussion so far, neonlicht. Certainly human vs human is the best way to play PzC, but like you I have an interest in trying to squeeze more out of the AI. RE: AI Behaviour - Green - 02-19-2021 You could try re-issuing orders during the subsequent turns but with slight variations. You could do this every turn if you really wanted to and if you could be bothered. The idea is to prevent the AI getting stuck in a repetitive loop of some sort. But there is no guarantee this will result in exactly what you are after. No matter what you do, you will get some odd behavior as the AI is not designed just to follow orders. It tries to react to situations but it is often not obvious what it is that it is reacting to. There is 'logic' behind it but will not always act in ways that are logical. Ultimately, you may be looking for something that you will not find. RE: AI Behaviour - neonlicht - 02-19-2021 Hi & thanks for this---appreciated. According to the manual it is possible to link AI Orders with Operations that are defined within Reinforcement Strategies (although no details are given on how to do this). I guess you could create an "Initial Deployment" Strategy for the start of the scenario with, say, 3 different Operations (e.g. Deploy Forward, Deploy Rear, Deploy Flank), each one having a linked AI Order. The AI would select an Operation randomly and the Human player would left guessing what comes next. Reissuing AI orders on subsequent turns (to avoid the AI getting stuck in a loop) is a great idea! I tried it and it seems to work well---many thanks for that! :-) Looking at my scenario again, I'm wondering if terrain is the crucial factor in seemingly odd AI behaviour? My map has a lot of obstacles like lakes, marshes, woods, streams and rivers. Consequently I adapted my approach and gave the AI several AI Orders spaced at 3-turn intervals, with the idea of nudging it along a road to its objective. This seems to work OK in testing. Another factor to consider (again, I'd be happy to learn more) is the level at which AI Orders are issued. I've been issuing AI Orders to Corps HQs. But maybe that is sub-optimal? I don't know. Maybe it's better to give AI Orders to Brigade HQs? And that brings me to another point---Command Range. Is Command Range a factor in AI Orders? Do units have to be within Command Range of their HQs to receive their AI Orders? Again, I don't know. In testing my scenario I also spotted another issue relating to AI Orders and HQs: in order to comply with AI Orders, my AI HQs are constantly on the move, which (by default) puts them in Travel Mode, which (by default) renders them "Out of Command", which (by default) seemingly has a negative effect on the supply/organisation/performance of their subordinate units. Even worse---some AI HQs are putting themselves in danger by trying to fulfil the various move orders. As my scenario progresses, HQ units are strung out all over the map, trying to attack objectives, frequently "Out of Command", isolated and vulnerable to attack, and with their subordinate units far away, out of Command Range, disordered, and low on ammo & morale. On the plus side, this has the effect of creating lots of mini dramas, not to mention a massive battle-chaos factor, and so the overall effect is quite amusing. :-) RE: AI Behaviour - wildb - 02-19-2021 Before you get to harsh on the AI, consider how Deep Blue (supercomputer) beat a Grand Chess Master. It had a database of the results on hundreds of games won by Grand Masters. I can imagine that database was quite large. Compared to PZC campaign the chess game is much simpler. A few of the programming aspects of chess: The board has 64 squares. The total number of pieces for each side is 16. 8 Pieces move forward one square except on first move where they could move 2 squares and capture by moving diagonally. 2 pieces that can move any number of squares in a straight direction and can only capture what is front of them. 2 pieces that can move any number of squares in a diagonal direction and can only capture diagonally. 2 pieces that can only move three squares and then hook right or left. 1 piece that can move in any direction and can capture in any direction. 1 piece that can move only one square in any direction and can capture in any direction. No terrain or weather constraints. No weapon effects to consider. No hard targets vs soft targets. No improved positions, trenches, bunkers, or pillboxes. No supply considerations. No morale considerations. RE: AI Behaviour - neonlicht - 02-19-2021 (02-19-2021, 09:55 PM)wildb Wrote: Before you get to harsh on the AI, consider how Deep Blue (supercomputer) beat a Grand Chess Master. It had a database of the results on hundreds of games won by Grand Masters. I can imagine that database was quite large. Yep---that's a fair point! :-) |