Arrakis.py map script discussion

I think outposts on Dunes are wrong from a theme perspective anyway. Shifting sand is not the best foundation for a base.

If you think about it though, culture borders don't really fit the theme either. There's gotta be a way to go waay out into the desert to get what you want out of it. That is a major them of Dune after all.
 
I bow before your genius. I have spent a weekend reading *one AI function* (AI_foundValue) without success.

I've read that function, and that is quite a hairy function. What were you trying to learn from it?
 
I've read that function, and that is quite a hairy function. What were you trying to learn from it?

For DW, it generates very poor locations. We want to rewrite it to understand that coast is not valuable for food, that hills are very valuable for food, etc. In order to rewrite it, first we should understand it.
 
For DW, it generates very poor locations. We want to rewrite it to understand that coast is not valuable for food, that hills are very valuable for food, etc. In order to rewrite it, first we should understand it.

It's been about a year since I looked at it, but I recall that it figured all that out brute force like. It adds up all the food potential in a fat cross. I don't think it takes anything for granted like techs or what not. If there's no food in the ocean, I'm thinking that it knows that already. Same for hills.
 
There's gotta be a way to go waay out into the desert to get what you want out of it.

We've had this argument before. I'm strongly opposed to doing this; if nothing else, I don't think it will be fun. There are only a handful of units that can go out into the deep desert, so contesting these areas militarily isnt' really fun.
And it is hard enough getting the AI to defend their cities and areas that are within their cities, let alone the rest of the map.

Just think of culture as areas of influence and territorial claims, and the ability to maintain supply lines.

And as far as fluff; spice *is* harvested only in the desert relatively close to the poles. The deep deep desert beyond that isn't harvested, supply lines would be too long, losses too high, and overall too dangerous.

And the conflict in Dune is around the cities and populated areas, not out in the deep desert.
 
For DW, it generates very poor locations. We want to rewrite it to understand that coast is not valuable for food, that hills are very valuable for food, etc. In order to rewrite it, first we should understand it.

Actually David, check out the function in Arrakis.py called getPlotPotentialValue. It's a mimick of getFoundValue but with comments. I can't remember exactly why I had to mimick that now.. In any case, it is this mimick that is used to find starting plots on Arrakis.py. For cities placed after that, obviously the game uses getFoundValue.
 
It's been about a year since I looked at it, but I recall that it figured all that out brute force like. It adds up all the food potential in a fat cross. I don't think it takes anything for granted like techs or what not. If there's no food in the ocean, I'm thinking that it knows that already. Same for hills.

We observe that it picks very poor locations. So we would like to rewrite it. First we need to understand it.
 
Actually David, check out the function in Arrakis.py called getPlotPotentialValue. It's a mimick of getFoundValue but with comments. I can't remember exactly why I had to mimick that now.. In any case, it is this mimick that is used to find starting plots on Arrakis.py. For cities placed after that, obviously the game uses getFoundValue.

We recently commented out the call to your getPlotPotentialValue, and we found that the starting locations were much improved. Still bad, but less bad. I guess that means the start positions are now determined by AI_foundValue. So we have peeled off one layer; now we are only using one function, which will make it a little less work.
 
Its locations are mostly poor because the AI double-counts resource bonuses. It builds a city with a well in its BFC, and then builds another city with the same well in its BFC. But only 1 city can work the well, so the second city is weak.

I'm not sure that the placement is that poor, ignoring that.

Perhaps we should move this discussion here: http://forums.civfanatics.com/showthread.php?t=339368
Cephalo, maybe you could please track that thread?
 
We recently commented out the call to your getPlotPotentialValue, and we found that the starting locations were much improved. Still bad, but less bad. I guess that means the start positions are now determined by AI_foundValue. So we have peeled off one layer; now we are only using one function, which will make it a little less work.

Perhaps the problem is that it is ignoring some obviously good spots because it is ignoring certain bonuses because of tech issues and tech era issues?
 
Is it possible to take it into consideration by cheaqting AIs analysis and throwing him Wali era values?
 
Its an interesting point that tweaking the base values of well, dew collector and windtrap values (lowered base value, higher with tech over time) could have effected city location decisions.

Does the algorithm look only at the base-value of improvements? Or can it see bonuses from future techs?
 
Its an interesting point that tweaking the base values of well, dew collector and windtrap values (lowered base value, higher with tech over time) could have effected city location decisions.

Does the algorithm look only at the base-value of improvements? Or can it see bonuses from future techs?

It expends much thought and energy to ignore bonuses from future techs.

EDIT: actually it goes by era.
 
Ok. Setting it to era values that includes the bonus techs for windtraps, wells and dew collectors seems optimal then (all era 1 except maybe desert engineering for wells?).
 
Ok. Setting it to era values that includes the bonus techs for windtraps, wells and dew collectors seems optimal then (all era 1 except maybe desert engineering for wells?).

The point is to come up with a relative rating of each plot against the others. If we evaluate all plots to find the best ones, using the starting era ratings, do you think this will lead to any wrong results? That is, can you imagine a situation where using the starting era values, we will pick one site; but using a later era values, we would pick another site?
 
The point is to come up with a relative rating of each plot against the others. If we evaluate all plots to find the best ones, using the starting era ratings, do you think this will lead to any wrong results? That is, can you imagine a situation where using the starting era values, we will pick one site; but using a later era values, we would pick another site?

One difference between vanilla and DW is that vanilla has alot of invisible resources, so if the AI assigns value to things like aluminum in ancient times, it's kinda cheating, so they have this code to avoid that.

In DW you have these resources that develop through the ages, so the AI won't see it's full potential.
 
The point is to come up with a relative rating of each plot against the others. If we evaluate all plots to find the best ones, using the starting era ratings, do you think this will lead to any wrong results? That is, can you imagine a situation where using the starting era values, we will pick one site; but using a later era values, we would pick another site?

I'm guessnig there could be an issue if the AI could evaluate higher yields for tier1 improvements, but not higher level improvements. Eg: it can see that solar farms are buildable on rock, and give +2 hammers, eventually +3 and +4 with techs, but can't see that groundwater could have a deep well or aquabore.

This could potentially bias the AI towards rock/graben/rugged relative to mesa. Which would be ignored if you just used the starting era values.
Alternatively, the AI looknig at the whole tree might see high values of mines and level 3 turbines and so value those tiles higher than the tiles with dew collectors, but not realize that the dew collector tiles were really more important.
But probably isn't a big deal.

The AI could also be biased towards high-yielding plantation/insect farms, which are nice, but not crucial, as compared to water-yielding tiles.

But this is all guesswork on my part.

Really, the AI needs to place priority on water-yielding tiles and bonuses.
Other stuff you can always get from terrain improvements, but water yields are basically fixed by terrain. So it really needs to maximize water income, and not worry about the rest very much.
 
The freshwater lake water yield bug is back. Or something is at least. Playing 1.6.1 + patch 1.6.3, see attached screenshot; the graben/sink tile has a 1 water yield, presumably from a converted freshwater lake.
 

Attachments

  • succ4.jpg
    succ4.jpg
    143.8 KB · Views: 92
I am not able to reproduce this. Which mapscript, what settings? Can you post a savegame and the coordinates of the unexpected water yield?
 
Back
Top Bottom