-
@pact_of_plastic Definitely an interesting choice by the US in this case. There are a few separate areas here around attacking Borneo vs Australia:
- The AI sees being in the Borneo sea zone as more strategic than down by Australia so that it has more options the following turn
- Borneo is worth more than Australia (4 > 3)
- AI believes its odds on Borneo are fairly good when it uses its cruiser to bombard
Now there is a bug where the AI aborts bombarding for v3 transport rules (transports having no casualty/defense) if enemy ships are within range. So the AI expects to attack borneo with 2 inf and bombard with the cruiser but the bug cancels the bombard leaving the odd behavior. I've put a PR to fix this: https://github.com/triplea-game/triplea/pull/5531
Ideally the AI would also use its fighter but this is more complex as the AI is overly conservative with landing on carriers and doesn't commit to moving its carrier til NCM so won't use the fighter since its can't guarantee its safe landing.
I think most human players go for Australia but Borneo with 2 inf, 1 fighter, and cruiser bombard is probably equal choice. The bombard bug will be fixed in the next release. The air is a much more complex problem is solve.
-
I've a game (derived from 270BC) with these main charateristics:
- There is a factory in every territory, capturable, able to place up to territory value (just your regular WW2 factory, except ubiquitous and granted). This factory is valued 0.
- Most units (all except 2, and half of the players don't have any of them) require a unit to be placed; the only thing this unit does is being required for placement, by most units; this unit is a costruction, you can purchase and place (at all effects, for the units requiring this unit to be placed, such unit acts exactly like a regular factory would), and all players start with one in a valuable territory.
- The unit not requiring any units to be placed (meaning only requiring those factories present in all territories) are absolutely or relatively weaker than the other units; so much that you would virtually never buy them, if they didn't have this placement advantage.
- There are no capitals.
The concept is, practically, the same as saying that you have many units you can place with factories, but you have also a few underpowered units that you can place with no factory in the territory.
For example, at the same price, you can place a att-def-mov=1-2-1 unit that requires a costly construction unit in the territory, for placement, or you can place a att-def-mov=1-1-1 unit that can be placed in any territories you owned since start turn (by factories that are simply present in each territory on the map).
The AI has 3 main problems with this game:
- It never purchases the unit required for most units to be placed (even in the case of those players that can only purchase units requiring such unit for placement).
- It way too much prefer purchasing the units that have no special placement requirement, if the player has any of them, even to the point of purchasing less other better units than what it could already place (as every player starts with such a required unit in a valuable territory), and often actually purchasing none of them.
- Eventually, it often starts stacking increasing quantities of units in some territories away from the enemy, never using them, unless enemy units get close enough.
Those problems are really very bad, and the AI gameplay is, at its current state, almost entirely broken.
-
@Cernel Correct. The AI doesn't currently support that because there are very few or no maps with those features.
-
wow now Cernel is sounding like Shulz amiright
-
AI - Can Purchase 0 move units: https://github.com/triplea-game/triplea/pull/5842
Any testing and feedback around this feature using the latest pre-release is welcome.
-
@redrum Sweet! At some point I would have ran into this limitation in my Warcraft map. Can you tell me upfront if the unit needs to have PUs included in the price or can the price also be only non PU resources?
Edit: And does the purchase mechanics just use the same logics when determining if a unit is worthy of purchase? And a no-mover is just worth less than a 1 mover?
-
@Frostion Good question. I believe the AI will essentially see the unit as "free" if it cost 0 PU as it divides its computed value by the PU cost which would essentially be infinity so consider it always the best defense option if its available. But I can't say I've ever tested it and there is a chance that 0 PU units could cause an error in some calculation.
Generally yes it uses the same logic but only considers buying 0 move units when trying to defend a territory. It uses a factor of 0.1 for 0 move units compared to a factor of 1 for 1 move units (essentially sees them as an order of magnitude worse) so will usually only buy them if they are the only option (or cost 0 PU). Examples are NWO/WaW where it will buy bunkers as they are isConstruction so is the only option after placing up to the factory value. Same with Dom NML where it'll buy trenches after purchasing 1+ move units up to the factory value. Napoleonic Empires it'll probably only buy mortella_towers if it happens to end up with 3 remaining PUs so would have no other options as they aren't isConstruction.
EDIT: Also it might be time to finally consider adding support for the AI to value other resources given we finally have a few maps that use multiple resources and seems like a few more in development. I'll need to try to dig up some of the initial thoughts I had around the best way to do it.
-
So digging through the chronicles of history...
Here was my original design around AI valuing non-PU resources (along with a bunch of related posts from @Frostion and myself): http://tripleadev.1671093.n2.nabble.com/AI-Development-Discussion-tp7585227p7590752.html
Here is the initial design:
- Find resource that I have the most of (A).
- Find unit cost in terms of A by converting all other resources (B, C, etc) to this resource using ratio of this resource to the most resource.
- Use this value instead of the PU value that is used today for finding unit efficiencies.
Example #1:
Current resources and amounts:
A - 50
B - 5
Units:
U1 - cost 1 B, very weak unit
U2 - cost 1 B and 10 A, stronger unit (3x 'power' of U1)#1 purchase (50 A, 5 B | 1B is worth 10A)
U1 would be evaluated to cost 10A with efficiency (power/cost) of 1/10
U2 would be evaluated to cost 20A with efficiency of 3/20 (purchase this unit)#2 purchase (40 A, 4 B | 1B is worth 10A)
U1 would be evaluated to cost 10A with efficiency of 1/10
U2 would be evaluated to cost 20A with efficiency of 3/20 (purchase this unit)And so on, so the AI would most likely buy 5 U2's which is good in this case.
Example #2:
The AI’s bank has 52 PUs (A), 26 Manpower (B) and 13 Coal (C)
Infantry: 6 PUs/5 Manpower, power~7
Artillery: 8 PUs/2 Manpower/1 Coal, power~8
Tank: 10 PUs/1 Manpower/2 Coal, power~9
(power values are just approximate showing that units are in decreasing efficiency based on just PUs, tend to buy most inf then art then tank ignoring new resources)#1 purchase (52 A, 26 B, 13 C | 1B is worth 2A, 1C is worth 4A)
Infantry would be evaluated to cost 16A with efficiency (power/cost) of 7/16
Artillery would be evaluated to cost 16A with efficiency of 8/16 (purchase this unit)
Tank would be evaluated to cost 20A with efficiency of 9/20#2 purchase (44 A, 24 B, 12 C | 1B is worth 1.83A, 1C is worth 3.67A)
Infantry would be evaluated to cost 15.15A with efficiency (power/cost) of .46
Artillery would be evaluated to cost 15.33A with efficiency of .52 (purchase this unit)
Tank would be evaluated to cost 19.17A with efficiency of .47.. 3 more artillery, I believe
#6 purchase (12 A, 16 B, 8 C | 1B is worth 0.75A, 1C is worth 1.5A)
Infantry would be evaluated to cost 9.75A with efficiency (power/cost) of .72
Artillery would be evaluated to cost 11A with efficiency of .73 (purchase this unit)
Tank would be evaluated to cost 13.75A with efficiency of .65So it would end up buying 6 Artillery with remaining 4 A, 14 B, and 7 C. Though each time it will value B and C less since A is becoming worth more as it is spent too quickly as you can see in purchase #2. This makes infantry become more and more efficient in comparison to artillery since it has the lowest PU cost. The AI essentially tries to spend resources as evenly as possible but the unit set is weighted too much towards costing PUs in comparison to starting resources.
Follow up design (adding demand based):
The algorithm has relatively few steps based around resource supply but has lots of power due to the feedback loop in it. The feedback loop allows the AI to adjust valuation of resources as they are spent so at first a very sparse resource will be worth a ton but as the AI spends its other resources the very sparse resource value becomes less and less.
You bring up a good point about the available units. This algorithm so far is only a supply side algorithm as it only evaluates what/how many resources you have. To take the algorithm to the next level (more complex) you would then add in 'demand' ratios as well (how much of the resource is in the purchase options).
So if you had a very sparse resource (like B above) and it is needed for every unit available for purchase then B is really worth even more (you pretty much don't care about anything but B since its the limiting factor). The opposite is if you have say 100 units to choose from but only 1 cost some B then B isn't worth quite as much since you have lots of other options that don't need B.
-
Taking the above example with 1 unit that cost 10A and another unit (equal strength) that cost 1B. The average A cost across the unit set would be (10 + 0) / 2 = 5A per unit and B would be (0 + 1) / 2 = 0.5B per unit:
50A / 5A = 10 units worth, 1B / 0.5B = 2 units worth, so unit#2 cost 5 times unit#1 (50A) - no change to the above -
Unit set skewed towards A: Now let's say we have 9 units that cost 10A and 1 unit that costs 1B. The average A cost across the unit set would be (109 + 0) / 10 = 9A per unit and B would be (09 + 1) / 10 = 0.1B per unit:
50A / 9A = 5.56 units worth, 1B / 0.1B = 10 units worth, so unit#2 cost 5.56/10 (0.56) times unit#1 (5.56A) - would definitely purchase unit#2 first -
Unit set skewed towards B: Now let's say we have 1 unit that cost 10A and 9 units that costs 1B. The average A cost across the unit set would be (10 + 09) / 10 = 1A per unit and B would be (0 + 19) / 10 = 0.9B per unit:
50A / 1A = 50 units worth, 1B / 0.9B = 1.11 units worth, so unit#2 cost 50/1.11 (45.05) times unit#1 (450.5A) - would definitely purchase unit#1 first
You can see by adding this 'demand' ratio this then checks to see how much of the various resources are needed across the available unit set to take into account whether the unit set is 'balanced' across the various resources. It then adds more weight to resources that are needed the most in the unit set.
-
ok I finally downloaded the latest Triple A release 1.9.0.0.13066 on this awesome new computer running Windows 10 and I also read redrum's latest posts so I'm caught up on this thread when I was off the forum for a bit but anyways tonight I can finally battle redrum's nasty AI on the World War II Classic map again!
Not sure if I'll try to beat both the Allies AI and the Axis AI in one night but I'll get back to yous and who knows how long it's gonna take but is always fun!
-
already 1 loss to the Allies AI ... so this may take a while hehe
-
Side-note, FWIW, for the latest AI, you can check out the prerelease: https://github.com/triplea-game/triplea/releases
We could really use as many people playing through the prerelease as possible and reporting any bugs/problems that they encounter.
-
@LaFayette I just assumed the download at https://triplea-game.org/download/ had the latest AI upgrade ... I'm sure your link's AI update isn't much different from the 1.9.0.0.13066 version I am playing right now unless redrum knows of any tactical AI changes since 1.9.0.0.13066 but whatever this AI I am trying to beat is still gonna be tough! I'm not sure if I will test the AI again tonight or when I'll play during the week but I'll submit wins vs the Allies AI and Axis AI at some point
-
@Captain-Crunch There are some improvements in the pre-release that @LaFayette pointed to. If you are on Windows 10 then here is the direct link to the latest download: https://github.com/triplea-game/triplea/releases/download/2.0.17997/TripleA_2.0.17997_windows-64bit.exe
-
@redrum rofl thanks ok well I took 1 loss already but I do want to battle the latest AI so will install it and get back to you when I got a win vs the Allies AI and Axis AI ... so don't hold your breath because I may have to do many matches but I want to get it done over the week eh
-
@Captain-Crunch it works pretty well now, especially for ground wars. When i was getting back up to speed i noticed several weaknesses in its tactics, however.
Wouldn't want to spoil it for you though i'm sure you will find them for yourself before too long.

Anyway once you get the edge on AI i have found handicapping it allows you to really get back up to cruising altitude.

-
@ubernaut If you have feedback around a pretty recent pre-release version and the AI performance, I'd be interested in it. Feel free to post it somewhere or message me here on the forum. Some things are easier to improve then others but always welcome the feedback.
-
@redrum i mainly stick to the stable releases these days is there a mac build or do i have to do it myself?
-
@ubernaut Here is the latest mac build: https://github.com/triplea-game/triplea/releases/download/2.0.17997/TripleA_2.0.17997_macos.dmg
All pre-releases can be found here: https://github.com/triplea-game/triplea/releases
-
@redrum i'll check it out can it play global or should i try a simpler map?
-
@redrum Alright you want some feedback, here it finally is (hadn't tested the AI in almost a year I bet lool)!!!
so I battled the AI on the WWIIClassic map as always and I battled the 1.9.0.0.13066 stable release 1 time and got rocked by the Allies AI even though I thought I was in it for the first 12 rounds but then got overwhelmed by American troops and gave up after my German capitol fell and Japan had no chance so I gave up maybe round 18
THEN, LaFayette pointed out the latest AI update releases to test so duh I downloaded the 2.0.17997 release and played against the Allies AI over the last 2 nights and beat it in 48 rounds BUT there was 4 errors that a pop-up window asked me to report to Triple A so I did and there may be problems since I was totally floored that at the start of the game THE RUSSIAN AI DID NOTHING!!!
... redrum, if you read the game log, at the Russia AI's first turn it says some weird message about triggers and then the Russia AI only did moves and placing its purchases but it didn't attack anything!
I see the "error" reporting feature gives you 5 free reports and in the describe error part I said what round the error occurred in 3 of the 4 error reports ... one error happened when it was the AI's turn right after I did a kamikaze attack maybe first time ever by my Japan plane around round 12 but the other errors were all when the AI had its turn like around round 25, round 30, and round 35 MAYBE ... the error reports were uploaded so you have to look there I guess
Oh, with the UI, when you are doing combat moves ... if you want to say move a Tank and then you change your mind and want to click "Undo Move" well that whole area used to be big but its now blocked by those fast buttons below and I tried the only 3 resolutions on my comp that I can and the Combat area is always so small I can barely scroll to the "Undo Move" button and its much slower than when it was a whole big nice area to click on so my question is can I click off those fast button things below the Combat window so I can see the Combat window better since I don't even use those Fast buttons things I've never seen before
Ok, here's the win vs 2.0.17997 Allies AI release but I think the version is glitched and will wait for redrum's assessment before I battle the 2.0.17997 Axis AI.
Despite the nothing move for the Russia AI to start the game it was tough to beat and I hadto buy Japan Bombers all game long to keep the Allies AI Navy from getting too big;
Oh by the way, the game still played no problem after each error window popped up 4 times (thats not including the Russian AI lack of move 1st turn)
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