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

    AI Territory valuation visibility?

    Scheduled Pinned Locked Moved AI
    19 Posts 7 Posters 5.6k Views 7 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.
    • TheDogT Offline
      TheDog
      last edited by

      You are probably doing this anyway but just in case, is it worth coding your calculations as positive integers?
      Then we humans can easily read the values, as floating point with leading zeros is harder.
      The AI will probably execute faster with whole numbers.

      https://forums.triplea-game.org/tags/thedog
      https://forums.triplea-game.org/topic/3741/curated-best-top-maps-triplea-guides

      1 Reply Last reply Reply Quote 0
      • T Offline
        Trevan
        last edited by

        Yeah, I'll be using longs as much as possible. I'd actually like to be able to show the valuation on the map itself, using something like a heatmap. I think that would be easier to understand vs having to look at a chart of numbers/territories.

        1 Reply Last reply Reply Quote 0
        • TheDogT Offline
          TheDog
          last edited by

          Ambitious! I hope you can get it to work, you might have to put it on a white background as some maps are quite dark.

          https://forums.triplea-game.org/tags/thedog
          https://forums.triplea-game.org/topic/3741/curated-best-top-maps-triplea-guides

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

            @Trevan Unless I'm misunderstanding you, the current Hard/Fast AI pretty much does exactly what you describe for determining territory value during non-combat move. It values things like factories/capitals/number of nearby territories and then diffuses this value to nearby territories so that units essentially move towards higher value territories. This could be improved to consider additional values like canals, objectives, etc.

            https://github.com/triplea-game/triplea/blob/master/game-core/src/main/java/games/strategy/triplea/ai/pro/util/ProTerritoryValueUtils.java#L52

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

            T 1 Reply Last reply Reply Quote 0
            • T Offline
              Trevan @redrum
              last edited by

              @redrum yes, the existing AI does calculate value and diffuse it. But it doesn't appear to do the entire map. It looks like it grabs a list of territories and then grabs neighbors of those territories and then calculates the values.

              My idea is also to not do battle simulations but instead try and incorporate that in the diffusion. That is one of the big unknowns on what I'm trying.

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

                @Trevan Not sure what you mean. If I recall it first finds all the "objective territories" which right now is capitals and factories then loops through all territories to find the distance each territory is from each objective and assigns value based on distance from each one. It also adds in some value based on territory production values that are nearby (within a few hexes).

                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
                • T Offline
                  Trevan
                  last edited by

                  Screen Shot 2020-12-17 at 9.07.58 PM.png

                  Here's an initial attempt to showing the values of the territories as a heatmap. This is World at War. It is from Russia's point of view. The bluer the territory is, the better it is. So most of the Russian territories are very red since the units shouldn't stay there.

                  M 1 Reply Last reply Reply Quote 1
                  • M Offline
                    Myrd @Trevan
                    last edited by

                    @trevan I'm curious whether the code for the above coloring was ever landed and if so, how to enable it?

                    LaFayetteL 1 Reply Last reply Reply Quote 0
                    • LaFayetteL Online
                      LaFayette Admin @Myrd
                      last edited by

                      @myrd I think it did and is part of the 'flow' AI. I don't recall if we've removed the flow AI at this point or not. So it may still be there. It would have been part of the AI debug menu to turn it on, check engine settings for "enable beta features". You'll also need to download the latest 2.6 engine as well, I'm pretty sure this was all well after the 2.5 release.

                      M 1 Reply Last reply Reply Quote 0
                      • M Offline
                        Myrd @LaFayette
                        last edited by

                        @lafayette Ah, I see it. I guess I was expecting to be available for the Hard AI, since the Flow AI doesn't do anything on some maps.

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