davidlallen
Deity
1. I have created a new worker unitclass with a few special features. It is cheaper than a regular worker, has +50% work rate, can only build one particular important improvement, and requires a certain civic to build (implemented with python cannotTrain). Overall it seems like a good value to me. But, the AI never builds it. Does the city AI look for multiple worker unitclasses and make some decision? Or does it always go with the worker unitclass? If there is a weight decision, I can push the cost or rate up till it starts winning, but if not, I guess I need a pointer to how I can add this.
2. Does anybody really understand AI_foundValue? I have written a new weighting function which seems to give good results for initial city site selection in a mapscript. It is highly customized and hardcoded for the mod. See this post for details. (The thread may be interesting to others considering modifications to AI_foundValue.) I hope to completely replace the existing AI_foundValue with this function, but I have failed several times to understand the existing function. In particular, I am confused about how it handles two good sites which are right next to each other. It seems that there should be some way to make sure to pick the best local site, and then discard the nearby losers. But, I cannot quite locate / understand how this is handled in AI_foundValue today. Can anybody give me a pointer?
2. Does anybody really understand AI_foundValue? I have written a new weighting function which seems to give good results for initial city site selection in a mapscript. It is highly customized and hardcoded for the mod. See this post for details. (The thread may be interesting to others considering modifications to AI_foundValue.) I hope to completely replace the existing AI_foundValue with this function, but I have failed several times to understand the existing function. In particular, I am confused about how it handles two good sites which are right next to each other. It seems that there should be some way to make sure to pick the best local site, and then discard the nearby losers. But, I cannot quite locate / understand how this is handled in AI_foundValue today. Can anybody give me a pointer?