Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2004:
[Freeciv-Dev] Re: (PR#10036) stupid autosettlers won't irrigate
Home

[Freeciv-Dev] Re: (PR#10036) stupid autosettlers won't irrigate

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#10036) stupid autosettlers won't irrigate
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 10 Sep 2004 19:29:01 -0700
Reply-to: rt@xxxxxxxxxxx

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

Jason Short wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=10036 >
> 
> My autosettlers in most cases refused to do irrigation on plains.  They 
> usually prefer to mine them instead.

Here is an example of the problem.

--- One ---

Mining a desert gives +1 production.  Transforming a desert gives +1 
food.  But transforming takes much longer, so in most cases mining wins 
out.  This depends heavily on the weightings given to food versus 
production, which comes from some black-box AI code that I don't know 
about (and is probably the reason it doesn't work right now).  But even 
so there is something wrong here.  The main issue is that since we only 
look one step into the future there is no way to tell the plains are better.

--- Two ---

There's a slightly different variation in this example:

   Terrain A: goodness 10
   Terrain B: goodness 5
   Terrain C: goodness 8

it takes a long time to change between terrain B and terrain A.  It 
takes a short time to change between terrain B and terrain C.  So if we 
start with terrain B the obvious move (accounting for ammortization) is 
to go to terrain C.  Once we're at terrain C we can look and see that we 
have a 2-step move to get to terrain A, and start this.  However once we 
get to terrain B we're now back at the original situation, and end up 
going back to terrain C again.

This doesn't happen in the current code since we don't look at two-step 
moves (except for road+rail).  But it is a pitfall to be avoided.  It 
seems logically inconsistent, and that's because the C->A calculation is 
incorrect - it doesn't account for the extra turns we spend stuck at 
terrain B.  If it did then then it would give a negative goodness for 
the C->A transformation and we'd never do it.

Of course workers should think of the long term.  We want to migrate 
toward terrain A.

--- Three ---

There is a possibility that at some point with the current code a 
settler will transform swamp to ocean.

--- Four ---

When considering a single tile, the autosettler should only consider the 
activity (or activity sequence) that results in the best output - no 
ammortization should be done.  However when comparing the results 
between tiles ammortization should be done.  In an ideal world desert 
will never be mined if it can instead be transformed.  But the worker 
may choose to work on some other tile rather than embarking on the long 
process of transforming the desert.

--- Five ---

All of this is complicated because there is no single "best" output.  It 
depends on the weightings given to the city.  And since these weightings 
probably depend on what tiles are currently available to the 
city...there is a problem.

--- Six ---

None of this explains why current autosettlers refuse to irrigate. 
Irrigation has a very low time and gives good results.  But it might be 
explained if the AI weightings are screwy.

jason




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#10036) stupid autosettlers won't irrigate, Jason Short <=