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 @Frostion
      last edited by

      @Frostion Good question. Can you give me a little more detail on how you are doing the initial set up? Is it all done by a single AI player so that if we just allow setting AI pause duration by player would work? Or is it different phases for each player?

      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

        OK then @redrum ☺ Understand that in this map the "minor" AI and "nature" AI players are all passive after the initial territory picking and placements. There are no combat moves, purchases, placements etc. during the game. These players only have pre-game steps. Only the 8 main players are active after the game begins.

        It starts out like this...
        Teritory Picking/Placement: At the moment, there are like 20 AI players (minor primitive passive races) who all can pick 3 territories each (as they hold 3 units) and a huge player called Nature picks the rest, like 340 territories. Nature player places all the map's non-combat stuff units, all capturable without a fight. A player can never do combat vs. Nature player but all the minor player units have defensive stats.

        Pre-game Placement Round A: The 20 minor AI players get like 2-5 fighting units by trigger to place and fill up their 3 territories with more units.

        Pre-game Placement Round B: Finally the 20 minor players and Nature player get 1 Flag for each owned territory to place.

        Now the game is on, round 1, and the ordinary player 1 to 8 can do their first things; combat move. It would be nice if AI pause duration could return to normal now.

        (Unit specifications prevent more than 1 Flag per territory, so AI is forced to place in all/each territories) (Reason why there are multiple placement rounds are because I only want a minor player to have 3 territories each from start, then fill these with extra units) (I have thought about changing the procedure a bit ... But the concept will pretty much be the same I think)

        So as you can see, in this game, in my case, the minors could actually be a dumb version of AI only placing with a 0 ms speed, then waiting to be attacked by a real player. But as some of the main 8 players can also be played as Hard AI, it would be good to have normal functioning AI for this. What do you think? 🤔

        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 so what if we allowed setting pause duration per player and set nature to 0. Would that be enough?

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

          C FrostionF 2 Replies Last reply Reply Quote 0
          • C Online
            Cernel Moderators @redrum
            last edited by

            @redrum This reminds me of that other thing of the Risk stile random placement, that you probably don't want to see if you have an enormous number of territories, but it is nice to see in a map like risk (still much faster than drawing cards).

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

              @ubernaut Can you test the latest pre-release here and see if that fixes the save game loading issue: https://github.com/triplea-game/triplea/releases/download/2.0.18171/TripleA_2.0.18171_macos.dmg

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

              ubernautU 1 Reply Last reply Reply Quote 3
              • ubernautU Offline
                ubernaut Moderators @redrum
                last edited by

                @redrum yeah seems to work now. 🙂 i'll check the ai strategies when i have some time.

                "You should never have told me horses sleep standing up, it gave me a mental block." - Mister Ed

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

                  @redrum Sorry for the long wait for a reply. An option to set map specific individual player AI pause duration would certainly help, even better if it was changeable during play, but a permanent would also work.

                  In my case it would perhaps speed up the automated map setup by 50% if player Nature had a permanent 0 ms AI pause duration.

                  How do you think this can be achieved? XML setting? an first version of a new file called AI.properties? 😃 Yay ... That would be nice and have many potential future applications 😁

                  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 0
                  • C Online
                    Cernel Moderators
                    last edited by

                    The AI appears having serious problems in games where nobody has any capitals and there are factories in all territories, stacking and stacking units somewhere, not sending them to the frontline, and generally being very lazy and clueless at pushing. It is also very slow deciding the purchase. I'm testing this on a map modification of 270BC I'm making, and I'll give more details once is out.

                    redrumR C 2 Replies Last reply Reply Quote 0
                    • redrumR Offline
                      redrum Admin @Cernel
                      last edited by redrum

                      @Cernel There is some logic to try to handle the "factory in every territory" type maps but its only been tested on a few maps like Domination I believe.

                      @Frostion Ok. I'll think about it a bit. It would either be specified in the XML or in a properties file.

                      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
                      • LaFayetteL Offline
                        LaFayette Admin
                        last edited by LaFayette

                        @ubernaut would you mind jumping in on: https://github.com/triplea-game/triplea/issues/5792? We'd really like to get the problem object text wrapping fixed, but need more information and someone to work with to help us test any fixes. We're curious off the bat which UI Look & Feel you are using and confirmation that you're using Mac OS.

                        ubernautU 1 Reply Last reply Reply Quote 0
                        • ubernautU Offline
                          ubernaut Moderators @LaFayette
                          last edited by

                          @LaFayette ok i'll reply there my name there is 'doctored'

                          "You should never have told me horses sleep standing up, it gave me a mental block." - Mister Ed

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

                            @Cernel said in AI Development Discussion and Feedback:

                            It is also very slow deciding the purchase. I'm testing this on a map modification of 270BC I'm making, and I'll give more details once is out.

                            Actually, the slowness appears to be some sort of major regression with the prerelease. Further testing reveal that, letting "Fast AI" play alone, these are the times to make the first 2 rounds (from clicking on "Play" till ending round 2):

                            1.9.0.0.13066: 7 first and 45 second minutes.

                            2.0.18267: 19 first and 32 second minutes.

                            In both cases, I've assigned -Xmx8192M and -Xms8192M, that just means unlimited.

                            The difference lays on the fact that, while the stable needs only a few seconds there, the prerelease takes an excruciatingly long time each "purchase" phase, to decide what to buy.

                            On the other hand, the prerelease might be a little lighter on the RAM use, as I see it is at 3.32G at the end of round 2 for 1.9.0.0.13066 and 3.28G at the same point for 2.0.18267.

                            redrumR LaFayetteL C 3 Replies Last reply Reply Quote 0
                            • redrumR Offline
                              redrum Admin @Cernel
                              last edited by

                              @Cernel Ok. I would need to be able to test it myself so either need the map you are using or if you see the behavior on an existing map then I can take a look.

                              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
                              • LaFayetteL Offline
                                LaFayette Admin @Cernel
                                last edited by

                                @Cernel Stray thought, you may want to try -Xmx @ 2G or 3Gs. More memory is not always better. Usually there is not that much that needs to stay in memory, but memory is also not cleaned until it sometimes needs to be. The cost to clean memory when it is full is also non-linear, you could be seeing extremely long pauses while that happens.

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

                                  @LaFayette Actually, for 1.9.0.0, RAM usage goes down to 2.34G by the end of round 10. So, it seems the RAM is getting cleaned even if having a much bigger upper limit. Also very strange that it is using about 1G of RAM more at start game than after 10 rounds. Guess we can indagate the matter once I release the map, as this game has a lot of triggers.

                                  Once at that point, and preferably after @redrum fixes the purchase lag, I can also test it at different "xmx" settings, see what's faster.

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

                                    As said, in this game (270BC Wars, unreleased) each land territory has a factory in it, while what appears to be the factory is actually an itself useless unit that is required by most units for placement (so, you have some units that you can place anywhere, and some units only in factories, though they are not actually factories).

                                    Tested in call cases with:
                                    -Xmx4096M
                                    -Xms4096M
                                    All to Fast AI And with the "barbarians" player disabled.
                                    AI Pause Duration=250

                                    TripleA 18437 (4 days ago):
                                    Time to end the first turn (Carthage): 2' and 2"
                                    Time to end the first 5 rounds: 50' and 10"
                                    RAM level at the end of the first turn (Carthage): 2.08 GB
                                    RAM level at the end of the first 5 rounds: 2.92 GB

                                    TripleA 18511 (current):
                                    Time to end the first turn (Carthage): 0' and 38"
                                    Time to end the first 5 rounds: 15' and 46"
                                    RAM level at the end of the first turn (Carthage): 2.06 GB
                                    RAM level at the end of the first 5 rounds: 2.20 GB

                                    So, the Fast AI now plays over 3 times faster, and it seems it also uses 0.72 GB less of RAM, after 5 full rounds.

                                    The gains I believe are all on the purchase phases. For example, in 18437, the purchase phase of the first turn of Carthage lasted a painful 1 first and 19 seconds, while now the AI brezees throug it in 6 seconds: about 13 times faster!

                                    So, am I right assuming that these huge improvements in speed are thanks to this pull:
                                    https://github.com/triplea-game/triplea/pull/6086
                                    ?

                                    If so, great job and thank you @Alexei-Svitkine.

                                    redrumR C 3 Replies Last reply Reply Quote 0
                                    • redrumR Offline
                                      redrum Admin @Cernel
                                      last edited by

                                      @Cernel yep, that is correct and glad to see the drastic improvement!

                                      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
                                      • C Online
                                        Cernel Moderators @Cernel
                                        last edited by

                                        Also tested the current release 1.9.0.0.13066, under the same settings:
                                        -Xmx4096M
                                        -Xms4096M
                                        All to Fast AI And with the "barbarians" player disabled.
                                        AI Pause Duration=250
                                        (also -Dsun.java2d.opengl=true)

                                        TripleA 13066 (current release):
                                        Time to end the first turn (Carthage): 0' and 38"
                                        Time to end the first 5 rounds: 16' and 23"
                                        RAM level at the end of the first turn (Carthage): 1.84 GB
                                        RAM level at the end of the first 5 rounds: 2.32 GB

                                        Also, the purchase phase of the first turn of Carthage lasts only 6 seconds, here, just like in the latest prerelease.

                                        So, it seems that the current release and the latest prerelease have very similar speed and RAM usage, except that the prerelease might be a tad better in both (though, since the game plays differently virtually every time, small differences on a single game are not a reliable metre).

                                        In practice, it looks like something was done after the release that made the game over 3 times slower, while now either @Alexei-Svitkine fixed it or introduced some other improvements that just so happened to about exactly counter balance whatever else happened.

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

                                          @Cernel I think it the original slow down is probably related to changes in the path finding to better handle canals/terrain/etc. The AI was using this path finding itself in a not optimized way which now was further optimized.

                                          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
                                          • C Online
                                            Cernel Moderators
                                            last edited by

                                            Hey, this is not much of a feedback, but just wanted letting you know I've for the first time played Feudal Japan all war (by editing all relationships to default war, so there is no politics) (you can see the edits in the Levy Initial Units phase), with also my usual addition of +2 castles in each capital (kinda needed, really).

                                            Savegame:
                                            03_WIN.tsvg

                                            It's the 1.9.0.0 release (13066) (we played live in the lobby).

                                            In this game, that lasted until round 18, none of the 4 players even get the chance to come next to each other, nor on land, neither on sea.

                                            Eventually, I won because everyone else got stomped by the AI.:grinning_squinting_face:

                                            The first human player to become history was Yamana, stomped by the AI on round 9, despite the fact that we edited him back 3 daimyo (!!!) on round 3 (he lost the first 2 on round 1 and the last one on round 3). Obviously, he was a noob.

                                            Then, it was the turn of Ryuzoji, stomped by the AI on round 12. An average (maybe good) player, but inexperienced on the map.

                                            Then, the AI partially stomped Chosokabe in Iyo on round 18, and that player surrendered, ending the game in my favour by survival.:grinning_face_with_sweat:

                                            And we were not even playing with any AI bonuses at all! As you can see, I've dumped all the flags into the "Human Players" box (that is how you avoid anyone getting bonuses).

                                            I'm Hojo and, at this point, I think I should (very) slowly but surely conquer all Japan, as long as no major mistakes, but Shimazu might have a chance of snowballing out of control (I might keep playing the game against the AI, to see how it goes on).

                                            So, while the AI, apparently, was more successful than most players (as said, this is 100% fair, as the AI didn't have any bonus at all), it still did some major mistakes, that I wish to highlight:

                                            1. On round 1, Uesugi attacks Kokuze, putting itself in a major dead zone, basically easily losing its own game on its first move. I actually attacked that AI player in that zone, on round 2, but only to strafe it, to damage it and, therefore, oblige it to turtle for the rest of the game, as, then, Date, would inevitably be next to its capital. Anyways, that was a very bad decision to take, and the AI does it quite often: attacking the "neutral" player just to end up in a zone where to be attacked at huge TUV loss (eventually, Uesugi fell earlier than I hoped, to Date, hence I'm not sure that strafe was a good idea, but ended up being manageable, mostly out of major misplays from Date, as well).

                                            2. On round 12 Date attacks the "Neutrals" in Etchu, which is itself not something terrible, as it loses 5 ashigaru in exchange for getting an easily defensive 3 production territory, opening up to two other exposed production 3 territories, but, at the same time, it also attacks Kozuke, on a 88% battle, that would be very bad if failing and not much better if succeeding, as I've my huge stack nearby. That is the single move that spelled the fate of Date (if the game would have lasted a few more rounds, I would have got Date capital on a 100% on dice). More in general, I believe the AI displays an excessive tendency to attack those "minor clans". I don't recall if the logic to see and deprioritize players having no combat move phases is already there in the release or not? If it is, it is not working enough.

                                            3. The castle are really good units here, combining each one with 3 ashigaru (as you can see, I consistently bought them), but the AI never buys them (I know, immobile units, it will be needed to see what 2.0 does here).

                                            4. The AI seems unable to see the basic importance of the ashigaru units, buying too few of them and, consequently, having way more units able to give support than units able to receive support (needs some logic giving value to the ability of receiving support maybe?). What I suppose the AI is missing, here, also, is the importance of the Daimyo "infinite" bonus. Since that raises of 1 the power of each unit, it follows that the ashigaru are really much better units than basic stats, because that is double power for them, while much less of a bonus the more the units themselves are powerful. The AI doesn't even have a placement excuse for this, as here you can place anywhere (each territory has an invisible factory unit).

                                            5. The AI very rarely buys cavalry, despite this being a fairly good unit. If you look at the stats and compare it with samurai (that the AI buys more frequently), you can see that if a samurai costs 6, the cavalry may cost 7, if it would move 1, thus it is only overpriced by 1, in exchange for the movement 2. I don't buy cavalry often, either, but it seems the AI almost completely refuses to buy them, and that's too extreme.

                                            redrumR 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
                                            • 8
                                            • 9
                                            • 10
                                            • 11
                                            • 12
                                            • 15
                                            • 16
                                            • 10 / 16
                                            • First post
                                              Last post
                                            Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums