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: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Cc: jdorje@xxxxxxxxxxxxxxxxxxxxx, Freeciv-Dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: auto settlers rework
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 24 Jan 2002 19:10:11 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Thu, Jan 24, 2002 at 05:20:26PM +0000, Gregory Berkolaiko wrote:
>  --- 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.

I created it by the little I know about the AI (benefit, MORT) and
some own thinking. It may be (too) easy but at least I understand it
fully.

> Linear value decrease for something that doesn't age is not a good
> model.

I don't understand this.

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

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  Tank: So what do you need? Besides a miracle.
  Neo: Guns. Lots of guns.
    -- From The Matrix


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