We could also start doing doxygen comments in front of functions
I recommend doxygen comments. They're where the comments are needed, and in my experience they have been better than external documents from both writing and reading points of view.
We could also start doing doxygen comments in front of functions
I do not agree entirely with this, given that, unless you are also playing with the no Espionage option on, you can steal techs... obviously , you gain zero in teching what everyone is teching if you want to steal techs. Not that the current AI will steal techs with something that resembles a coherent planWhen tech trading is not available, I don't think the AI would benefit much from a more random research choice. If beelining Bronze Working is the best opening option, it should go do that.
While you're rewriting the tech valuation function, perhaps you could allow weaker nations to band together to share techs in order to catch up?
And you need to factor in "can I see the resource yet". Iron Working is key even if you don't have any iron (for obvious reasons).I know the AI takes into account the value of a technology for permitting exploiting of a resource, but does the AI actually take into account whether it has any of it? In other words, if the AI has no happiness resources requiring Plantations in its borders, it probably shouldn't consider Calendar a big priority. But if it does, it should consider it more important. Particularly if it has many unhappy cities (which I think it doesn't take into consideration).
Similarly, Horseback Riding should get a lower priority if you have no supply of Horses to make Horse Archers.
And you need to factor in "can I see the resource yet". Iron Working is key even if you don't have any iron (for obvious reasons).
Instead, I intend to switch to a model where a non-random value is computed for each tech and these values are then used as weightings to pick a tech randomly. In essence, if there are three possible techs with weightings A, B, and C, then the AI would pick the first tech with probability A / (A + B + C).
There are of course many ways to very this ... only consider techs which are at least 1/X as valued as the most valued, subtract 1/X of the highest value from each value before doing the weightings, etc. The exact formula will need to be setup to get the right balance between going for higher value techs and being non-predictable, but I think this randomness model will produce results that are easier to understand and tweak.
Also, the valuations will definitely consider both the benefit and the cost of the tech, Firaxis has this in their mechanism already. Good of you to make sure this is in there Roland!
You might as well just factor that into how we calculate tech values.
Ie, instead of saying value 3, the value of that tech is 27.
The AI however shouldn't always pick technology B. If the AI would do that, then it could easily result in a situation where the human player can safely pick technology A in a tight technology race for A or B as the player would know that all the AI's were going for B.
Maybe this is obvious, but shouldn't this be where espionage plays a role (Assuming it's enabled, of course.) I use passive espionage all the time to see what my allies and enemies are researching, and choose paths accordingly. The AI should do that too. If it's best friends already have Tech A covered, and will get it in a reasonable amount of time, the AI should know to go for tech B or C, and trade it to the other AI for tech A, getting an advantage.
I agree completely with this. If the AI takes more of its current circumstances into account, it will make the AI sufficiently unpredictable while still having them do what's in their best interests.If the tech valuation function becomes more sophisticated, then it may well be unpredictable without being random. For example, suppose that Feudalism is valued more highly for civs with many archers. Since a human player will not know precisely how many archers each opposing civ has, the human will not know which will research Feudalism, if any.
If the tech valuation function becomes more sophisticated, then it may well be unpredictable without being random. For example, suppose that Feudalism is valued more highly for civs with many archers. Since a human player will not know precisely how many archers each opposing civ has, the human will not know which will research Feudalism, if any.