Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:
[Freeciv-Dev] Re: non-smallpox idea

[Freeciv-Dev] Re: non-smallpox idea

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx (Freeciv developers)
Subject: [Freeciv-Dev] Re: non-smallpox idea
From: Reinier Post <rp@xxxxxxxxxx>
Date: Sun, 25 Nov 2001 00:20:17 +0100

On Fri, Nov 23, 2001 at 10:42:04PM -0500, Mike Jing wrote:
> Reinier Post <rp@xxxxxxxxxx> wrote:
> >
> > > The simple one is the corruption distance fall off of city science under
> > > despotism. In effect this means that whilst a smallpox player is
> > > guaranteed at least one science point from all their first 8 cities,
> >[...]
> >
> >I think this is a problem in itself and it's not hard to fix.
> >There's no basis for the roundoff to 1.
> The minimum of 1 trade left after corruption has been removed since 1.12.0.  
> However, the problem of roundoff still remains.  Say a city is suffering a 
> loss of trade of 93% to curruption, then it doesn't matter whether it is 
> producing 1 or 10 trade prior to corruption, it will have exactly 1 trade 
> left afterwards regardless.  This seems wrong to me as it clearly favors 
> smaller cities.

Yes, a normal roundoff would give it 0 trade (90% being higher than 50%).

Not only that, there is a precision error here iof the kind I was warned
against in high school.

We have a distance, which is typically in the range 1-32: a 5 bit value.
In computing the effect of this distance on corruption, we reduce it to
a 1 bit value, losing 4 bits of precision.  After a few more computations
we arrive at the final trade value for this city is the sum of these
values for all cities that is used, which is typically a 5 or 6 bit
value again.  But this addition also adds up the rounding error to the
same magnitude.  So the real problem is that the per-city intermediate
values, such as 'number of content citizens', 'trade points', etcetera,
should have more precision.  The lower precision causes the need for
cutoff values.  This means the user will need to remember a whole list
of cutoffs, e.g. the fact that the distance cutoff is 12, or the fact
that the first citizen in a city is no longer in exactly the 15th city
under democracy, or exactly the 12th under Monarchy (if I looked that
up correctly - the computation is more complicated).

So for a more playable game you'd want 5 or 6 bits more precision
and the more continuous effect of variables that this allows.

For 'realistic' simulation you need more.  A size 1 city is supposed
to have 10,000 inhabitants, so 'the first citizen' really stands for
5,000 people.  In order to be consistent with the listed population
numbers of cities, effects related to unhappiness should have about
16 bits of precision.

What justifies the low precision?

1) It speeds up computations.

  if (d > cutoff) c += 1

is faster than

  c += d/cutoff

The actual impact on game speed can be tested with the autogame feature.

2) It simplifies the user interface.

This is questionable.  It is not much harder to visualise 22.45% content
citizens than it is to visualise 2 out of 5 citizens being content.
It doesn't make the data harder to understand.  Making effects such as
distance continuous will make the game easier to understand.

3) It is how Civ I and II do it.

This only means the Civ I and II compatibility modes must support the
existing algorithms; the Freeciv mode can do it differently.

> Currently under Despotism, the 100% corruption distance is 12 (this is 
> map_distance, which is the sum of the distances in x and y direction, i.e. 
> diagnal is counted as 2).

Is this a bug?  Units can move diagonally, after all.

> As long as city stays within this distance from 
> the capital, it is guaranteed at least 1 trade (thus science), thus 
> corruption is never a problem for smallpox since the cities are rarely far 
> from each other, at least at the start.  Once you reach the Republic, 
> corruption is even less of a problem for smallpox, where the maximum is 
> capped at 53.7% (=36/67).

I don't want to know any of this when playing Freeciv.
Actually, I am a veteran player, and I didn't know.

> On the other hand, if you prefer not to use smallpox, you would place your 
> cities farther apart and grow them bigger, then corruption will become a 
> serious problem.  As I pointed out earlier, big cities lose a lot more to 
> curruption than smaller ones.  Under despotism, a distance of 6 from the 
> capital means 50% loss of trade.  This would seriously delay the discovery 
> of the Republic and haunt you for the rest of the game.

This can be addressed by correcting the roundoff.

> > > The easiest way i can think of to fix that is to also make the 
> >corruption
> > > fall off proportional to the number of cities in the empire. This would 
> >even
> > > things up between the two strategies, at least at the beginning of the
> > > game. If science output (under despotism), became 1 after 2 cities, and 
> >0
> > > after 8 cities, this would effectively maintain the current status quo.
> >
> >Looks like a good idea, but I don't see the 'realism'.
> "Realism" be damned, Sir!  We need game balance!  ;-)
> Mike

Well what i like about it is the word "proportional", but what I don't
like is the introduction of a new factor.  I'm sure it would already
help to make the existing factors, such as distance, more proportional,
as that is where the problem seems to be.


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