Complete.Org: Mailing Lists: Archives: freeciv-ai: December 2002:
[freeciv-ai] Re: RFC: Behaviour constants.

[freeciv-ai] Re: RFC: Behaviour constants.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>
Cc: Freeciv AI development <freeciv-ai@xxxxxxxxxxx>
Subject: [freeciv-ai] Re: RFC: Behaviour constants.
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Thu, 5 Dec 2002 00:10:42 +0100

On Wed, Dec 04, 2002 at 10:27:52PM +0000, Gregory Berkolaiko wrote:
> How can we improve AI without going too deep?
> This is a legitimate question, and an answer to it is given by various 
> constants and factors and multipliers that the AI code is peppered with.  
> Examples are: what is considered to be a small nation (number of cities) 
> -- used to encourage settler building; what is the default danger for 
> capital; what is food/shield weighting etc.
> Some of these numbers are defines, some are just plain numbers.  What I 
> propose is to collect them all in some .h file included in all AI files, 
> so they can be tweaked in a systematic way.  Then tweak them and run 
> pitfights, lots of them.  There ar, of course difficulties like "constant 
> is constant for all nations", but they are solvable.

I agree. But please think a step further and not make
 #define FOO 3
but use:
 int get_foo(void);

We made this error with UNIT_LOG and NORMAL_TILE_WIDTH. In the future
we may add parameters to the get_foo function.


 email: rf13@xxxxxxxxxxxxxxxxx
 "Many of my assistants were fans of Tolkien, who wrote 'Lord of the Rings'
  and a number of other children's stories for adults.  The first character
  alphabet that was programmed for my plotter was Elvish rather than Latin."
    -- from SAIs "life as a computer for a quarter of a century"

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