[freeciv-ai] Re: ai bug when splitting up settlers
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sun, 12 May 2002, Per I. Mathisen wrote:
> I've made my custom rulesets, where I've split the old settler up into a
> workers unit and a settlers unit which can only settle cities. The AI
> proceeds to build truly massive amounts of workers, and only a tiny amount
> of settlers (yes, settlers are unit type number 0).
>
> This tells me that the AI might be wanting settlers for all the wrong
> reasons, even if it uses them correctly when built.
settlers.c:void contemplate_terrain_improvements(struct city *pcity)
@@ -1571,12 +1567,15 @@
virtualunit.moves_left = unit_type(&virtualunit)->move_rate;
virtualunit.hp = unit_type(&virtualunit)->hp;
want = evaluate_improvements(&virtualunit, &best_act, &gx, &gy);
+/* FIXME: AI does not ship F_SETTLERS around, only F_CITIES - Per */
+#ifdef AI_SMART_WHICH_IS_NOT_TRUE
unit_list_iterate(pplayer->units, qpass) {
/* We want a ferryboat with want 199 */
if (qpass->ai.ferryboat == pcity->id)
want = -199;
- } unit_list_iterate_end;
-
+ } unit_list_iterate_end;
+#endif
+ assert(want >= 0);
pcity->ai.settler_want = want;
}
This fix seems to be necessary. This code was copy&pasted from the
F_CITIES code by whoever did the F_SETTLERS and F_CITIES split. I bet
there are a lot of other issues he did not fix also.
Yours,
Per
"As Israeli forces pursued militants, civilians
continued getting in the way and dying as a
result." -- New York Times, April 21
- [freeciv-ai] ai bug when splitting up settlers, Per I. Mathisen, 2002/05/12
- [freeciv-ai] Re: ai bug when splitting up settlers,
Per I. Mathisen <=
- [freeciv-ai] Re: ai bug when splitting up settlers, Per I. Mathisen, 2002/05/12
- [freeciv-ai] Re: ai bug when splitting up settlers, Raahul Kumar, 2002/05/13
- [freeciv-ai] Re: ai bug when splitting up settlers, Per I. Mathisen, 2002/05/13
- [freeciv-ai] Re: ai bug when splitting up settlers, Raimar Falke, 2002/05/14
- [freeciv-ai] Re: ai bug when splitting up settlers, Ross W. Wetmore, 2002/05/14
- [freeciv-ai] Re: ai bug when splitting up settlers, Raimar Falke, 2002/05/15
- [freeciv-ai] Re: ai bug when splitting up settlers, Ross W. Wetmore, 2002/05/15
- [freeciv-ai] Re: ai bug when splitting up settlers, Raimar Falke, 2002/05/16
- [freeciv-ai] Re: ai bug when splitting up settlers, Ross W. Wetmore, 2002/05/16
- [freeciv-ai] Re: ai bug when splitting up settlers, Raimar Falke, 2002/05/17
|
|