Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2004:
[Freeciv-Dev] Re: (PR#7129) server-side CMA uses bad parameters
Home

[Freeciv-Dev] Re: (PR#7129) server-side CMA uses bad parameters

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#7129) server-side CMA uses bad parameters
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 27 Jan 2004 15:09:26 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7129 >

Per I. Mathisen wrote:

>>The code that is there now is unacceptable IMO. But it would be nice to
>>know what its purpose is before changing it. I suspect that the AI
>>"priority" values were being used for another purpose elsewhere and were
>>conscripted into CM usage, with tweaks. This does not seem like a good
>>idea!
> 
> 
> Well. The AI priorities are meant to change AI behaviour on a global
> scale, including worker placements. Eg when we no longer can research
> anything useful, science priority drops to zero. When at all out war, in
> the future, we should prioritize shields. Worker placement should reflect
> this.

And if you had lots of gold, you might drop the gold prioirty.  Very 
clever...except that if you drop it by 2 from its current value of 12, 
you'll end up with a negative gold priority in the CM.  With all of the 
subtraction done in the CM code it's likely that we have negative values 
possible already.

My point is that although the AI priorities may work on a global scale 
for other AI code, they do not work for the CM code since they do not 
have the right scale.

Introducing new values pplayer->ai.cm_priority_*, to be updated at the 
same place as the current values, is one solution.  Another is to change 
the current values to be on the scale to be used by CM.

In either case these values should probably not be used for human 
players.  A new AI function ai_adjust_workers() would be appropriate to 
keep this "intelligent" AI code out of the server/ code.

jason




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