Follow-up Comment #3, patch #4885 (project freeciv): I no longer believe this ticket can be split: the manner in which the AI detects whether an improvement is interesting is somewhat semantically bound to how is_improvement_redundant() is implemented.
>From the client side, the calls to is_improvement_redundant() seem sensible: ask if buildings currently in cities are currently providing a benefit (with no promise that they won't start providing a benefit later). A sensible implementation for this is just to see if the improvement provides value (money, units, extras, disaster protection, action prevention, effects, etc.), which isn't terribly difficult (although a bit tedious, with lots of potential for consolidated logic). Doing this properly will also require some means of deciding whether an additional effect value is actually beneficial (for example, an effect that reduced unit movement by 1 should probably not be considered beneficial). For the AI, things are a bit different. The AI seems to use this in part to decide if a building that isn't currently in a city will ever be interesting to have, so using the same logic above means that many improvements that *will* be interesting later are ignored, reducing the want value for dependencies (e.g. Libraries get built less because they fact that they enable Universities isn't interesting, because the University isn't providing any effect for a city without a Library). Also, the AI immediately sells any improvement that it detects as redundant, so improvements that are only sometimes useful tend to get sold before they are useful when conditions aren't right (e.g. switch from Democracy to Communism: lose Superhighways trade bonus, sell Superhighways, find Democracy less interesting later (and if interesting enough, less beneficial than before)). I'm tempted for the AI to consider building utility differently, selling buildings less often: this may mean keeping buildings that aren't currently useful (e.g. Cathedrals in the presence of Michelangelo's Chapel or Police Stations in the presence of Women's Suffrage), but seems to cause the AI to develop cities more in general. Others opinions on the matter welcomed. _______________________________________________________ Reply to this item at: <http://gna.org/patch/?4885> _______________________________________________ Message sent via/by Gna! http://gna.org/ _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev