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: jdorje@xxxxxxxxxxxxxxxxxxxxx
Cc: freeciv-dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Comments on CMA 2.6
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 24 Oct 2001 18:55:44 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Wed, Oct 24, 2001 at 12:14:39PM -0400, Jason Dorje Short wrote:
> Raimar Falke wrote:
> > 
> > On Wed, Oct 24, 2001 at 03:35:44AM -0700, Raahul Kumar wrote:
> > >
> > > --- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> > >
> > >
> > >
> > > > > > No why should it? Which one should CMA use if you have two
> > > > > > combinations which only differ in food. It chooses the one with the
> > > > > > bigger food value.
> > > > >
> > > > > You won't like the answer: It should choose the one with the lower
> > > > > value and leave the better tile for another city.
> > > >
> > >
> > > I must have been asleep. Why should the CMA leave the better tile for 
> > > another
> > > city? At this stage we do not know if there is even another city. If I 
> > > missing
> > > some prior details set me straight.
> > 
> > Consider this case: the user wants that food isn't considered and two
> > combinations exists which each yield the same amount of the stats
> > except food. Then the CMA would choose the combination which would
> > yield less food because this increase the chance that this combination
> > doesn't allocate a good food producing tile (which them may used by
> > another city).
> 
> This is a classic operations research problem.  Once you get the weights and
> minimum values for each resource, the algorithm to choose one should be
> simple.
> 
> If a weight of zero is chosen, it should be assumed the user doesn't care
> what happens to this tile.  The elegant way to avoid consuming a resource is
> to make its weight negative.  You can still set the minimum value for that
> resource (to 0 or 2, depending on the situation) to guarantee that you have
> enough.  As far as the sliders go, this should be a new setting "avoid this
> resource" or something like that.
> 
> Another way to simulate this is to subtract some small value, say 1/10, from
> each weight before computing.  If say w=10*w-1 for each weight, then you'll
> introduce a small "avoidance" factor that will have the same effects.  This
> may be done by the GUI code before passing the weights in or by the core
> code after it receives the weights (the first would be preferable IMO).

My idea was as follow:

compare two solutions:
 if the "primary" (simple sum of the weight-surplus-product) fitness differ be 
fine
 else
   for each stat:
      if weight == 0 and surplus from solution1 < surplus from solution2:
         favor solution1

This idea breaks if there are is more than zero weight stat.

So if your idea is used we don't have zero weights anymore but weights
which are less than zero (in addition to weights >0). No problem from
my side.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  This message has been ROT-13 encrypted twice for extra security.


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