Complete.Org: Mailing Lists: Archives: freeciv-ai: May 2002:
[freeciv-ai] Re: ai bug when splitting up settlers
Home

[freeciv-ai] Re: ai bug when splitting up settlers

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: <freeciv-ai@xxxxxxxxxxx>
Subject: [freeciv-ai] Re: ai bug when splitting up settlers
From: "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx>
Date: Mon, 13 May 2002 14:35:36 +0200 (MEST)

On Mon, 13 May 2002, Raahul Kumar wrote:
> The settler problem is due to the AI favouring production over food need. Read
> the advdomestic patches I sent in to the mailing list, or apply the
> corecleanups 13 and just read advdomestic.c.

But new cities are the ultimate source of more production. The problem is
that it does not see that.

> Ross seems to have a partial fix. He makes it favour setttlers when the number
> of cities is fewer than 6. It seems to me basing it on available land mass
> would be better.

No, both it these suggestions are very wrong. Syela's general idea is
correct - we should calculate the benefit a new city can give us. The
problem is just that in addition to using slightly wrong algorithms for
the calculations, he does not take into account any anti-ICS variables.

I'm not happy with the settler code before it is so good, it understands
when ICS is the answer (as in current default ruleset), and it understands
when it is not. It probably has to be rewritten to get there. But reading
the cleaned up version of Syela's code is good inspiration, I think.

> We could build workers based on the minimap idea you had. The workers we need
> is based on no of umimproved tiles in city radiuses, the amount of time it
> would take the workers we currently have to improve them, aargh it gets hard
> already.

Yes, it becomes hard. The above is about the same approach as Syela chose.

> Simple idea: we build one worker for every 4 cities. As no of tiles left
> umimproved in city radiuses drops, we lower production.

This is a very good idea. I like it a lot. We could just add additional
code at the end of the current function that drops want as we come closer
to the goal of one worker for each fourth city on the same continent.

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]