Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] [UPDATE] Corecleanup_08 patch to cvs-Sep28
Home

[Freeciv-Dev] [UPDATE] Corecleanup_08 patch to cvs-Sep28

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] [UPDATE] Corecleanup_08 patch to cvs-Sep28
From: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Date: Sun, 30 Sep 2001 18:28:50 -0400

This is the corecleanup_08.ReadMe from the recent upload to incoming
of the update to the corecleanup changes.
=====

This patch updates the corecleanup sets of changes to Sep 28, 2001.

In additional to the suggested fixes to corecleanup_07 and ongoing
updates to the current CVS, there is an extensive cleanup of the core
server AI code. It should now be more readable, correct and has been
updated to change the AI strategies in ways that move them from the 
existing xenophobic military despotism to those compatible with
higher forms of government.

Cheers,
RossW
=====

Some highlights:

1)  Smallpox city deployment is discouraged, and some of the existing
    AI practices that encouraged it removed (e.g. setting city search
    radius to 13 from 11 squares tends to mean that new cities can
    leapfrog existing ones, rather than being forced to the strip
    of land bewtween an initial 6-7 distant city and the current one.
    There is also a cosine weighting function that biases city
    founding want calculations for a 5 square period. And new cities
    do not count tiles already counted by existing friendly cities
    when calculating "best" locations".

2)  City founding want is enhanced for small civs, and long moves to
    choose the most optimal location discouraged when initial critical 
    growth is more important than longterm potential. Conversely, city
    founding is discouraged for higher forms of government that benefit 
    more from terrain improvements and vertical growth than despotic 
    expansion.

3)  City and unit defense has been updated to insure that units do
    not wander off to "find_something_to_kill()" and leave their
    homes undefended. Wounded units also break off battle and return
    to the nearest friendly city (with barracks if possible) to heal
    before returning to battle.

4)  Weights for Wonder development are significantly discouraged in
    the early stages before total civ production reaches a level where
    other critical improvements or unit development would be compromised.
    They get a boost after discovery of Trade when caravans can be used
    to speed wonder building.

5)  A number of unreasonably complicated (or purely bogus) algorithms
    for assigning and updating weights have been fixed.  Bogus want 
    calculations that resulted in "forced" building (i.e. values
    greater than 100) have been largely caught and sanitized. The
    copy_if_better_choice() and related functions currently check for
    unreasonable values (like stack addresses) and reject them. For
    the most part all updates are redirectly through these choke points.

6)  The general game time is roughly half of that in corecleanup_07 even 
    without the extensive use of macros for common functions. One or
    more civs have been known to reach or be on their way to Alpha
    Centauri in a little over 2 minutes CPU time (vs typical 4-6 and
    earlier 7-11 in corecleanup_07).

7)  Civs do far less flipflopping in build and science choices, as the
    current build want is bumped once building starts. Only critical
    changes or appearance of a significantly improved choice will see
    the current build target change. This saves a lot of resource
    waste,

8)  The core runs completely in the rotationally based direction system
    while the original array order system is largely left untouched in 
    the client/GUI code. 

9)  This code runs any of the 4 rectangular wrap topologies: FlatEarth
    Standard (wrapped in x), alt-Standard (wrapped in y) or DonutWorld.
    The choice can be set using the maptype parameter from the console.

10) Improved map generation for all mapgenerators and starting location
    deployment is also included with the replacement mapgen. Thre are
    significant inland waterways that can be explored with the River
    patch, also included.

Known Issues

1)  There is a bug in the city dialog window, where "black tiles" are
    nolonger filled in for the diagonal 2 tiles or those not iterated
    in the city loops. The isometric code to pre-fill the background
    to black, seems to result in it turing white or other colours
    under various circumstances. This bug is not specific to this
    patch though.

2)  Civs do not understand Global Warming, and are ecological pigs.

3)  There is only one "expand" parameter that is really builtin to the
    Civ strategy. For the most part they will pursue a "Production"
    oriented Republic growth pattern once they break out of despotic
    mode. They for example do not understand how to change a losing
    strategy in response to game evolution.

4)  Civ strategy is a largely reactive and uncoordinated local response
    by units and cities. There are some general "weights" built into 
    the response functions, but for the most part these are hardcoded
    generic tendencies, and not adjustable strategic influences.

5)  The code is overly diffused to too many different locations. There
    are often many ways and places where similar things are evaluated
    and actions taken making it difficult to really control a units
    actions (for instance).

6)  The AI runtime interface to the system is by procedure call from the
    core game loops. This should be changed to trigger AI actions and 
    responses off the same packet streams that are used by network clients
    except that the stream adapter would be connected directly to the
    local inputs rather than a network socket.


Subject:  [Update] Corecleanup_08 patch
Date:     Sep 28, 2001
Author:   Ross Wetmore
Status:   Tested, fully functional and playable
State:    Development snapshot

Description
  This patch upgrades the corecleanup_07 patch set to CVS-Sep-28, plus
adds significant improvements to the core server AI codebase.

Dependencies
  none

Recommended Use
  Apply the patch to a clean Sep 28 CVS snapshot in an alternate build
location. `sh configure` and `make` to build. Run either server autogame
or autogame with one or more client observers to get a feel for the
system changes. Compare code with current CVS using side-by-side editors
or side-by-side diff program (that ignores whitespace if possible). 

Files Changed:

freeciv/ai/advdomestic.c:
freeciv/ai/advmilitary.c:
freeciv/ai/aicity.c:
freeciv/ai/aihand.c:
freeciv/ai/aitech.c:
freeciv/ai/aitools.c:
freeciv/ai/aitools.h:
freeciv/ai/aiunit.c:
freeciv/client/climisc.c:
freeciv/client/control.c:
freeciv/client/goto.c:
freeciv/client/gui-gtk/citydlg.c:
freeciv/client/gui-gtk/mapview.c:
freeciv/client/gui-mui/graphics.c:
freeciv/client/gui-mui/mapclass.c:
freeciv/client/gui-mui/mapview.c:
freeciv/client/gui-mui/overviewclass.c:
freeciv/client/gui-win32/mapview.c:
freeciv/client/gui-xaw/mapctrl.c:
freeciv/client/gui-xaw/mapview.c:
freeciv/client/packhand.c:
freeciv/client/tilespec.c:
freeciv/client/tilespec.h:
freeciv/common/city.c:
freeciv/common/city.h:
freeciv/common/game.c:
freeciv/common/map.c:
freeciv/common/map.h:
freeciv/common/packets.c:
freeciv/common/player.c:
freeciv/common/unit.c:
freeciv/server/autoattack.c:
freeciv/server/citytools.c:
freeciv/server/cityturn.c:
freeciv/server/gamehand.c:
freeciv/server/gotohand.c:
freeciv/server/mapgen.c:
freeciv/server/mapgen.h:
freeciv/server/maphand.c:
freeciv/server/sanitycheck.c:
freeciv/server/savegame.c:
freeciv/server/sernet.c:
freeciv/server/settlers.c:
freeciv/server/srv_main.c:
freeciv/server/stdinhand.c:
freeciv/server/unithand.c:
freeciv/server/unittools.c:
=====



[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] [UPDATE] Corecleanup_08 patch to cvs-Sep28, Ross W. Wetmore <=