[Freeciv-Dev] (PR#6268) RFC: Clustering in Civil War
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
[cameron - Sun Sep 28 20:51:02 2003]:
> We need a good metric for determining the happiest/unhappiest
> city; does one exist? If not, please suggest something. Nothing I've
> thought of is sufficiently pleasing to me.
Hmph! I thought I read that whether cities joined the rebel cause was
determined by all kinds of factors, but looking at the source code it
appears it's just a coin toss (specifically, "myrand(2) == 1").
I can't tell what you've thought of, so I'll just suggest what makes
sense to me.
First, I would do all the happiness calculations BEFORE the loss of the
palace is registered; afterwards there may be a tremendous loss, as
corruption runs rampant.
I can think of two ways to rank happiness: absolute and relative. For
absolute happiness I would count the number of happy citizens and
subtract the number of unhappy citizens (absolute unhappiness would be
the negative of that). For relative happiness, I would divide the
number of happy citizens by the total number of citizens (relative
unhappiness would use unhappy/total).
It seems like there would be differences in how the game would act
depending on how happiness is calculated; I would recommend that any
such calculation be given its own function, so changing it would be
relatively straightforward.
--
++JohnWheeler
|
|