Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2000:
[Freeciv-Dev] autosettler patch (was: Multiple patches)
Home

[Freeciv-Dev] autosettler patch (was: Multiple patches)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] autosettler patch (was: Multiple patches)
From: Jeff Mallatt <jjm@xxxxxxxxxxxx>
Date: Mon, 29 May 2000 13:41:51 -0400

At 2000/05/25 21:30 , Robert Rendell wrote:
>
>autosettler.diff
>
>    As well as cleaning up auto_setter_findwork, this patch also causes
>    autosettlers to favour improving land that's currently in use by a
>    city, since that will return the most immediate benefit to the civ.

(Actually, the big change here is not making it harder to improve
non-worked squares, but rather easier.)

As far as cleaning-up, if we want to get rid of cut-and-paste code (a good
idea, I agree), let's *really* get rid of it.  I've attached an updated
patch that does this.

The "favour improving land that's currently in use" is done by replacing
    b = MAX((newv - oldv)*64, MORT);
with
    b = MAX((newv - oldv)*((in_use) ? 128:64), MORT);

The effect of this is *huge*.  It doesn't just alter _where_ infrastructure
improvements are made, it massively alters the _amount_ of infrastructure
improvement.  This *may* be a good thing (my gut likes it, but gut feelings
are often bad programming solutions), but it is the kind of change that
needs lots of play-testing.  (The down-side of this change is that there
are only so many resources to go around, and too much focus on
infrastructure improvement may weaken a civilization in the areas of city
improvements, military units, etc., etc...)

However, not having lots of time, I tried only a few permutations (and,
only with all-AI games):

- Original code.  Little infrastructure before 1 AD.

- Unmodified patch.  Massive infrastructure building, starting in 1900 BC.

- Patch with 128:64 changed to 64:32.  Almost the same behavior as the
original code.

- Patch with 128:64 changed to 96:48.  Yielded intermediate behavior.
(Though, it feels closer to 128:64.)

I believe the "96:48" is a big enough change for now -- let's see if the
game-player's find it easier or harder to beat the AI with this change first.

Attachment: autosettler-2.diff
Description: Text document

jjm

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