Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2005:
[Freeciv-Dev] Re: (PR#12851) ai_calc_irrigate
Home

[Freeciv-Dev] Re: (PR#12851) ai_calc_irrigate

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: bdunstan149@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#12851) ai_calc_irrigate
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 19 Apr 2005 19:11:00 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12851 >

Brian Dunstan wrote:
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=12851 >
> 
> ai_calc_irrigate finds the benefit of a worker
> performing an irrigation activity by looking at the
> value of the tile before an after activity.  This
> sounds like common sense, but it misses something: 
> often, the best way to improve a square will be with
> several activities, in order, with the full benefity
> not being realized until the last step.  If the AI
> only looks one step ahead, it will miss this.  For
> example, a a forest might be best used by turning into
> a plain with irrigation and a road.  If this is os,
> these are the steps:
> 
> 1. Forest (irrigate) -> Plains
> 2. Plains (irrigate) -> irrigated plains
> 3. Irrigated plains (roat) -> plains, road, irrigation
> 
> However, if you just did step 1., it would make no
> sense.  You lose 1 shield production, and gain nothing
> in return.
> 
> Shouldn't the AI base its decision on the value of the
> square when fully improved, taking into account how
> long it will take to improve it fully?

Sure.  It already does this for road+railroad, but for all other actions
it only considers single actions not multiple sequences.  Note that the
complexity (time) increases exponentially the deeper you look.

An alternative is to tell in the ruleset what it's best to upgrade each
terrain to.  Or to give an ordered list of which upgrades are best
(e.g., for desert it is irrigate, road, transform).  However in this
case it's hard to do comparisons across upgrades - should we build an
irrigation on a desert or a mine on a hill first?

-jason





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