Me too have noticed that AI builds more expensive ships, when high on cash.
Rather then give AI a bonus, I play my games with AI-controlled nations on both teams.
I play only one nation/player myself. It gives quite balanced games.
But I "cheat" sometimes, when AI builds too many transports. I use the editor to delete excess transports and give the PUs back to the nation/player. It is after those "cheats" that the AI builds more expensive units than usal. Thanx to the large amount of cash.
First game with the latest Jar. This time I gave hardAI Allies the extra bomber at Moscow and +5 ipcs to see how they'd do. Steady bomber buys from G and a production expansion by J built up to a pretty straightforward Moscow crush in the 10th. Parking the German starting fighters in France and stacking the territory consistently, seems to be a pretty effective means of keeping the USA out of Europe. Then I just let the bombers do the dirty work in the East haha.
Fun stuff though, the income bonus for Allies really helps them to play Russia a lot more effectively.
Cool I had some fun matches. Played 3 matches vs the latest AI update and won the last 2. I always expect the AI to march back and win these days, and it hung tough the last match, but I only needed 3 matches to get the 2 wins vs the AI Axis and the AI Allies.
Match 1: I was the Allies and the AI was the Axis and I forfeited my 1st turn with Russia for fun and I even captured the German AI capitol 3 times and thought for sure I had this match but the Japan AI got too big and liberated the German AI capitol and I couldn't build a big enough Navy to keep pressure on Europe so I gave up maybe after 25 rounds when my U.K. started weakening after losing Africa and this literally was the hardest loss after thinking I beat the AI.
Match 2: Rematch of match 1 but I didn't forfeit my 1st turn with Russia and I played well and didn't have much problem taking over the German AI capitol in round 8 but took another 12 rounds to finally beat back the Japan AI and end the match in round 22;
Match 3: WOW, this was quite a match. This is harder than battling the AI Axis usually but I won my 1st attack against the Russia AI in Karelia and then maintained a German Airforce and handily captured the Russian AI capitol in round 6 and started well. I then took forever building a Navy with Germany because the U.K. AI constantly bought Planes.
@redrum a ton of odd stuff happened this match I will tell you. 1st, in round 5 when I started out amazing with Germany, the Russian AI RETREATED from its capitol and split its forces and thus I had a cake-walk capturing the Russian AI capitol in round 6 so check it out. I also spotted 5 lone U.K. AI Planes I could take out easily although its earlier move may have been in its best interest but you can check it out at round 7 in Persia. I noticed the AI using South Africa lots to land its Planes which was odd but overall the AI did play the U.K. well and it took awhile to finally take it in round 29 and then I ended the match taking the USA AI capitol in round 35;
That's all I can remember in that last match to tell you. I was surprised at the AI retreating when I was on the border of the Russian AI capitol. I do again wonder if maybe the AI purchased less Artillery that it may last longer. Also still, I am only getting the Military Victory Message only when I beat the Axis AI and not when I beat the Allies AI.
That's all I can report on this latest AI.jar but look forward to the next update!!
Mostly for fun, but of course this can also be combined with some sort of playtesting.
if you have any specific maps, or specific gameplay (naval) you would like to have tested we can think of a specific challenge which includes these factors and ask players for specific feedback on this part of AI-performance.
@ZjelcoP hey I've posted that idea before here BUT I want to wait for this games AI to be finished and then we can finally end this thread and then if I'm still into playing against AI logic then ya I'd like to see people submit their best tweaked AI's that we can battle and see who can submit the best tweaked and toughest AI'S! Maybe someone can create an undefeatable AI!
Personally, this game became famous with the WWII Classic board game map so I'd prefer that but I'm open for suggestions and maybe the Devs need to see other maps tested but it's an interesting and good idea.
@all - Updated latest pre-release (date 6-22-15):
- Cleaned up logging
- Fixed a few rare crashes
- Added logic to avoid attacking defenseless units with more than 1 unit
- Added fix for "DIDN'T FIND UNIT: " warnings
- Enhanced logic around determining if safe territory to land in when attacking with planes
@captaincrunch - The bomber sacrifice issue is resolved. The retreat from capital is fine since it had almost no chance of holding it.
@ZjelcoP - I'd say let's start up a GOTM with this latest pre-release as it seems pretty stable.
I'm unable to post the jar in the forum due to size.
Would need it to stay available for at least a month, preferably longer for people that might want see afterwards if they can beat the winnner of a particular challenge.
Right now if you'd update again it would no longer be available.
As you proposed keeping several available, should I post this link in the GOTM forum or a different one where you put a duplicate?
Alllriiight, I just finished 3 matches with the latest AI update and won the last 2. I was surprised it went as well as the last update test but I am perfecting my basic moves I always use against either the Axis AI or the Allies AI.
Match 1: I was the Allies and the AI was the Axis and I forfeited my 1st turn with Russia for fun and it's a tough challenge and I did half decent putting pressure on Germany and I thought I played well but the Japan AI marched fast and had too much money and the German AI played well and I never did take Germany by the time the Japan AI took Russia and I stuck around maybe 20 rounds because I had lots of Infantry with U.K. and the U.S.A. but the Axis AI was strong and even had German AI Troops along with the Japan AI Units in Western U.S.A. and there was no way I was going to make a comeback so I gave up.
Match 2: I was the Allies and the AI was the Axis again but I didn't forfeit my 1st turn with Russia this time and I did quite well and captured the German AI capitol in round 4 and then beat back the Japan AI and captured it's capitol and ended the match in round 13;
@redrum lol you may want to check out round 1 where I accidentally (as Russia) didn't place any Troops or anything in my Russian capitol and the German AI had a Tank that could walk in and take the Russian capitol for free BUT DIDN'T. That would be a captured capitol and free cash in round 1 for the German AI but it didn't do it and as soon as I realized I made my mistake I still played on but the German AI didn't take my free capitol so I kinda chuckled and you can see it in the gamesave if you think it's something that may help you improve the AI? I don't know.
Match 3: I was the Axis and the AI was the Allies and I always have a tough time in this scenario but this time I went all out on my 1st attack on Karelia and I let the UK AI have its Navy for the 1st round and then I bought more Planes for Germany as the game went on and I played Germany well and also Japan helped with its Airforce to clear the Allied AI's Navys and so I took the Russia AI's capitol in round 4 and took the UK AI's capitol in round 16 and then ended the match taking the USA AI's capitol in round 22;
Again, I got a Military Victory message when beating the Axis AI but not when beating the Allied AI so not sure if that's something or I need to play another round but anyways was still a blast and will be looking forward to the next AI update!!
Since you suggested before that the AI plays better as the Allies on NWO maps, I decided to give it a go on the same map as before - NWO 1939 Lebowski. I began the game before you posted your latest release, so these comments are actually based on your June 16th update.
To be honest, I didn't find it any more difficult going against AI Allies - in fact it was probably easier. Their naval purchases and strategies still didn't make a lot of sense. Overall they bought way too many carriers and almost no other ships, and while they did buy planes to go with the carriers, they preferred to land most of their planes on land rather than on the carriers, even when Axis attackers were in range of the carriers.
The UK didn't really try to preserve their Mediterranean/Egyptian fleet - Italy took them out without much trouble. They also didn't push very hard westward in Africa to try to take Tripoli and Tunis. Other than the first few rounds they never landed any British troops in France, and they lost their fleet due to not considering turn order, getting killed by the Axis after American ships had moved to another space. They and the Americans lost a huge air force to naval bombardment late in the match, that would have been better off sitting on and protecting their massive array of carriers. I'm guessing the AI doesn't really consider the threat of naval bombardment?
The US pretty much wasted their time all game. They built very few transports and only in the early rounds, and never landed a single ground troop anywhere in Mainland Europe or Africa. They just kept building carriers and fighters all game, but kept sending the fighters to stack the UK rather than defend their enormous pile of carriers or help Russia. As long as the Axis fleets were strong enough to make total victory unlikely in an American air raid, the US and UK mostly just twiddled their thumbs while Germany and Italy slowly turned the screws on the lesser Allied powers first, and then Russia.
Russia went a little overboard with the tankette production. They tried to have either a tankette or artillery unit for every single infantry on their front lines. That's not terribly efficient; you need to have some cheap fodder units, and this strategy means none of the infantry can be considered cheap fodder anymore - each infantry lost also devalues one of the tankettes or artillery. And buying so many tankettes drastically hurts defensive capabilities on the front line since they are such weak and expensive defenders compared to infantry.
I do think it would have been a much different and more difficult game if the Americans and British had built a more balanced fleet and actually committed to trying to land continuous waves of troops in Norway, Spain, or France. If Germany had been pressured harder from the west, they wouldn't have been able to lock down Russia. The AI seems to build fleets strictly for defense after the first few rounds or so. I don't think any Allied power ever bought a submarine.
I kept a log of some odd things that happened throughout the game. Some of the things may not be AI related, but more map or unit oriented, I'm not sure. And for much of the game I was experiencing memory issues, where TripleA would apparently run out of memory while the AI contemplated its moves and just hang and have to be restarted. I had raised my max allowed memory in the past so I didn't think this was going to be a problem and I thought it was something related to the upgraded AI consuming a lot of memory on a big map. But I did eventually check and it was set back to the default automatic memory usage levels. Does using the updated .jar file cause modified maximum memory allowed to be reset back to default? Anyway I changed it back to about the maximum that would still be stable - 1300 MB. (As an aside, why doesn't TripleA work if I set it higher than that - say 2000 or 4000 MB? That wouldn't be a problem on my PC as it has 32 GB of RAM. Even at 1300, I was quickly hitting that cap on this map.)
There were numerous times other than where it's mentioned in the log when the game hung, apparently due to insufficient memory, before I fixed the memory usage cap. If you look at the save, it will be just about every time the game was saved and reloaded. Once I fixed the max memory it never hung again. Anyway, here is the log:
Bug: Germany round 9 unit placement, place 3 planes then carriers, put planes on carriers, undo plane placement, planes still there but production capacity of factory restored as though they were removed
US round 8 sz30 attacks with planes and sacrifices fighters and mustangs before early fighters
US focuses too much on carriers. Round 12+
Russia round 16 attacked Ukrainskaya. They whiffed the first round and the 2 defending Romanian infantry both hit. Second wave Russia gets 1 hit and Romania gets 1 hit. Russia had only planes reamining and Romania had 1 infantry. The AI seemed to hang on Russia deciding whether or not to withdraw - Windows said it wasn't responding, then it seemed to recover but never did anything. Russia wouldn't decide whether to withdraw and I had to kill the program and load the autosave. When Russia tried the same attack again they did significantly better, scoring 2 hits in the first round and capturing a territory that they shouldn't have according to how the battle played out the first time. The issue repeated in round 20 with Russia attacking Vyborg - all Russian ground troops were killed but they still had 2 planes, and 1 German infantry remained on defense. CPU usage maxes out one thread and memory usage fluctuates slightly between 380,468k and 384,792k giving the appearance that the AI is still thinking, but after ~10 minutes the CPU usage halts, memory usage stops changing, and the AI never decides whether to withdraw. The only thing that can be done is close TripleA and reload the autosave, then let the AI redo all the battles and get different results than it would/should have been. However, it doesn't always happen. Round 22, Russia attacked Romanians in Belorussia with 1 infantry and 2 planes, against 1 tankette. Russia missed with all 3 units and Romania scored a hit in the first round of combat, but then despite having no remaining ground troops Russia decided to continue attacking with just the planes left. The tankette was very well-built, and took down one of the planes as it died, but there was no problem with the AI hanging this time around. Though it probably is an AI problem that they risked remaining in combat with no remaining ground troops. *Note: This all happened before I realized the maximum memory allowed had been reset to default. I don't know how much of this may have just been caused by insufficient memory.
Finns round 23, I purchase 4 infantry, 1 tankette and 1 early fighter. When I clicked Done I got a warning message saying I had selected 12 units but can only produce 6. When I clicked cancel, it proceeded to the Non Combat Move phase (I had made no combat moves) anyway and the history shows I had indeed only purchased 6 units. I was able to place the units at the end of the turn like normal.
Poland round 24 Combat Move is taking a very long time. Again, they only have 2 planes, but the AI is maxing out a single CPU thread but not doing anything. It did eventually complete its turn. *Note: This was still before I realized the max memory was reset to default.
Romania round 26, on Russia's turn the AI attacked Minsk with 2 mobile factories. They got left in Minsk, but he had no other ground troops remaining to capture the territory. So the territory was left contested. On Romania's turn, marching an infantry into the territory already owned by them but in contested status did nothing. It remained contested, with the mobile factories under Russian control with no other Russian units in a Romanian controlled territory.
Russia round 27 Combat Move, got an error that appears to be related to the mobile factories stuck in Romanian territory. Here is the text of that error: "triplea.engine.version.bin:220.127.116.11
WARNING [Triplea start thread] ProAI -> 27-russianCombatMove: could not move [Mobilefactory owned by Russians] over Route:Minsk -> Smolensk because: Can not blitz out of a battle further into enemy territory
Exception in thread "Map panel background drawer" java.lang.OutOfMemoryError: Java heap space
at java.awt.image.DataBufferInt.<init>(Unknown Source)
at java.awt.image.Raster.createPackedRaster(Unknown Source)
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source)
at java.awt.image.BufferedImage.<init>(Unknown Source)
at sun.java2d.loops.GraphicsPrimitive.convertFrom(Unknown Source)
at sun.java2d.loops.GraphicsPrimitive.convertFrom(Unknown Source)
at sun.java2d.loops.MaskBlit$General.MaskBlit(Unknown Source)
at sun.java2d.loops.Blit$GeneralMaskBlit.Blit(Unknown Source)
at sun.java2d.pipe.DrawImage.blitSurfaceData(Unknown Source)
at sun.java2d.pipe.DrawImage.renderImageCopy(Unknown Source)
at sun.java2d.pipe.DrawImage.copyImage(Unknown Source)
at sun.java2d.pipe.DrawImage.copyImage(Unknown Source)
at sun.java2d.pipe.ValidatePipe.copyImage(Unknown Source)
at sun.java2d.SunGraphics2D.drawImage(Unknown Source)
at sun.java2d.SunGraphics2D.drawImage(Unknown Source)
at java.lang.Thread.run(Unknown Source)"
Romanians round 28 I just used edit mode to delete the 2 Russian mobile factories in Minsk so they would stop generating errors.
This was an interesting game. The longest fail haha. Attempting the challenge I laid out the other day vs HardAI +5 ipcs flat rate income bonus, with the goal of Germany to taking London before taking Moscow (aka Sea Lion!) This proved fairly impossible with no SBR against London.
Initially the hope was to set up a G5 or G6 Sea Lion attempt but this was stalled, as Germany was unable to overtake the British on the water. Then the plan was revised to see how long I could keep the Kriegsmarine viable and at least preserve the option, which became increasingly difficult once UK stacked London into the 30s. Tried my best to keep the Tirpitz afloat after linking the two German battlefleets. Launched the Graf Zeppelin several times over, and more U-Boats than any sane Axis commander should ever buy, just to keep the USA off sz5! All the while doing only the bare minimum to check the Russians in the East. This proved unsustainable, and the British eventually forced my hand by wiping the entire Imperial Japanese Navy in one brutal air strike with a stack of 20 bombers from Egypt...
This meant a completely unraveling of the long game, and immediately reprisals against the Soviet Union, just for revenge! But that pretty much ended the Sea Lion dream once and for all. Bastards
Surely the Axis should have tried to sack Moscow much earlier and maybe then they'd have had a chance against the UK, but the plan of course was to try for London first. Now London is far too deep to take, despite Axis possessing the largest German navy I've seen in a while. Proving once again the sub-optimal nature of the Sea Lion warplan, and just how hard it is to match the Allies on the water when they collect that +5 bonus. haha ;)
Here is a second, more likely war plan vs HardAI London. A similar naval theme and +5 ipcs flate rate bonus to Allies, but instead of taking London, the German naval build is simply a feint. Keeping UK preoccupied while Japan goes Monster! Again the actual conquest of London is pretty hard to achieve, invasion USA might be more likely at this point, given the solid defensive fortress that AI Britain has managed to build up! haha. The AI is again expanding the Royal Airforce with ruthless bomber builds, and USA is churning out carrier battle groups trying to hold the Axis navy in check. Teasing london but focusing center first seems to provide a better chance against the AI when they're cashing in the +5 per round.
Next personal challenge, again for one of the 5 man maps:
As Allies vs HardAI Axis: How quickly can Tokyo be taken OOB?
And then, how quickly can it be taken with the +5 ipc flat rate income bonus for the Axis AI?
@all - Just committed latest changes and updated pre-release:
- Naval purchase enhancements
- Naval movement enhancements
- Capital defense fixes
@feld - Interesting game. Looks like most of the issues were around not setting the memory high enough. In the last couple of pre-releases, the naval purchases have gotten better so hopefully the USA and UK will perform better.
@Black Elk - Interesting games. The AI seemed to do pretty well holding off the Sea Lion attempts. Hopefully the latest release makes things even tougher!
ok cool I played this latest AI update 2 matches and won both:
Match 1: I was the Allies and the AI was the Axis and I forfeited my 1st turn with Russia for fun and I almost always lose this scenario but, last night, I somehow played an Allied invasion of Europe perfectly and also kept the Japan AI Axis sweep into Asia at a minimum and basically played the best ever match I've ever played. Can't say why I won ... had some good rolls I'm sure ... I know the AI makes some decisions randomly so it just somehow worked out for me. I 1st took the German AI capitol in round 13 and then, as usual, beat back the Japan AI until I ended the match taking the Japan AI capitol in round 20;
Match 2: I was the Axis and the AI was the Allies this time and its usually harder than when I am the Allies against AI Axis but, again, this match went smooth and I had like my 2nd best ever game against the AI and not sure if it was the AI being too aggressive or I won too many little battles but I weakened the Russian AI well with my 1st attack using Germany and I took out the waters around the U.K.AI early also with Germany and then I used Japan to build a nice Airforce and so I captured the Russian AI capitol using Japan in round 5 and then got at the U.K. AI capitol and captured it in round 10 and then sent my rich$$ stacked 2 countries to finish off and take the USA AI's capitol in round 12;
I got a Military Victory in my 1st win against the Axis AI but not in my win against the Allied AI! Check it out if you want ... not sure if its a bug but anyways I don't expect to get 2 wins in a row on the next update but hope my saves help in some way and look forward to the next AI update to test!!