Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: Comments on CMA 2.6
Home

[Freeciv-Dev] Re: Comments on CMA 2.6

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Cc: Christian Knoke <ChrisK@xxxxxxxx>, Freeciv Developers <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Comments on CMA 2.6
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 25 Oct 2001 19:44:57 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Thu, Oct 25, 2001 at 06:07:04PM +0100, Gregory Berkolaiko wrote:
>  --- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote: 
> >
> > Example with only two stats: food and shield. The city may provide the
> > following combinations (all surplus): (f=0,s=10), (f=2,s=7),
> > (f=11,s=2) and (f=12,s=-1). You now search the maximal sum of
> > sum=food_weight*food_surplus+shield_weight*shield_surplus.
> > 
> > food_weight shield_weight best_sum  best_combination
> >     1             1           13      (f=11,s=2)
> >     2             1           24      (f=12,s=-1)
> >     3             1           35      (f=11,s=2) or (f=12,s=-1)
> >     4             1           47      (f=12,s=-1)
> >    10             1           120     (f=12,s=-1)
> >     
> >     1             2           20      (f=0,s=10)
> >     1            10           100     (f=0,s=10)
> > 
> > Was this clear?
> 
> So you use a linear weight function.
> Some time ago I played with it on paper and found that it would almost
> always try to maximize one of the three parameters and would never go for
> some sort of balance.  Think about a city surrounded by forest and plains
> (it is plains that gives 2 food right?).
> 
> In order to apply your agent to AI we would need something balanced.  
> You might say "put a minimal value for two of the parameters and then
> maximize the third".  Minimal food is almost easy, it only relates to the
> growth you want.

The current interface doesn't support this. I'm also not sure what
kind of interface should be used. Suppose you have an interface which
can be set to "keep food surplus and shield surplus equal": if you
have now a city which yields:
 food surplus shield surplus
       10            10
        9            30

Which should be choosen? Which should be choosen if the 30 is a 60? 
Since I don't know an interface/model which let me express this I
can't code it.

> But to set minimal prod you need to know what are you losing: what
> is maximum possible prod.

This isn't a problem: set the minimal surpluses and set the weight of
some stat to 1000.

> We should think about how to reduce the number of possible settings
> while encompassing all really useful ones.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Are you saying that you actually used the Classpath Java AWT classes in 
  addition to the GTK peers and got them to display something?
  Wow.  That's way better than I did and I wrote the code!"
    -- Aaron M. Renn in the classpath mailing list


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