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.
    • B Online
      beelee @zlefin
      last edited by

      @zlefin not sure of a "good" way to pause it. I just hit save then quit and switch everyone to human on the restart. A pause button would be nice.

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

        @zlefin Yeah, on most maps, Axis tends to do better than Allies since they are more centralized and need less naval forces. Naval AI is just plain difficult to do well. There was actually an old AI attempt (Dynamix) that only ever did land/air because naval was much more difficult to implement.

        If you have some save games showing particularly poor purchases, I'd be glad to take a look at them. I'll see about running a quick Rise of Axis simulate for UK's first turn to see if I see that behavior.

        There is no way currently to pause the AI but could probably add something so that it say stops at the end of the current AI players turn. Also, not sure if you autosave partway through the AI's turn but if so then that will cause weird behavior when you load it up as currently the AI doesn't persist any state to the save game so recalculates everything.

        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
        • redrumR Offline
          redrum Admin @zlefin
          last edited by

          @zlefin I took a look at Rise of the Axis UK1 and the problem is the AI doesn't currently support 'friendly' relationship so it tries to move its air units to land in Russia and that move fails so they are left to die in SZ10. You can see this in the AI logs:

          1-britishNonCombatMove: could not move [bomber owned by British] over Route:Finland -> SZ 12 East Baltic Sea -> Novgorod -> Western Russia because: Not all air units can land
          1-britishNonCombatMove: could not move [tactical_bomber owned by British, fighter owned by British] over Route:SZ 10 North Sea -> SZ 6 Norwegian Sea -> SZ 7 Barents Sea -> Karelija because: Not all air units can land
          

          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
          • redrumR Offline
            redrum Admin
            last edited by

            @zlefin Here is the fix: https://github.com/triplea-game/triplea/pull/3318

            The AI wasn't checking all the politics on what was valid landing zones so tried to land in what it considered 'allied' which appears to include 'friendly' in BW2: RotA. It now properly doesn't try to land UK air in Russia. Also tweaked things to avoid the AI trying to chase subs around with its air.

            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
            • Captain CrunchC Offline
              Captain Crunch Banned
              last edited by Captain Crunch

              Alright, the AI dev redrum said he tweaked some tactical settings and I haven't tested the latest Axis and Allies AI update in maybe a year and a half so finally I got back at it vs version 1.9.0.0.9687! I am surprised that some think the Axis AI is tougher than the Allies AI on the WWIIClassic map ... maybe because of the positioning of the Axis but for myself I find that battling the 3 Allied AI country powers against my 2 Axis country powers is super tough!;

              Match 1: this is where I forfeit my 1st turn with Russia for fun with me as the Allies and I blow my dice on Tech and only start if I don't win a tech ... so I have no money and I skip my turn and let the German AI go first overall ... I started ok and was surprised no Pearl harbor attack start by the Jap AI but the Germany AI marched fast and took my Russia capitol in round 4 maybe and with the Jap AI marching the Axis AI had Economic Victory in round 6 or 7 and as soon as I lost my UK navy I gave up in round 9 😞

              Match 2: this match I didn't forfeit my 1st turn with Russia and I played Russia very well and marched and took down the German AI capitol in round 7 and then with my other Allied countries I beat back the Jap AI and finally took its capitol in round 15;

              0_1524468517512_latestaxisaidefeated32.tsvg

              Match 3: Here's where it gets ugly vs this AI!!! I first tried to build Germany with units and do some small battles and try to handle the Allied AI navy forming but it built up too fast and I was too slow with Japan building too many Factories so Germany got squeezed and fell maybe round 8 and then I tried to last with Japan but I had no chance and quit at round 15

              Match 4: this time I tried to take out the Allied AI's navy fast and succeeded using my German airforce but it didn't matter and although I played Japan a little better I still couldn't take the Russian AI capitol and my German capitol fell in maybe round 10 and when I saw Japan had no chance then I gave up around round 16

              Match 5: Craziest match ever only because I played great and then stupid!!! This time I went all out with Germany attacking Karelia and the Russian AI on my 1st move ... the attack was awesome and I retreated because I had lots of units and I left the Russian AI with only 2 Fighters in Karelia .... from there the UK AI navy retreated because I still had all my German airforce and the Allied AI literally retreated for the first 3 rounds lol. I then played Japan sweet and marched to keep the Russia AI occupied and eventually my German forces took the Russian AI capitol in round 6. Here's where it gets nuts!!! ... I could have said this was my best played match EVER and would take all 3 Allied AI capitols in maybe 12 or 13 rounds but NO because 1st mistake I bought Anti-Aircraft thinking I could put 2 AA in 1 area but no you can't so I wasted 5 P.U. but no biggie ... but then twice I didn't retreat my Submarines in a battle because I forgot they can't hit Planes so duh I delayed building my German Navy at least 3 or 4 rounds due to stupidity and then also I had the American AI back-door me and take my German capitol in round 12 because I wasn't looking and I did take it right back but the American AI got all that P.U. there and then also I was soooooo lucky at a battle in round 17 where the American AI used 7 Infantry to try and liberate Russia where I only had 2 Jap Tanks and a Fighter to defend loool and I miraculously won that battle even still with 4 American AI Infantry vs my 1 Jap Fighter and I still held the capitol and if the American AI had liberated Russia there I think I would have lost momentum but somehow I held it and then played well again (minus my stupid middle rounds) and then hadto rebuild an airforce and navy to take back the North Sea waters and finally captured the UK AI capitol in round 23 and then Germany and Japan took turns Strategic Bombing and attacking North America for another 9 rounds to finally take the American AI capitol ... wow does this Ai utilize Stategic Bombing so well now and in this match the Allied AI Anti-Aircraft TWICE rolled snake eyes with my 2 Planes Strategic Bombing and it seems like my Anti-Aircraft can't hit anything lol.;

              0_1524470599970_latestalliesaidefeated32.tsvg

              That was a blast and I'm ready to test the AI again if there's another tactical update!

              C 1 Reply Last reply Reply Quote 0
              • C Online
                Cernel Moderators @Captain Crunch
                last edited by

                I always like reading battle reports. πŸ™‚

                Yah Classic is tilted a lot in fanvour of the Allies (I think the bid for Axis is about 20), so, if the AI would become as good as a fairly skilled player, then beating the Allies AI in a standard game should be virtually impossible.

                I recally I already suggested this, but maybe you want to try skipping only the first combat move with Russians, instead of skipping the whole first turn. This would be a practice in between your two extreme of either totally skipping the first turn or playing by the box. This should give you a fairly balanced challenge, instead of the extremes of the game being either almost impossible or overly easy.

                Tho I have to say I'm intrigued by maybe trying out your AI handicap of totally skipping Russians 1 and see if I might beat the AI anyways.

                Side note, you don't need to blow your dice on tech, or something like that. TripleA now allows you to remove PUs with Edit mode. You can also just buy units and not place them, since in Classic they get destroyed.

                Captain CrunchC 1 Reply Last reply Reply Quote 1
                • Captain CrunchC Offline
                  Captain Crunch Banned @Cernel
                  last edited by

                  @cernel Oh thanks for that tip about removing P.U.'s but, anyways, completely skipping Russia's 1st move was something me and my friends try occasionally for fun with the actual board game and my friends have actually beat me when I was the Axis and they were the Allies and they skipped Russia's 1st turn and let me go first with Germany and they still beat me and they loved that win!

                  Against the Ai, I can't remember if I've ever beaten the Axis AI still when I forfeited my 1st turn with Russia (I would say it if I did in my posts earlier in this thread!) but it's my usual routine for testing the updated AI - the 1st game I do the Russia forfeit move, and then if I lose I don't forfeit my 1st move with Russia in the next match. Once I've beaten the Axis AI, I then do a regular match against the Allies AI which is very hard as I've said ... and getting harder!

                  1 Reply Last reply Reply Quote 1
                  • Captain CrunchC Offline
                    Captain Crunch Banned
                    last edited by

                    For beating the Ai, oh I wanted to mention that using Low Luck dice is a massive help and if I didn't use Low Luck dice I bet I would have played way more games trying to beat the Ai so basically Low Luck dice is a bigger help against a machine opponent than a real person I am positive eh?

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

                      <attachment name="triggerAttachment_Produce_submarine" attachTo="Player1 " javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                      <option name="conditions" value="conditionAttachment_Player1_produce_submarine"/>
                      <option name="purchase" value="Submarine" count="1"/>
                      </attachment>

                      A human player receives the free submarine from the above trigger and can place it during the placement phase alongside other normally purchased units, but the AI is seemingly blind and does not know about, see and place the trigger given submarine?
                      I actually thought that the problem of AI not placing free units was restricted to infrastructures and upgrades, I don’t know it also didn’t place normal units. Or is it just given isSea units that are not placed by the AI?

                      BTW: I played on 1.9.0.0.10498 πŸ™‚

                      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
                      • redrumR Offline
                        redrum Admin @Frostion
                        last edited by

                        @frostion My guess is its just "isSub" units as the AI doesn't fully handle them though I'd need to take a look. If you're able to run a quick test giving them say a destroyer instead of a sub then that'll help narrow it down.

                        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

                          @redrum
                          No, I have now tried with Battleships, Cruisers and Destroyers. The AI gets them in the bank (this can be seen in the history at the left of screen and in the history fan to the right) but the ships are never placed.

                          I don’t think AI can place sea units that have been given via trigger.

                          I have tried the same conditions and triggers with land units, and they are placed.

                          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 2 Replies Last reply Reply Quote 1
                          • redrumR Offline
                            redrum Admin @Frostion
                            last edited by redrum

                            @frostion Alright, thanks for the additional info. Guess placing triggered sea units must not be implemented. I'll try to take a look at it later today.

                            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
                            • redrumR Offline
                              redrum Admin @Frostion
                              last edited by

                              @frostion Do you have an example map that I can test this with so I don't have to make a bunch of fake conditions/triggers?

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

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

                                @redrum You can test the AI’s ability to place given sea units with the latest v0.2.5 release of Iron War downloadable from GitHub. Germany gets a submarine:

                                    <attachment name="triggerAttachment_German_Submarine-Pens_produce_submarines" attachTo="Germany" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                                        <option name="conditions" value="conditionAttachment_German_Submarine-Pens_produce_submarines"/>
                                        <option name="purchase" value="Submarine" count="1"/>
                                    </attachment>
                                

                                So the Submarine is by default delivered in the beginning of the purchase phase, and this can also be seen in history, but it is never placed. Not even after a few rounds.

                                I hope you are able to figure out what is wrong? πŸ˜ƒ

                                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 1
                                • redrumR Offline
                                  redrum Admin @Frostion
                                  last edited by

                                  @frostion Oh I know what's wrong already as I looked at the code yesterday. I never implemented having the AI place triggered sea units (only land/air). I think because I couldn't find any maps that actually did that so decided not to tackle it until someone did which looks to be now πŸ™‚

                                  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 3
                                  • FrostionF Offline
                                    Frostion Admin
                                    last edited by Frostion

                                    Ahhh, OK. Well, thanks for fixing the code πŸ˜ƒπŸ‘

                                    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
                                    • redrumR Offline
                                      redrum Admin @Frostion
                                      last edited by

                                      @frostion Here is the PR: https://github.com/triplea-game/triplea/pull/3542

                                      Here is a screenshot showing the Germans placing the sub:
                                      0_1531434362143_d6dc56a9-e285-440a-89b9-e04103afc237-image.png

                                      The one limitation is that the AI only considers the extra triggered units after its purchase. So Germany's turn 1 if it buys 10 units then it doesn't have anywhere that it can place the sub (which happens sometimes). Ideally, the AI would consider any triggered units before making its purchases but that's a more significant change and this should handle most cases.

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

                                      HeppsH 1 Reply Last reply Reply Quote 0
                                      • HeppsH Offline
                                        Hepps Moderators @redrum
                                        last edited by

                                        @redrum Couldn't you hack this by designing a special unit that doesn't require a placement? (Just an idea)

                                        "A joyous heart sours with the burden of expectation"
                                        Hepster

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

                                          @hepps Yeah that would work. There are probably other ways to do it as well like triggering extra factories, production per factory, etc before the place phase.

                                          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
                                          • redrumR Offline
                                            redrum Admin
                                            last edited by

                                            Can be tested in this pre-release: https://github.com/triplea-game/triplea/releases/tag/1.9.0.0.10558

                                            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

                                            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
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 7
                                            • 15
                                            • 16
                                            • 5 / 16
                                            • First post
                                              Last post
                                            Copyright Β© 2016-2018 TripleA-Devs | Powered by NodeBB Forums