AI Territory valuation visibility?
-
@Trevan
below is a link to one of my Settler maps, it has been customised for you, I'm hoping it will give you a test AI map for over the winter break and will do the following things;- More often than not it will have a stack of units piled up in a factory/town/city territory, usually in/near Russia.
- Gives economic victory in about 10 minutes
- Plays 2v2 on Hard AI
- Not World War 2
- Of note, there is no victoryCity as it is a random start map.
https://drive.google.com/drive/folders/18pc1M1-oqyHGgbmYU6R6F0MkLAaAmpXi?usp=sharing
Open folder "For Trevan only
Download it
Select Settlers: Trevan Age of Tribes
Load it and press Play -
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. -
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.
-
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.
-
@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.
-
@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.
-
@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).
-

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.
-
@trevan I'm curious whether the code for the above coloring was ever landed and if so, how to enable it?
-
@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.
-
@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.
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