-
@redrum Ok. I believe that, beside politics, the only 2 major issues are (about as important) the tendency to lose huge amount of TUV to kill super-stacked "Minor Clans" territories (probably the AI should just check if the player has a "Conduct Combat" phase, and treat it as a Neutral if it doesn't) and the fact that it buys very few Ashigaru (the best unit in the game). If only these two would be fixed, then the AI would become a true nightmare, on that map, without politics.
I think the ability of receiving support should be valued just as much as the ability of giving support. It is really next to irrelevant who is giving and who is receiving: the precious one is whatever of the two that is in the shortest supply. So, practically, what the AI should do is to see what are the units that are going to be bought in the biggest numbers, between givers and receivers, then give the support bonus value to the other one (no matter if a giver or a receiver). For example, in the basic games, we have infantry 1/2 cost 3 and artillery 2/2 cost 4. In this case, the infantry is better than the artillery on the basic stats, so the artillery gets a bonus value for being able to give support. However, if the infantry would be 1/2 cost 3 and the artillery 2/1 cost 3, then the bonus value (to buy some more of them) should be given to the one that, on basic stats, you would buy the least (in this case depending if you need defence or offence). For example, if you need offence, thus are buying many more 2/1 artilleries than 1/2 infantries, then the infantries should receive a value bonus for being able to receive support. As you can see, if you have more artilleries than infantries, each new infantry you by is practically a 2/2 unit, while each artillery you buy is practically a 2/1 unit. In this case, actually, it should never happen that you buy more artilleries than infantries, no matter how much you are attack oriented (because, as long as you have more artilleries, infantry is just the same as artillery, but with more defence for free).
Of course, the AI should see who is in the shortest supply with reference to how many can be supported. The Daimyo is a good case, since it supports a virtually infinite number of any other units. Thus it is the other units that should receive a value boost for being able to receive support (as they are surely the ones in the shortest supply, since the Daimyo can always support more) and, amongst them, the boost should induce the AI to buy more Ashigaru than other units, since 1 Ashigaru is just as good as using the available support, while it costs less, thus you can get more support bonuses, for the same TUV.
I definitely not suggest changing the AI as to make it more fodder oriented, as I see, on other maps, the AI rather buys too few pricey units. So, here, it is just a matter of not valuing the ability of receiving support, which matters thrice (!) over for the Ashigaru (since they receive by other units and by daimyo and by castles, all these 3 supports stacking).
The main way I usually use castle, there, is, for example, by having 1 castle and 3 ashigaru in a territory next to a huge stack of mine that is able to deadzone the territory with the castle. This way, the enemy cannot go massively into it (the AI will not do it) and, at the same time, taking it with limited forces, especially in dice, is a really bad deal, because, even on a 95% success or so (and if it fails it is terrible), you would have to use way much more TUV than the TUV value of the defending units, just to, then, getting killed back by the nearby stack. So, that, in a FFA, basically should assure that no rational player will take such a territory, under these conditions, therefore I can keep the precious production and slowly edging up on TUV (that is most of what this game is about), while, meanwhile, the AI keeps attacking and counter-attacking each other, thus progressively getting behind me in TUV, until I got enough superiority to go for killing some capital.
On the other hand, putting castles in your capital is usually something that you do after you messed up something, as, next to your capital, you really need eventually to deadzone, not turtle behind castles (but I change the game by editing +2 castles in each capital, to make it better playable).
As I said, this is only beside politics, because, if you play with politics, you can just spam your politic actions to get the AI you want to Allied and, once they are allied, it is maybe something like 1% that they ever downgrade from Allied (why is the AI coded so strongly against downgrading from Allied), so you have these Allied players, that play like it is not a FFA at all (they clearly play like they are forever Allies, like in 2 sides games), and, at the right moment, you can build up on their capital and go to war and take the capital and easy destroy them, while they are afar fighting your wars. This game was a challenge because we went no politics (all war) (with the edits, since this is not actually an option). The game is way easier if you can take advantage of the AI dumbness in navigating FFA politics. Really not even a challenge at all, with politics on, unless you are a huge noob.
-
@Cernel said in AI Development Discussion and Feedback:
As said, in this game (270BC Wars, unreleased) each land territory has a factory in it, while what appears to be the factory is actually an itself useless unit that is required by most units for placement (so, you have some units that you can place anywhere, and some units only in factories, though they are not actually factories).
Tested in call cases with:
-Xmx4096M
-Xms4096M
All to Fast AI And with the "barbarians" player disabled.
AI Pause Duration=250TripleA 18437 (4 days ago):
Time to end the first turn (Carthage): 2' and 2"
Time to end the first 5 rounds: 50' and 10"
RAM level at the end of the first turn (Carthage): 2.08 GB
RAM level at the end of the first 5 rounds: 2.92 GBTripleA 18511 (current):
Time to end the first turn (Carthage): 0' and 38"
Time to end the first 5 rounds: 15' and 46"
RAM level at the end of the first turn (Carthage): 2.06 GB
RAM level at the end of the first 5 rounds: 2.20 GBI've seen @Alexei-Svitkine squeezed some more juice, recently, so did a new test (the game is virtually the same):
TripleA 18843:
Time to end the first turn (Carthage): 0' and 29"
Time to end the first 5 rounds: 13' and 21"
RAM level at the end of the first turn (Carthage): 1.94 GB
RAM level at the end of the first 5 rounds: 2.29 GBSo, the Fast AI now takes only 85% the time as before.
Nice.
-
@Cernel Yeah, his optimizations have focused on AI areas outside of the BC which you'll see have a greater percentage improvement on the Fast AI but should impact Hard AI as well (just not as noticeable since BC is like 80-90% of the Hard AI time). But good to see the improvements are making a difference.
-
@redrum Out of curiosity...

can or how does the AI purchase-value cost-effectiveness of a unit and it's target AA attacks, when these AS attacks are sometimes limited to hit certain targets?
Also, how does AI purchase- value a units support abilities, when these also sometimes are only given to a select group/unit types?
-
Glad to see my improvements helping so much!
There is at least one more coming which should help a lot too. I just sent a PR for it this morning.
-
@Frostion said in AI Development Discussion and Feedback:
can or how does the AI purchase-value cost-effectiveness of a unit and it's target AA attacks, when these AS attacks are sometimes limited to hit certain targets?
No, currently the AI doesn't value AA attacks.
Also, how does AI purchase- value a units support abilities, when these also sometimes are only given to a select group/unit types?
It does some calculations to try to determine how many units give support of that type and receive support of that type within a radius around the factory its looking to place units. Based on that it gives some value between 0 and close to 100% of the support value. So an example is if I have lots of infantry and no artillery then value the artillery support close to a normal attack value vs if I have lots of artillery and no infantry then value the artillery support as worth close to 0.
-
@Alexei-Svitkine said in AI Development Discussion and Feedback:
Glad to see my improvements helping so much!
There is at least one more coming which should help a lot too. I just sent a PR for it this morning.
@Cernel said in AI Development Discussion and Feedback:
TripleA 18843:
Time to end the first turn (Carthage): 0' and 29"
Time to end the first 5 rounds: 13' and 21"
RAM level at the end of the first turn (Carthage): 1.94 GB
RAM level at the end of the first 5 rounds: 2.29 GBStill tested with:
-Xmx4096M
-Xms4096M
All to Fast AI and with the "barbarians" player disabled.
AI Pause Duration=250TripleA 18871:
Time to end the first turn (Carthage): 0' and 32"
Time to end the first 5 rounds: 13' and 48"
RAM level at the end of the first turn (Carthage): 1.94 GB
RAM level at the end of the first 5 rounds: 2.03 GBSo, this time it took slightly more time, actually (but maybe just a coincidence, as virtually no games go the same way), but it seems there is an 11% reduction in the RAM allocated, after finishing 5 rounds.
-
Not sure if helpful, but I have another example of some bad AI strategy.
This time on Domination 1914. This from a 2.0 prerelease, unfortunately before the recent Unit + TripleAUnit merge, so to load the save, you need a slightly older version (e.g. prerelease/checkout at 2.0.18893 for example).
In this game, I was playing as Communists and all other players were Hard AI. The central powers did really well, in particular because USA wasn't able to ever get in the game (it just amassed planes in USA that never made it to somewhere relevant - despite it being possible to island-hop them to Europe/Africa). For example 71 planes in Charleston (there's another 50 in Aleutian Islands):

As Communists, I conquered all of Russia, creating a border of my territories against the central powers. So they just kept amassing land units there, not sure why - since they can't enter my territory so they were kind of stuck there. They didn't try to build transports to get those units somewhere useful.

On the other hand, when Europe was fully captured, Germany did a hard turn in its production, going from building mostly ground units to building something like 15 planes a turn. But then it ended up in some awkward situations where Britain kept taking some territories with land units and transport and Germany having no neighbouring land units but like 40 planes, to recapture. Germany could have defended things much better.

Arabia was particularly interesting - due to Turkey not playing very well, Arabia kept managing to stay alive and harass them. However, its capital could only produce 4 units, which it was doing to produce 4 Beaudoin units each turn. But it had more money than that - so it was just building up a war chest for no reason (as opposed to using it - e.g. building a factory somewhere or just dumping intro trenches that could be built without a factory).
One turn UK loaded up some units on a transport and just left it in open waters sinkable by my plane. Even though those units could have landed in an undefended territory instead (e.g. Latvia)!

Another thing, at some point different countries like UK, Austria, Germany, USA built navies. But ship choices were rather poor - mostly building Cruisers - but ideally for large fleets, you want to have battleships to take hit points without dying - the computer was not doing that.
I'm sure there's lots of other questionable stuff there, but the above are some of the most glaring.
-
@Alexei-Svitkine Some good examples here. Quick thoughts:
- The AI struggles with 3 move planes and maps without carriers and need ssome additional checks around those.
- The AI doesn't quite understand the neutral relationships between the Central Powers and Communists.
- The AI only has limited support for 0 move units (trenches).
- Guessing the unloaded units was some sort of movement bug
-
I noticed some very buggy AI behavior. On WAW, Hard AI playing the Japanese factions was sending a bomber to attack a well defended ANZAC territory. The bomber just died as expected. And WAW uses low luck, so it was a guaranteed suicide. This happened twice with a bomber over different turns another time with 2 fighters.
(Getting a forum error adding a screenshot. Can try later.)
This is with latest prerelease. Save:
waw_buggy.tsvg.zip -
I also get error when trying to add screenshot. Tried to do it like 15 hours ago. What's up with that?

-
Big World 1942 v3
I'm not sure if this is the right place to post this but wanted to offer some feedback. I play the AI a lot and find I beat it even on Hard but when I play a human I usually lose (with the exception of my sibling whom I usually beat).
I played a really long game against the AI where I was only 1 country - all the rest on Hard AI and I tried really crazy things at the start as I was testing the theory you can do anything and win against the AI. Well there is no way I should of won - I was losing big time the Axis (AI) had taken Russia and the whole continent was there's between Germany, Italy and Japan... also Italy had all of Africa. I had loads of powers for UK and just kept buying infantry and bombers stopping the Axis having a navy to get to UK or USA and having enough defend against parachute drops of dudes.
This stale mate went on for ages then in round 40 something I noticed Germany had moved everything out of its capital I'd no idea why but I pounced had 6 bombers drop 6 British infantry. His AA shot 2 down but 4 landed and I took his money over 100 PU's.
Now any human would not make that mistake again - he had 55+ units off all types 1 territory away but every German go he only put half a dozen units in to take it back and moved no more in on non combat to re-in-force. This meant I kept retaking Germany every round for the next 4+ rounds and its money so it never got to build and Britain got to spend near on 140 PUS every round - so of course I came back and won.
So somehow the AI does not realise the significance of its capitals and how losing them means it loses its PU's. Can anything be done to address that?
Also I found the USA as an AI is dead useless it just seemed to buy transports and infantry and sail up to Alaska and pretty much drop them off and go back and that's all it really did most game and drop some off up and down that coast when no chance of holding off Japanese units and leaving its navy to get sunk by planes over and over again. The US could of helped so much more having the most PU's income of the allies early on but seemed to do nothing much - no plan whatsoever.
I don't know how AI is coded and it must be real hard but is there anything being worked on to help it do better?
I don't wish to moan I love the game just wanted to feed back my experiences in the hope it may help those behind this great game online. Thanks all.
-
Of note, I believe the new 2.1.20365 engine does not build new factories anymore, at least under certain maps. Previously played through a couple games under the scenarios The Rising Sun (Map v. 1.9.3) and 270BC (map v. 1.7.0) using the 1.9 engine and the AI would build plenty of factories or cities. We all updated and now they don't.
Hope this is the right place to put this. Also, ya'll have done great things with and for this game!
-
Hi there
I have a unit called TrenchInf.
Supposed to be like a Infantry which is entrenched and in a extreme defensive position so they cannot attack immediately so to speak, so i want them to be a noncombatmovement infantry.
At first it looked like this:<attachment name="unitAttachment" attachTo="TrenchInf" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"> <option name="movement" value="1"/> <option name="attack" value="0"/> <option name="defense" value="3"/> <option name="isLandTransportable" value="true"/> <option name="transportCost" value="4"/> <option name="canNotMoveDuringCombatMove" value="true"/> <option name="isConstruction" value="true"/> <option name="constructionType" value="FieldFort"/> <option name="maxConstructionsPerTypePerTerr" value="20"/> <option name="constructionsPerTerrPerTypePerTurn" value="2"/> </attachment>Then i noticed that the AI seems to never non-combat-move it by sea transport.
Then i thought that it could be something about infrastructure, so i now changed it to something like a normal infantry unit:<attachment name="unitAttachment" attachTo="TrenchInf" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"> <option name="attack" value="0"/> <option name="defense" value="3"/> <option name="movement" value="1"/> <option name="transportCost" value="4"/> <option name="isLandTransportable" value="true"/> <option name="canNotMoveDuringCombatMove" value="true"/> </attachment>Unfortunately the AI still doesnt move this unit by sea transport in noncombatmovement round.
This is all Fast AI.
Any ideas?
-
I am wondering if it is possible to have the AI from previous version. I.E. If i design a single player map balanced for the current AI, I probably want a way for it to still be relevant in the future.
-
About "Show Hard AI Logs"
Where do those Efficiency numbers come from?
For example Infantry
Movement=1
Attack=1
Defense=1
PU-cost=4
HP-Efficiency=0.4
Att-Efficiency=1.5
Def-Effiecieny=1.75How?
-
@pithief said in AI Development Discussion and Feedback:
Of note, I believe the new 2.1.20365 engine does not build new factories anymore, at least under certain maps. Previously played through a couple games under the scenarios The Rising Sun (Map v. 1.9.3) and 270BC (map v. 1.7.0) using the 1.9 engine and the AI would build plenty of factories or cities. We all updated and now they don't.
Hope this is the right place to put this. Also, ya'll have done great things with and for this game!
I second that. Unfortunately, AI doesn't build factories any more like it did. I am a WAW player. It's no fun anymore...
-
@Mora said in AI Development Discussion and Feedback:
@pithief said in AI Development Discussion and Feedback:
Of note, I believe the new 2.1.20365 engine does not build new factories anymore, at least under certain maps. Previously played through a couple games under the scenarios The Rising Sun (Map v. 1.9.3) and 270BC (map v. 1.7.0) using the 1.9 engine and the AI would build plenty of factories or cities. We all updated and now they don't.
Hope this is the right place to put this. Also, ya'll have done great things with and for this game!
I second that. Unfortunately, AI doesn't build factories any more like it did. I am a WAW player. It's no fun anymore...
Is there any dev willing to look into this issue? Or at least just identify the issue?
I have no idea if this issue is posted at Github.
By the way, a bug like this really hinders map development, besides messing with the single player experience, especially for maps that utilize the AI in some way.
-
-
I am wondering what the priority is for getting the AI to handle resources besides PUs very well. Thanks!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login