Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: flying AI (PR#1162)
Home

[Freeciv-Dev] Re: flying AI (PR#1162)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Cc: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>, Petr Baudis <pasky@xxxxxxxxxxx>, Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: flying AI (PR#1162)
From: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Date: Mon, 31 Dec 2001 00:14:33 -0500

At 04:57 PM 01/12/30 -0800, Raahul Kumar wrote:
>
>--- "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx> wrote:
>> At 01:51 AM 01/12/29 -0800, Raahul Kumar wrote:
>> >
>> >--- Petr Baudis <pasky@xxxxxxxxxxx> wrote:
>> >> Dear diary, on Sat, Dec 29, 2001 at 07:40:18AM CET, I got a letter,
>> >> where Raahul Kumar <raahul_da_man@xxxxxxxxx> told me, that...
>> >> > Some additional titbits for you. Hope this makes the function clearer.
>> >> > I strongly suspect you want me to explain the 
>> >> > 
>> >> > else b0 = ((b * a - f * d) * SHIELD_WEIGHTING / (a + d)) - 
>> >> > 1412 c * (unhap ? SHIELD_WEIGHTING + 2 * TRADE_WEIGHTING :
>> >> SHIELD_WEIGHTING);
>> 
>> >Desire, is this like want? I assume the 0-100 stuff all applies here, I
just
>> >wish I knew exactly how all these weights interact to decide what gets
>> built.
>> 
>> *_WEIGHTING values are things like food/shields/trade = 18/14/12 that give
>> a relative bias to some resources over others. Trade is always the lowest,
>> and generally food is more important than shields (if you grow you can get
>> more shields, but choosing shields in preference leads to stagnation).
>> 
>> This is complicated by the fact that food is not a static WEIGHTING, but 
>> amortized so it decreases in importance as the size of the food box grows
>> (which is another reason to boost it initially, and probably a bad thing 
>> to have done anyway). Thus, if you look carefully, the food formulas are
>> always optimized a little bit differently with cryptic comments to drive
>> you crazy if you don't understand this basic point.
>> 
>
>This is all stuff that should go to README.AI.  I'm not quite clear as to
what
>alternative there is to boosting the food weights early on. Are you
suggesting
>a feedback loop where as the city grows in size, more food than the minimum
>needed to keep the city from starving grows less and less important?

Food is currently not a static weight like the rest. For bigger cities,
i.e. those with bigger foodboxes, food is correspondingly lower in weight
because of amortization. This is bad, as cities stop growing at some point 
in favour of sending workers to mountains because they have a single shield 
rather than going for wheat and getting 2 mountains next time round :-).

IMHO this is a goofy atrategy, but by setting food to a higher priority
than the rest you can push growth in the early stages, and production or 
trade (whichever is next higher) or both will take over when cities reach 
a certain (preset by the relative weights) size.

>My interpretation of your comment is that the more food we have, and the
closer
>we come to adding another population point(a full foodbox), the less
important
>food becomes. The trade weighting is perhaps too low. I think it's probably
>necessary to weigh trade higher for cities that have lots of trade, and
>trade routes, with an increase for each marketplace/bank/stock exchange that
>gets built. 

The WEIGHTING values should be tied to AI personalities. A Gandhi likes
lots of food, some production and poverty. A Bismarck goes for moderate
everything with slight bias for production over food and low expand. 
Elizabeth goes for moderation but slight bias trade >~ food > production 
and boost to expand.

When these weights are folded into the want/choice calculations, they will
send different AI personalities off in different directions.

>This probably explains why the AI is so damn bad at science.

The AI puts all its effort into taxes at some point. That is part of the
reason it can't do science. 

The AI has a totally braindead understanding of lux/tax/sci and how to
use elvii. It seems to run to some extreme instead of having a feedback
to keep things sanely balanced.

>The amortizing of food: explain that a bit more. I do not know how that
works.

IMHO it doesn't work much at all - basically broken logic like all the
amortized stuff :-).

>__________________________________________________
>Do You Yahoo!?
>Send your FREE holiday greetings online!
>http://greetings.yahoo.com
>



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