Complete.Org: Mailing Lists: Archives: freeciv-ai: December 2002:
[freeciv-ai] Re: (PR#2477) Improved Auto-Explore
Home

[freeciv-ai] Re: (PR#2477) Improved Auto-Explore

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: cameron@xxxxxxxxxx
Cc: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Re: (PR#2477) Improved Auto-Explore
From: "Gregory Berkolaiko via RT" <rt@xxxxxxxxxxxxxx>
Date: Thu, 19 Dec 2002 16:08:14 -0800
Reply-to: rt@xxxxxxxxxxxxxx

Cameron,

Quoting Gregory Berkolaiko via RT <rt@xxxxxxxxxxxxxx>:

> Quoting Cameron Morland via RT <rt@xxxxxxxxxxxxxx>:
> 
> > On Thu, Dec 19, 2002 at 03:15:16PM +0000, Gregory Berkolaiko wrote:
> > > or different?  Can't base score be just added to both land_ and ocean_ 
> > > scores?
> > 
> 
> Understood.  You still haven't answered my second question though.

Well, I just changed the code without waiting for the answer.  Attached is my
result.  Most notable changes:

1. I decided that distance 3 from a friendly city is not good enough.  We want
our own, we don't give a damn about our allies.

2. As you can see I prefer ( ? : ) operator to if-else.

3. Instead of pow I re-use amortize.  The multiplier of 5 reproduces your 0.8
weighting: (23/24)^5 = 0.81.  Amortize is better because it's (a) faster and (b)
can be made even faster.

4. Conerted consts to defines and some other style issues.

Please feel free to criticize :(


All others: I intend to commit this patch soon (when Cameron blesses my changes,
basically).  So comment now or...

G.

Attachment: explorer9.diff
Description: explorer9.diff


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