Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2005:
[Freeciv-Dev] Re: (PR#12735) posting patches
Home

[Freeciv-Dev] Re: (PR#12735) posting patches

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] Re: (PR#12735) posting patches
From: "Brian Dunstan" <bdunstan149@xxxxxxxxx>
Date: Wed, 6 Apr 2005 21:04:33 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12735 >

--- Jason Short <jdorje@xxxxxxxxxxxxxxxxxxxxx> wrote:
> 
> <URL:
> http://bugs.freeciv.org/Ticket/Display.html?id=12735
> >
> 
> Brian Dunstan wrote:
> > <URL:
> http://bugs.freeciv.org/Ticket/Display.html?id=12735
> >
> > 
> > Is it acceptable to post suggested patches
> relative to
> > the 2.0.0-rc1 code?
> 
> Any new feature requests probably aren't going to go
> into 2.0.  So they 
> will have to be written for the development version,
> at least before 
> they can be committed.  2.0 provides a stable base
> of code, so if you're 
> going to spend some time making your patch you may
> want to target it for 
> 2.0 then update it later.  This really depends on
> what code you're 
> touching though; some parts of the code have changed
> greatly since 2.0 
> and anything you write for it will basically have to
> be rewritten.
> 
> -jason

OK, the patch I had in mind adds a new AI level
('expert', AI level 8), and has economic management
that mimics that of a largepox human player.  It
quickly builds, and adequately defends, a moderate
number of size-20+ cities on a continent.   This is
done by giving each resource (shields, bulbs, etc.) in
the game a price, which varies with time, and from
city to city.  This gives the relative value of these
resources; their value at different points in time is
given by an interest rate which moves with time.  By
using these prices as an intermediary, this largepox
ai is able to match resources with possible projects
(rapture, research, city improvements, etc) in a way
that creates rapid growth.  On an island map, it will
defeat any number of 'hard' ai opponents.  It may be
useful to use this AI as a stand-in for human players
with a perfectionist, pacifist playing style.

95% of the code is in four new .c/.h file pairs in the
ai/ directory.  Since it is a large patch, it may take
some high level discussion before trying to integrate
it, and I am not sure if this is the correct forum for
that discussion.

One thing that I am not sure is acceptable is that I
have added a number of additional fields in the
player_ai and ai_city structs (player.h, city.h).  I
am looking through the latest CVS now with the
intention of reworking my patch, but am curious to
hear any feedback on what I have written so far.  I am
attaching the gzip-ed diff relative to the 2.0-rc1
code (for imformational purposes).

Brian

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Attachment: freeciv-2.0.0-rc1-ailargepox.diff.gz
Description: GNU Zip compressed data


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