Complete.Org: Mailing Lists: Archives: freeciv-ai: May 2002:
[freeciv-ai] Re: Settler fixes [Was: A better AI Eval buildings 1.1]
Home

[freeciv-ai] Re: Settler fixes [Was: A better AI Eval buildings 1.1]

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: <freeciv-ai@xxxxxxxxxxx>
Subject: [freeciv-ai] Re: Settler fixes [Was: A better AI Eval buildings 1.1]
From: "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx>
Date: Tue, 14 May 2002 11:48:34 +0200 (MEST)

On Tue, 14 May 2002, Raimar Falke wrote:
> In the settler management agent (customizable auto settler with city
> founding ability) I scan the whole known continent for a good spot if
> a settler is without work.

I hope you use something akin to the minimap to ensure that two settlers
don't go for the same city spot.

> You also can't cache the results from turn to turn because there may
> be a much better spot just expolored by another unit.

But I think you can, if the area explored is just big enough. And "big
enough" is not very much, just an area of, say, 6x6 (less so in the
beginning). Because the cost of travelling across a larger distance than
that to settle in a slight better spot is much higher than the benefit.

> So I know this needs a lot of CPU but you can ensure that it is the
> best spot possible at this time.

Each turn you spend travelling towards this "best spot" is production,
trade and science lost. Since this means your next settler will be
finished later, and its city's next settler will be later, etc, the
repercussions of this decision will magnify each turn until the end. In
the beginning in particular, fiddling about the "best spot" means certain
death when faced with an adversary of equal skill.

> I will see how much of this can be optimized but fast path
> finding/warmap/goto functions will help a lot.

The ideal settler will find good spot nearby, and make roads on any
grassland/plain tiles used on the way there. This is because roads are
both extremely important to get science and they are cheap to make. Since
settler and worker are separate abilities, this is something of a
challenge to do right.

Raimar, can you post whatever code/headers/plans you currently have for
SMA?

Yours,
Per

"As Israeli forces pursued militants, civilians
continued getting in the way and dying as a
result." -- New York Times, April 21



[Prev in Thread] Current Thread [Next in Thread]