Complete.Org: Mailing Lists: Archives: freeciv-ai: April 2003:
[freeciv-ai] Re: New settler code
Home

[freeciv-ai] Re: New settler code

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Per I. Mathisen" <per@xxxxxxxxxxx>
Cc: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Re: New settler code
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Mon, 7 Apr 2003 09:39:06 +0200

On Mon, Apr 07, 2003 at 02:01:32AM +0000, Per I. Mathisen wrote:
> An open question is if we shouldn't also clean up the terrain improvement
> code while we're at it. At present, I just kludge in the current code. But
> this can be done later. Big patches are bad.

IMHO you have to support both (add/building a city and terrain
improvements) at some point. However I don't see any infrastructure
for it. But I agree that this is a chicken-and-egg problem because of
big patches.

>  -> Compared to the old settlers code in getting the job done I think it
> is about twice as good. Equal starting conditions, and new code
> outproduces old code 2x. It is a bit hard to compare, tho, since my code
> doesn't have ferries yet, and old code uses ferries all the time.

You know what comes now? ;) Metrics. It should be easy to provide some
numbers. Make a big continent to exclude the influence of the ferries.

And another point I raised in the past: don't hardcode values.

>   cache->total += cache->total * defense_bonus / 4000;

Why 4000?

>   /* Adjust for ocean adjacency, which is nice, by 20% */

Why 20%?

>   cache->total += (cache->remaining / 8);

Why /8?

Since you probably can't answer these you should IMHO make these
variables or at least constants. Take a look at PF in this aspect.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  What's nice about GUI is that you see what you manipulate.
  What's bad about GUI is that you can only manipulate what you see.



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