Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2002:
[Freeciv-Dev] Re: auto settlers rework
Home

[Freeciv-Dev] Re: auto settlers rework

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxx, Freeciv-Dev <freeciv-dev@xxxxxxxxxxx>, Raimar Falke <rf13@xxxxxxxxxxxxxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: auto settlers rework
From: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Date: Thu, 24 Jan 2002 17:20:26 +0000 (GMT)

 --- Jason Short <vze2zq63@xxxxxxxxxxx> wrote: 
> Raimar Falke wrote:
> 
> > 
> > The only way AFAIK is to increase the time horizon of the
> > calculation. The current server auto-settler code is based on 24
> > turns
> > (the famous MORT constant). This means that the action which would
> > yield the most benefit in the next 24 turns is considered.
> > 
> > Example:
> >  build a rail at the current tile:
> >    - time to move to the target: 0 turns
> >    - time to create the improvement: 3 turns
> >    - benefit per turn: 1 trade
> >    - number of effective turns: 24-0-3=21
> >    - total benefit: 21*1 trade=21 trades
> > 
> >  build a mine some distance away:
> >    - time to move to the target: 10 turns
> >    - time to create the improvement: 10 turns
> >    - benefit per turn: 3 shields
> >    - number of effective turns: 24-10-10=4
> >    - total benefit: 4*3 shield=12 shields
> > 
> > So the total benefit of the second will increase with a larger time
> > horizon.

Excuse me, where did you get this formula?  Syela might be a messy
programmer, but he usually had better (or at least more complicated)
ideas than that.  Linear value decrease for something that doesn't age is
not a good model.


> The ideal benefit calculation would calculate all the benefit over all 
> the possible choices of work the settlers could do: i.e.

I'm not sure this is a good value-for-CPUtime choice.

The current implementation (if you really understand it, which is
problematic) contains enough parameters to allow you to choose actions
maybe not 100% optimal but good enough to sustain good progress.


Best,
G.

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com


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