Complete.Org: Mailing Lists: Archives: freeciv-ai: October 2002:
[freeciv-ai] Re: uploaded new versions of teams and massive AI patches
Home

[freeciv-ai] Re: uploaded new versions of teams and massive AI patches

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Per I. Mathisen" <per@xxxxxxxxxxx>
Cc: Freeciv AI development <freeciv-ai@xxxxxxxxxxx>
Subject: [freeciv-ai] Re: uploaded new versions of teams and massive AI patches
From: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Wed, 16 Oct 2002 17:51:07 +0100 (BST)

Qs and Cs:

1. What sort of warnings did you get in flying AI?  Did you have more -Ws 
than usual?
2. There was a bug in path-finding for flying units, I fixed it in my 
version, I'll update it and post it.
3. If you are thinking about commiting massive AI as a whole, than it's 
better to do it before it reaches gargantuan proportions.  I am sure there 
are zounds of bugs in it already :(
4. Active AI diplomats patch was written by you, mine were only few 
comments.
5. valid_goto is a bad name if the function returns bool (I am assuming it 
does): has_valid_goto or even better is_on_valid_goto (you can guess I am 
a secret fan of Hungarian notation).

Best,
G.

On Tue, 15 Oct 2002, Per I. Mathisen wrote:

> I've uploaded to freeciv incoming new versions of the teams patch and the
> massive AI patch. The former is only a cvs update, the latter has
> significant changes.
> 
> >From my patch notes:
> 
> ** EXPERIMENTAL VERSION **
> 
> Changes from previous version denoted by +, old changes by -
> 
> This is a diff of my AI development tree. It contains the following:
>  - A final cleanup of the bodyguard code, by myself
>  - Active AI diplomats, by myself and Gregory Berkolaiko
>    <Gregory.Berkolaiko@xxxxxxxxxxxx>
>  - AI support for flying units, by Gregory Berkolaiko
>    <Gregory.Berkolaiko@xxxxxxxxxxxx>
>  - AI hitpoints recovery patch, by Jordi Negrevernis i Font
>    <jorneg@xxxxxxxxxxx>
> 
> It also contains a number of other cleanups throughout the code:
>  - Fixed a number of compile warnings in flying AI code.
>  - Change defaults for coinage, courthouse, wall, SAM and coastal.
>    Now coinage is TRADE_WEIGHTING want only, a kind of fallback.
>    SAM trumps coinage, wall trumps SAM and coinage, while coastal
>    trump them all three, and all just barely. Courthouse now
>    doesn't calculate with a value where corruption has been
>    deducted (assume continued existence of problem you solve,
>    very bad).
>  - Fixed bug whereas distances were thought 3x the real length
>    because we now use warmaps.
>  - Stop requiring barracks for offensive diplomats.
>  - AI will now rather build Lighthouse or United Nations instead
>    of more coinage
>  - Don't bribe units that aren't a threat unless we have lots
>    and lots gold, and even then don't bribe settlers
>  - Medium difficulty AI won't use diplomats
>  - Diplomats now stay and defend at urgency, not grave danger
>  + Removed inconsistent pcity->ai.ai_role which wasn't even used
>  + Renamed HAS_GOTO() to valid_goto()
>  + Started rewriting the activity and goto handling, hiding them
>    behind sane wrappers. the problem with that is that some of the
>    use of this code isn't sane... changes restricted to aitools and
>    aiunit. These changes are a lead up to my rewriting of the
>    ferry code.
>  + Cleaned up stay_and_defend() (renamed), first part of fstk,
>    and is_my_turn()
> 
> Intended activity and goto cleanup:
>  + ACTIVITY_GOTO will be removed, do not use. Instead, check for
>    valid_goto(punit)
>  + A unit should *never* have a valid goto unless it is on its
>    way somewhere by goto
>  + Never call do_unit_goto() directly; this function will be
>    rewritten later when we have new path finding
>  + Never set a unit to ACTIVITY_IDLE directly; this will be done
>    by lower-level code only when really necessary (to preserve
>    fortification)
>  + Never set a unit to ACTIVITY_FORT* directly; this will be
>    handled automatically on unit management end
>  + ai_unit_goto(punit, x, y) will *preserve* previous goto
>    coordinates; use this only for one-turn-horizon gotos
>    (only air units and diplomats use different gotos ATM)
>  + Use ai_unit_gothere(punit) for long-distance gotos; this
>    will be used for ferrying, and eventually should replace
>    both ai_military_gothere() and the settler gothere.
>    *Always* set destination with ai_unit_set_destination(punit, x, y)
>    first when you do this.
>  + Note that you can use ai_unit_goto() while on a ai_unit_gothere()
>    mission, and the gothere() destination will be preserved
> 
> 
> 
> 



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