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]
Subject: [Freeciv-Dev] Re: (PR#12851) ai_calc_irrigate
From: "Brian Dunstan" <bdunstan149@xxxxxxxxx>
Date: Tue, 19 Apr 2005 20:46:05 -0700
Reply-to: bugs@xxxxxxxxxxx

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


> > 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

Well we could do something that gets a better result
90% of the time, i.e., a few hints, precomputed from
the ruleset, about sequences that might be desirable
for a particular terrain type.  Maybe you would only
have one hint per terrain type, so along with
pcity->ai.detox[], you could have
pcity->ai.multistep[], or soemthing like that.  The
payoff could would be similar to the other ai_calc_*
functions:

goodness_before = city_tile_value();

apply_activity_1();
apply_activity_2();
apply_activity_3();

goodness_after = city_tile_value();


When considering which worker activity to use, a
multistep one would have a time to completion and
payoff just like any other.  It would be possible to
decide whether it is better to, say, cut down a
forest, irrigate it, and build a road, or whether it
is better do build a mine or clean pollution
elsewhere.




-Brian


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 





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