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: freeciv-dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Comments on CMA 2.6
From: Jason Dorje Short <vze2zq63@xxxxxxxxxxx>
Date: Wed, 24 Oct 2001 12:14:39 -0400
Reply-to: jdorje@xxxxxxxxxxxx

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

jason


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