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

    Warcraft: War Heroes - Official Thread

    Scheduled Pinned Locked Moved Maps & Mods
    303 Posts 24 Posters 314.2k Views 19 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 redrum

      @Frostion Wow! The screenshots look great. And really liking the ideas and concept here.

      I'm glad to take a look at the AI performance issues if you send me a working zip of what you have so far. First question is did you try both the Hard and Fast AI? As if both are slow that narrows down the issue already vs only Hard AI being slow. The 2 most common things that I know of that cause the AI to be slow are number of units being high so simulated battles take a while (probably not the case here and only impacts Hard AI) and the map having a large number of territories (probably the issue here).

      I can probably do some quick testing to see which calculations are taking a very long time and make some adjustments. There just hasn't really been any maps that have gotten to the point where the AI takes more than a minute or 2 so haven't really tested anything bigger than probably World At War.

      Oh and just to add, number of AI vs human players has virtually no impact as each AI essentially takes its turn separately. Overall number of players has some impact but number of territories is the bigger factor.

      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
      • alkexrA Offline
        alkexr @Frostion
        last edited by

        @Frostion Domination 1901 has about 500 land and 200 water territories, turns take around 90s for Hard AI.

        "For the world is changing: I feel it in the water, I feel it in the earth, and I smell it in the air."

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

          Thanks @redrum. I am at a loss about what is slowing the game down. As @alkexr says, other maps have similar amount of territories, and run much better (still slow I guess), so I can’t see what makes this map extra exhausting for the AI.

          The most puzzling thing is that it is so slow, even though all players start out with 1 owned territory.

          Dropbox link sent. To test the map, I advise you to just run an all AI game.

          BTW because of the change unit on death to another unit, I have of course played with pre-releases. I think I have also tried. I have mostly played with Hard AI.

          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 redrum

            @Frostion The main issue I found so far is actually that you have a troll and human sea unit after the first set of major player turns that has 100 movement and can transport units. For each AI, it runs calculations to determine the possible moves/attacks from all the other players when determining where it should move. Checking the possibles moves and amphib assaults means for these 100 move ships ends up checking every sea territory and land territory adjacent to sea territories on the whole map. The AI also assumes worse case scenario so doesn't limit the possible moves base on needed fuel (assumes its enemies could possibly get more fuel before moving).

            So I guess the question is what's the purpose of these ferry units and do they really need 100 movement?

            I did some quick tests and if you either remove their ability to transport units and/or vastly decrease their movement points to say 5 then it seems to run a lot faster.

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

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

              @redrum Also guess another user case for being able to set infinite. I wonder if in such a case the AI would go any slower if set to 100 or 1000, assuming 1000 never allows you to do more than what you can with 100?

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

                @Cernel Umm hard to say without running some tests but looking at the code it would have a potential impact and infinite would actually run forever with the current engine code (though infinite would probably correspond to max integer value in Java so wouldn't actually run forever). I added a check in to improve performance where if its already checked all the territories it can reach on a map then it stops searching so that 100 vs 1000 should be the same performance if 100 is already checking all possible territories.

                @Frostion I made a few engine improvements for maps with lots of territories and then changed ferries to have 5 instead of 100 movement. I ran a test game with all Fast AI players and got to round 8 in probably about 30 minutes: test.tsvg

                @alkexr Yeah, I ran some tests on WaW, Another World, and some of the Domination maps which I think are probably the largest maps we have. I'm making some performance improvements for maps with a large number of territories though this map's issue is primarily the 100 move transport units. If you add units like that to those other maps, you'd probably see performance tank as well.

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

                  @redrum The Ferry unit is a transport that only heroes can use. With the prerelease I have installed, even when they have a movement like 5 move, the AI is still uses a long time to purchase a single unit (the only thing AI can do during round 1), and in round 2 most AI players cannot afford a second unit, but the ones who can, is also here very slow to make the purchase. It seems to me that it is during purchase the slowing down happens.

                  With the very limited options the AI players have, I can’t see why it takes so long for it to purchase.

                  I will try to use some of the newer pre-releases and see if there is any differences.

                  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 Ok. Did you at least see a noticeable improvement when decreasing ferry movement from 100 to 5? Can you give me a ballpark in say round 2 on about how long a major AI turn takes and a neutral AI turn takes? You might want to try increasing the memory allocated to TripleA as well given how large and detailed the map is: https://forums.triplea-game.org/topic/524/how-to-increase-memory-for-triplea. The default is 2GB but providing 3-4GB might help.

                    I don't think you'll see much difference in newer pre-release versions until I include some of the performance improvements I'm making now. I'm also vastly decreasing the time it takes for the RandomStartDelegate as that is really slow right now and waiting several minutes for the map to start up each time I test something is painful 🙂

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

                      A quicker random start delegate would be great. I guess it would be nice to have AI place without delay even though the “AI pause duration” is 400 ms. Perhaps the random start should just happen as fast as possible and not be affected by the “AI pause duration” setting. This has also been an issue in the Star Trek map, where players also have to wait some time for all planets to be placed.

                      Yes I think the 100 to 5 move has speeded up the map a lot, but it still seems that the small AI players use a lot of time when purchasing.

                      I have tested out how fast the map runs on my PC:
                      Intel i5-4670K @ 3.4GHz
                      16 GB RAM
                      Win 64-bit

                      Hard AI test results: (not including the random start delegate’s time to set up a game)
                      Round 1 finish: 12 minutes and 40 sec into the game
                      Round 2 finish: 30 minutes and 30 sec into the game
                      Fast AI test results: (not including the random start delegate’s time to set up a game)
                      Round 1 finish: 12 minutes and 50 sec into the game
                      Round 2 finish: 30 minutes and 05 sec into the game

                      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

                        @Frostion Ok. The random start delegate actually doesn't use the AI pause duration just had a hard coded 250ms. I've changed that to 10ms so it runs much faster now.

                        30 mins for round 2 is really slow. I've made a bunch of performance changes to the AI and I'm now seeing round 2 take 4-5 mins so much better. I'm just doing some tests on other large maps to ensure performance is equal or better on them before I create a PR for the changes.

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

                        Captain CrunchC C 2 Replies Last reply Reply Quote 2
                        • Captain CrunchC Offline
                          Captain Crunch Banned @redrum
                          last edited by Captain Crunch

                          @redrum hey do these changes effect the WWIIClassic map AI at all?

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

                            @Captain-Crunch Technically they impact the AI on all maps but definitely more so on larger maps. Probably won't notice much of a performance difference on ww2 classic as its a pretty small map in comparison to many others but should be a little faster. Its mostly about making some of the AI calculations more 'regional' instead of 'global' so it only runs calcs where it has units to move/place. So that on large maps for example Japan isn't calculating a bunch of unnecessary things over in the European theater.

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

                              Sweet ! Always like seeing the AI get improved ! Although i did watch Terminator last night : )

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

                                @Frostion Here's the PR: https://github.com/triplea-game/triplea/pull/4764

                                Once that's merged then I'd ask you to download the latest pre-release and test it again to see if it made a significant 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 Offline
                                  Cernel Moderators @redrum
                                  last edited by

                                  @redrum said in World of War Heroes – Official Thread:

                                  @Frostion Ok. The random start delegate actually doesn't use the AI pause duration just had a hard coded 250ms. I've changed that to 10ms so it runs much faster now.

                                  Are all the developers sure about this change? The main reason the random start delegate was made (by Veqryn) was to make Risk. Now, Risk has never been made, but if you think about a similar sized game (or you can take a look at "Conquest of the World"), 250ms allows you to have a quick glimpse ad who gets what, and you don't need to wait much. Without getting into any more complexity, maybe 100ms would be a reasonable compromise? At 10ms, I would rather suggest to just run it in the background and give the final solution istantly (thus 0ms); I suppose looking at a 10ms would give little else than a headache. Anyways, I don't really care about it myself.

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

                                    @redrum That last update to the prerelease practically solved the problem! Right now it runs very smooth, just like a small map 🙂 Unfortunately I have to go to work for 3 days now, so no map working for some days 😞
                                    I felt I had hit a wall in regards to play testing World of War Heroes, but now I really look forward to going back to mapworking 😄

                                    @Cernel "I suppose looking at a 10ms would give little else than a headache." The screen camera does not follow the territory picking around when AI is picking territories/placing units. In Star Trek I have never seen this either. Maybe because the human players are not involved in the picking?
                                    I only see the picking on the minimap. But if the engine camera was to follow the picking and placements, maybe a user engine setting could be implemented to set the speed of placements? Or a feature that would automatically turn down the speed of picking territories if humans were also involved in the picking?

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

                                      @Frostion Glad to hear the performance improvements worked. Seems like you have a pretty solid start on the map. Let me know if there are any other features or improvements that are needed.

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

                                        @redrum Thx. I think that the plans I have for WoWH at the moment are all doable with the current engine. But who knows, something might come up 🙂

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

                                          @Frostion 10 ms is also beyond what a human eye can properly perceive, as it means 100 frames per second (for example, theatres go at 24 frames per second, and YouTube goes mostly at 30 or 60 frames per second). Moreover, if you have any display with less than 100 frames per second, the process will even fail to be fully displayed.

                                          So, I'm not really against running it superfast, but, in this case, as I said, I would suggest to make it actually instant, rather than 10 ms (running all the steps in the background and changing the board view at once when all its done).

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

                                            @Cernel Even though it states 10 ms, it is much slower in reality. Maybe because it is 10 ms + the time used for calculation.

                                            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

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