TripleA Logo TripleA Forum
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags
    • Register
    • Login

    AI Development Discussion and Feedback

    Scheduled Pinned Locked Moved AI
    316 Posts 32 Posters 431.4k Views 30 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • redrumR Offline
      redrum Admin @Cernel
      last edited by

      @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.

      TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

      1 Reply Last reply Reply Quote 0
      • FrostionF Offline
        Frostion Admin
        last edited by Frostion

        @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?

        Map maker of: Star Wars: Galactic War + Star Wars: Tatooine War + Caribbean Trade War + Dragon War + Age of Tribes + Star Trek: Dilithium War + Iron War + Iron War: Europe + Warcraft: War Heroes

        redrumR 1 Reply Last reply Reply Quote 0
        • Alexei SvitkineA Offline
          Alexei Svitkine
          last edited by

          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.

          C 1 Reply Last reply Reply Quote 2
          • redrumR Offline
            redrum Admin @Frostion
            last edited by

            @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.

            TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

            1 Reply Last reply Reply Quote 2
            • C Offline
              Cernel Moderators @Alexei Svitkine
              last edited by Cernel

              @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 GB

              Still tested with:
              -Xmx4096M
              -Xms4096M
              All to Fast AI and with the "barbarians" player disabled.
              AI Pause Duration=250

              TripleA 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 GB

              So, 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.

              1 Reply Last reply Reply Quote 0
              • Alexei SvitkineA Offline
                Alexei Svitkine
                last edited by Alexei Svitkine

                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):

                Screen Shot 2020-04-27 at 10.49.43 PM.png

                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.

                Screen Shot 2020-04-27 at 10.50.05 PM.png

                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.

                Screen Shot 2020-04-27 at 11.10.03 PM.png

                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)!

                Screen Shot 2020-04-27 at 10.41.20 PM.png

                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.

                dom_AI.tsvg.zip

                redrumR 1 Reply Last reply Reply Quote 0
                • redrumR Offline
                  redrum Admin @Alexei Svitkine
                  last edited by

                  @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

                  TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

                  1 Reply Last reply Reply Quote 1
                  • Alexei SvitkineA Offline
                    Alexei Svitkine
                    last edited by

                    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

                    1 Reply Last reply Reply Quote 1
                    • FrostionF Offline
                      Frostion Admin
                      last edited by Frostion

                      I also get error when trying to add screenshot. Tried to do it like 15 hours ago. What's up with that? 🤔

                      Map maker of: Star Wars: Galactic War + Star Wars: Tatooine War + Caribbean Trade War + Dragon War + Age of Tribes + Star Trek: Dilithium War + Iron War + Iron War: Europe + Warcraft: War Heroes

                      1 Reply Last reply Reply Quote 1
                      • bluelionmanB Offline
                        bluelionman
                        last edited by bluelionman

                        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.

                        Where would you rather be than right here, right now!

                        1 Reply Last reply Reply Quote 1
                        • P Offline
                          pithief
                          last edited by

                          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!

                          M 1 Reply Last reply Reply Quote 3
                          • TorpedoAT Offline
                            TorpedoA
                            last edited by

                            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?

                            1 Reply Last reply Reply Quote 1
                            • F Offline
                              ff03k64
                              last edited by

                              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.

                              1 Reply Last reply Reply Quote 1
                              • TorpedoAT Offline
                                TorpedoA
                                last edited by

                                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.75

                                How?

                                1 Reply Last reply Reply Quote 1
                                • M Offline
                                  Mora @pithief
                                  last edited by

                                  @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...

                                  FrostionF 1 Reply Last reply Reply Quote 1
                                  • FrostionF Offline
                                    Frostion Admin @Mora
                                    last edited by

                                    @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.

                                    Map maker of: Star Wars: Galactic War + Star Wars: Tatooine War + Caribbean Trade War + Dragon War + Age of Tribes + Star Trek: Dilithium War + Iron War + Iron War: Europe + Warcraft: War Heroes

                                    1 Reply Last reply Reply Quote 2
                                    • M Offline
                                      Mora
                                      last edited by

                                      https://github.com/triplea-game/triplea/issues/7353

                                      1 Reply Last reply Reply Quote 4
                                      • F Offline
                                        ff03k64
                                        last edited by

                                        I am wondering what the priority is for getting the AI to handle resources besides PUs very well. Thanks!

                                        1 Reply Last reply Reply Quote 3
                                        • LaFayetteL Offline
                                          LaFayette Admin
                                          last edited by

                                          AFAIK the biggest priority is for factory purchases to be brought back.
                                          @redrum , do you remember the background on why AI stopped purchasing factories?

                                          F 1 Reply Last reply Reply Quote 3
                                          • F Offline
                                            ff03k64 @LaFayette
                                            last edited by

                                            @LaFayette I was more wondering like short term, mid term, long term.

                                            Because I know a lot of maps don't use them, some like Warcraft the AI can handle them ok based on how they are implemented. Others like fuel on iron war they just smash their heads into the wall.

                                            LaFayetteL 1 Reply Last reply Reply Quote 1

                                            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
                                            • 1
                                            • 2
                                            • 12
                                            • 13
                                            • 14
                                            • 15
                                            • 16
                                            • 15 / 16
                                            • First post
                                              Last post
                                            Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums