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

[freeciv-ai] 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: freeciv-dev@xxxxxxxxxxx
Cc: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] uploaded new versions of teams and massive AI patches
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Tue, 15 Oct 2002 22:04:06 +0000 (GMT)

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:


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
 - AI support for flying units, by Gregory Berkolaiko
 - AI hitpoints recovery patch, by Jordi Negrevernis i Font

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
 + 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
 + 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]