AI Development Discussion and Feedback
-
Addendum, general labor, labor is the most valuable thing for this project, of any type!
If there are developers out there half inclined, I do think one could make a pretty compelling argument to become engaged on this project. It certainly has helped me professionally, there are a number of things I learned working on TripleA that I brought in to work the next week or even the next day. It's also a nice change of pace and rewarding to be able to work on something of interest to you and that goes on to be used and enjoyed by one of the best gaming communities there are.
-
Contested territories (which can occur as a result of limiting land combat to a fixed number of rounds, ex=3) seems to be causing trouble to the AI fighter management:
The following issues have been observed:- sending planes without the supporting infantry (blocked in the contested territory).
- not rebasing fighter after combat because they cannot land in the planned destination (contested), even though other destinations were in range.
I've also posted an issue about a quite frequent Air Battle error popup message (with AI attacker)
-
I played a game of Iron War with a lot of AI players and observed some pretty bad behavior.
Britain kept building transports & units out of Western Canada, but these just sat in the bay without doing anything, just accumulating over 16 rounds:
Russia was getting beat up a lot, but they kept building air transport planes instead of something like infantry:
EDIT: Britain was also building a lot of Air Transport planes in the England and not using them for anything. It's probably not the right thing for them to be building, but at least once built, they could have used their 13 air transports to land units in Africa - or straight up to land units in France.
EDIT 2: Reading the game notes, it looks like the Air transports might be coming from "Allied Airfields" that produce them each turn. OK, in that case it's not an AI decision to build them, but that the AI is not using them effectively (e.g. as Britain) is a bug.
Germany was buying a good amount of AA guns and at some point brought 13 of them to the front and attacked with them:
In general, Russia was messing around all over the map, such as going to Africa, Middle East, etc. and badly losing its Western Front.
-
@redrum You did it Pact of Steel 2 AI will now all but abandon a doomed and devastated IC without repairing. Great work, thanks!
-
Been a hot minute here, but I was curious, do you guys think the HardAI or FastAI should get a different name now?
I mean when work first began on tripleA, "HardAI" was an obvious euphemism. Even in like 2017 when this thread was started I think we could still kinda smile and nod at the notion of a HAL 9000 or TripleA Skynet. But now that things are moving apace in that arena, ever since they came for the visual artists first, I've been a bit more T2 in my attitude. That just seemed like a low blow and hitting too close to home hehe. We'll remember that one Skynet! But now, ya know, we got these chats and like writer's guild strikes on it, and people I think have a different sense of it now. Might make sense to just call it "Computer" or "Redrum" or something? I'm sure at some point, HardAI might actually go the whole nine, and at that point like none of us will be able to beat it. We'll be handicapping the machine instead of the other way round lol. Like I'm not sure how I'll feel about it when that happens, cause probably not only will the HardAI be able to beat us reliably, but it might even come with some chat trash-talk algorithm built-in to salt the wound after it wins heheh. I can picture it saying "Taste It! I win! Haha but no seriously, GG. Better luck next time " before logging off. But I mean more in the now, I feel like "Computer" would be a bit more accurate for what it is. Just a random thought. Obviously I love it. It's given me hours and hours of entertainment!
-
@black_elk From a computational point of view, Axis & Allies is much more complicated than Go or Chess. There was an attempt to use a neural net to play Risk a few years ago, and it played poorly.
The Fast AI is actually better in some situations than the Hard AI. It is more aggressive than the Hard AI sometimes.
-
Some requests for the AI
Naval blockers: On land the AI will use infantry to block attack lanes or make enemy can openers less likely, but on the water this is much less common. I think an improvement might be something like AI tries fanning out it's destroyers as pickets. Basically try to leave a hitpoint in sz tiles or create a hostile sea zone between it's own fleets and the opponents when possible. Something similar for subs might also make sense for things like blockades, where AI tries to position subs near the coasts/coastal production if no enemy DDs are in range.
Air-transports: The AI does pretty well using ground transports and naval transports, but in the air transport feature still doesn't seem to work. I was wondering if maybe the loading confirmation was throwing it off? Anyhow, not a unit type that gets used much in the world war II games, but would be cool for maps that use them.
Capitals and VCs: Some way for the AI to go all-in for the win, or to prioritize that over preserving/destroying TUV when Victory is on the line. Basically where taking/holding a capital or achieving/preventing the TKO by VCs, would override other considerations when the AI is in that position.
-
@black_elk banger ideas love them
-
Hey, I just played a game against Hard(AI) in 2.5 and the AI failed spectacularly leaving Japanese a 99% on Russia (Moscow) on round 6!
Assuming the AI didn't just give up seeing that I would have achieved Economic Victory anyway, there must be a major logic fail in multi-powers defence of capitals. Assuming that @redrum is done with TripleA, maybe @myrd can take a look at this?
@cernel said in Axis Strategy Advice- Hard AI WWII Classic 3rd Edition Version 2.5.22294?:
@sculpt I played as Axis with the options you listed and everything else as given (and without taking advantage of any illegal moves which the program allows, like naval-stalling or loading two infantries and offloading only one of them into combat on the same turn) and won (by Economic Victory +10) on round 6 (on the first try).
2023-9-2-World-War-II-Classic-3rd-Edition(6Win).tsvg
(You need to assign Russians to yourself before starting the saved game or else Russians will play even though the game is over.)
Be warned that much of what I did would not work against a good (human) player (especially having British not placing any ships for the entire game).
Beside this, the major AI fail throughout the game is that I was easily able to cause British never to place any ships (by death-zoning with Germans air units), and they even stacked useless land units in the United Kingdom! A decent player would have saved income until having enough for safe naval building and would have helped itself with the staple of placing British carriers and landing Americans fighters on them before the Germans turn. At the very least, they should have kept building bombers to destroy my PUs (as in Classic bombing is unlimited until the target is down to 0 PUs). Of course, also Japanese breaking through the Panama canal and conquering Brazil and Cuba safely is stupid (and that would have worked even better if I didn't limit myself not doing the illegal move of loading two infantries and offloading only one of them into combat on the same turn).
-
It would be interesting to test the same on 2.6. It should be possible to load a 2.5 save on 2.6 and see what the AI does. If you don't have a save from a past turn, I think there's also an option to create one from history that you can use (though it's an experimental option and may not work 100% reliably).
Some things have been improved with AI in 2.6, for example there's logic to save up for a fleet now.
Otherwise, I personally don't have specific plans to work on making AI smarter in the immediate future. So you'd need to find someone else to contribute or persuade @redrum to come back to it.
-
@myrd I've just taken this history save:
2023-9-2-World-War-II-Classic-3rd-Edition(History6British).tsvg
Loading it in 2.6.14479 (try it yourself if thou wilt), the AI still decides to have British fully vacating Russia (Moscow), letting Japan have a 99% on it. Thus, it seems that at least this issue has remained the same.
This is a really bad major AI fail: the turn of Japanese is even immediately after that of British!
-
@myrd said in AI Development Discussion and Feedback:
Some things have been improved with AI in 2.6, for example there's logic to save up for a fleet now.
Good to know, but the AI actually could have secured the sea zone already with no need of saving income. Still referring to the same saved game linked at the post which you have replied to, I've examined in details what the AI failed to do (if @redrum or any developer wants to look into making the AI able to play decently in this instance).
@cernel said in Axis Strategy Advice- Hard AI WWII Classic 3rd Edition Version 2.5.22294?:
Starting from the state of the game in the saved game at the start of the first British turn (that is immediately after I made the Germans turn), what a (human or better AI) player could have done during that turn and the subsequent turns of Americans and Russians is killing the German submarine with air units only (very high chance), moving a British transport to North Sea Zone from East Canada Sea Zone, placing a new British Carrier and a new British transport into North Sea Zone, redeploying two British fighters on the new carrier (which is possible with your rules choice, otherwise two Americans fighters can land on it on the same round), move 1 Americans transport to North Sea Zone and move 1 Russians submarine to West Spain Sea zone. This would have given an Allied fleet of 5 transports, 1 carrier, 1 battleship and 2 fighters which could have been attacked only by the Germans air for a measly 19% chance to destroy the fleet. Alternatively and preferably, the Russians submarine could have been kept in the zone and British could have sent (as the AI actually did in the game) 1 battleship, 1 submarine and 1 bomber to 100% (approximated to 1% ) kill the 1 transport and the 1 (already damaged) battleship in West Mediterranean Sea Zone while still having a very high chance to kill the Germans submarine (attacking it with up to 2 British fighters, 1 Americans bomber and 2 Russians fighters). This would have given an Allied fleet of 5 transports, 1 submarine, 1 carrier and 2 fighters which could have been attacked only by the Germans air for a not good 54% chance to destroy the fleet. I said not good because on average the result of this battle would be all Allied units in the sea zone and all Germans air being lost, and that would be certainly not a good outcome for Germans. However, the AI did neither of these things likely due to some logic failing or missing to see and correctly evaluate such possibilities.
-
@myrd said in AI Development Discussion and Feedback:
Some things have been improved with AI in 2.6, for example there's logic to save up for a fleet now.
An other good reason for hopefully not waiting some more years to release 2.6.
Yes, although I won by round 5 this time (thanks to some luck and the fact that I assume the AI does not see the Economic Victory at all), it does seem that 2.6 plays significantly better than 2.5 in this game overall.
Saved game, played with 2.6.14492:
2023-9-5-World-War-II-Classic-3rd-Edition(5Win).tsvgThere has not been a need actually to save income for future shipbuilding.
By the start of the second Germans turn (Germans having 3 bombers and 4 fighters), the AI had in North Sea Zone a quantity of units which put the Germans at 84% win and +16 TUV swing. This actually means that I would have averagely lost the 4 fighters and saved only the 3 bombers if I would have got the 84% win (and of course had a 16% chance of disaster). That was just enough to convince me not to attack the sea zone. I don't know if the AI actually didn't fail while failing or actually and quite correctly decided that even those bad odds were actually good enough (because in the specific case the Germans TUV is just worth so much more than the Allied one). Since the air was very much needed for the land, I didn't even attack the lonely battleship in West Mediterranean Sea Zone, but that is mostly me being very cautious. However, the AI could have assured better odds while still killing all my Germans ships (the way I described previously), so maybe someone can look into it if there is something to improve or the AI actually (correctly) reasoned that an 84% for the enemy was actually good enough in the particular situation (I doubt it).
By the start of the third Germans turn (Germans having 4 bombers and 5 fighters), the AI had in North Sea Zone a quantity of units which put the Germans at 53% win and +19 TUV swing. Again, I didn't attack.
Overall, winning as Axis by round 5 in Classic with no bid is certainly not a good result for the Allies, but I actually think that the AI played maybe decently this time. A bit of this outcome is actually to be credited to luck: on round 5 the Russians attacked East Europe with a 92% and +7 TUV swing which actually ended in retreat and a -18 for them. If that battle had some close to average result, I would most likely not have won so early.
However, regarding the previous game, I do believe the very bad fail of leaving Russia (Moscow) at 99% Win for Japanese is a serious issue also in 2.6 as I tested the save and went the same way (as I said). I definitely believe something must be working wrongly there if a developer can check that: you can load the previous save (not the one at this post) and see that British just moves the air units away letting Japanese have Russia (Moscow).