Socratatus
Emperor
- Joined
- Jul 26, 2007
- Messages
- 1,636
What I mean is, is the AI made `blind` to resources it should not know about until it actually comes across it from searching?
I haven't seen code inside the dll that supports such claims. Thus, until somebody shows proof in the form of code, it's all a myth.
My first post was simple yet very clear.You guys need to be more specific (i.e. provide and context/scenario). Do you mean that:
- The AI knows that there is a luxury resource that can be improved (i.e. "through the eyes of the worker/work-boat")?
- The AI knows that there is some sort of luxury resource (i.e. happiness from improvement-on-connection-to-trade-network) on a tile when evaluating the area for city placement?
- etc.
Without a shadow of the doubt, the AI knows where resources are, without seeing them.
Not only is the Boudicca move on the Spain DCL proof in and of itself, but when I was the host of the DCL and experimenting with maps (both ones I used and didn't) I would do interesting stuff on IGE like put a mountain range between an AI and a great spot with NW and 2 luxes. It would beeline there every time. They know for sure.
I don't have code proof, but I did see a CS with a fishing boat camped out on a tile for an eternity. I was playing Austria, so I diplomatically married the CS. Upon researching Biology, I discovered that it was an offshore Oil deposit. This was a while ago, so such an event might have been coded out or something.
You guys need to be more specific (i.e. provide and context/scenario). Do you mean that:
- The AI knows that there is a luxury resource that can be improved (i.e. "through the eyes of the worker/work-boat")?
- The AI knows that there is some sort of luxury resource (i.e. happiness from improvement-on-connection-to-trade-network) on a tile when evaluating the area for city placement?
- etc.
The AI has access to different levels of information depending on the specific context.
Circumstantial evidence is just circumstantial: for example, plot fertility calculations are deterministic, so of course Boudicca in the DCL will always settle the same, high fertility plot each time, regardless of whether the plot would give her access to resources that she does not see on the map. Work boat idling logic is weird, but it does not factor in resources at all (it just follows the same logic as the idling logic for great people, albeit in the ocean).
I can see the bits of code in the worker automation logic that were added to increase AI prioritization of UIs, and none of it is related to work boats. Work boat automation is incredibly simple: the AI checks which resources it can build improvements on, then targets the closest resource with each work boat, after which all remaining work boats just act like idle civilian units. Legions, Samurais, and other non-worker units that can build improvements are never used by the AI to build improvements (except Great People improvements of course, but that's a separate issue).Well, you looked into the actual game code so I certainly can't argue with that. The only thing I can think of for my Work Boat example is that IIRC it was my first game with Austria (which would put it in the G&K era) and there was a patch that came out that tweaked the AI - one tweak was to make the AI better at prioritize building UIs (In the patch notes, they specifically mentioned the Brazil Wood Camp which would place it in the BNW era). So maybe that patch altered the Work Boat behavior.
Plot fertility is the way the AI scores the value of settling any given plot; human players see this as yellow city icons. Its base value is determined by the sum of all yield values for the given plot as well as the Happiness, Resource, and Strategic value of the plot. In the case of yield values, the AI takes the total amount of each yield available in each ring around the plot and multiplies that value by a ring multiplier (6/3/2 for 1/2/3 tiles away), a yield-specific value multiplier (15/3/1/1/0/1 for Food/Hammers/Gold/Science/Culture/Faith), and a flavor multiplier (values based on the player's flavor values for Growth, Expansion, Production, Wonders, Gold, Tile Improvement, Science, Culture, and Religion). Happiness and Resource values are checked up to 5 tiles away with the ring multipliers of 6/3/2/1/1, a multiplier of 60 and 10, and a weird way of determining actual values that I cannot recall (only that it greatly undervalues happiness from unique luxuries). Strategic value is extremely dumb in the unmodded game: the only thing the AI checks for are hills in a radius of 1 and mountains in a radius of 2, increasing strategic value by a flat amount for each one. If a tile does not have any value besides strategic, ie. it's flat desert, snow, or mountain, it decreases the original plot's fertility value by 30 * (ring multiplier). Tiles owned by another player are not counted, and tiles owned by the current player have their fertility contribution halved. Natural wonders double their fertility contribution and also add an extra 500 fertility.What is a fertility calculation?
The spot that Boudicca heads for in the Spain DCL has resources but is quite a poor city location in terms of farmable tiles and especially in terms of hammers.
They only know this value once they reveal the tile. The value is also only influenced by resources after they are revealed (eg. Horses, Iron). If a tile is revealed, the AI knows the fertility of that tile regardless of what other tiles are revealed; if there's an unrevealed natural wonder 3 tiles to the north of a tile, for example, the AI will still "know" that there's a natural wonder near the given tile and factor it into the given tile's fertility. Since these tiles also show up as yellow city icons for the human player, it's not really unfair (ie. if you see a newly uncovered tile have a yellow city icon, you'd suspect that the land around it might be quite good).Ok but each AI knows this value on T0, right? So it actually doesn't matter if we perceive this as them going after resources or whatever... It's insane that they can see twenty hexes and think "hmm that's good, I'll settle there". And daft.
If a visible enemy unit is on a tile, the AI will not target that tile for settling cities. Since the AI does not retarget settlers, this means that if the AI clears a barbarian encampment on a high fertility tile the turn after it sends its settler out to settle a plot, it will not redirect its settler to that high fertility tile.Do unrevealed barbarians/enemies in that area count for something? Sometimes I get a suggestion for a city placement, and when I start exploring the area and reveal some barbs/barb camps, the suggestion disappears.