[freeciv-ai] Re: [Freeciv-Dev] (PR#12682) AI Ignores Building Effects fo
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12682 >
On Mon, 26 Dec 2005, Benedict Adamson wrote:
> The patch increases the tech_want for technologies that enable useful
> improvements (for example, Ceremonial Burial enabling Temple) and for
> technologies that enhance improvements (for example, Mysticism enhances
> Temple). It decreases the tech_want for technologies that will render
> useful improvements obsolete.
This is a very nice patch! Sorry it has taken so long to look at it. I
have some comments:
+ /* WAG */
+ const int tech_want = building_want * pcity->ai.recalc_interval * 14 / 8;
Where do 14 and 8 come from and what to they mean? Please use some
informative defines here instead of plain numbers.
+ int n_needed_techs = 0;
+ int n_needed_improvements = 0;
+ /* For now, we hard-code the maximum number of needed technologies
+ * and improvements at 8 so we can use an efficient array
+ * rather than a slow genlist.
+ * For most rulesets, we expect at most 1 requirement of each.
+ Tech_type_id needed_techs;
+ Impr_type_id needed_improvements;
Why not use a specvec here?
+ /* The units of building_want seem to be production
+ * (shields/gold/luxuries) */
+ int building_want[B_LAST];
By 'production' we usually mean shields. The units of building_want are in
some fuzzy and special AI value which does not correspond to any
particular output. I either do not understand or like this comment.
Look at the above and I'll commit.
- [freeciv-ai] Re: [Freeciv-Dev] (PR#12682) AI Ignores Building Effects for Tech. Wants,
Per I. Mathisen <=