Complete.Org: Mailing Lists: Archives: freeciv-ai: November 2002:
[freeciv-ai] Re: ripped out active diplomats patch...
Home

[freeciv-ai] Re: ripped out active diplomats patch...

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Re: ripped out active diplomats patch...
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Sat, 16 Nov 2002 15:40:27 +0000 (GMT)

On Thu, 14 Nov 2002, Gregory Berkolaiko wrote:
> 5(**) In the same function, why you don't change for
> already_considered_for_diplomat field?Or is it only to prevent building
> too many diplomats?

Yes. It is not reset before we come here, so using it would be bad. Not
sure where/when we can safely reset it, either. Not a big problem,
generally. This is a more generally issue, really.

>       /* Check if we can achieve something... */
>       if (punit->moves_left <= 0) {
>         return; /* ... no */
>       }
>       if (real_distance_to_target(punit) == 1) {
>         ai_unit_new_role(punit, AIUNIT_NONE, -1, -1);
>         ai_diplomat_city(punit, ctarget);
>       }
> What if the role was DEFEND_HOME?

What if? This code won't be used if so. Problem?

Rest fixed.

+ Added some missing code. If you ran the code I sent, you would be
running old diplomats code...

+ Remove code which made diplomat stay and defend if general urgency...
this didn't work well... diplomat sat idle while attackers descended (by
boat, by faster means, from another city, etc) on the city and whacked our
ass... better to go on attack.

+ Fixed find city to defend code, now will split up and defend multiple
cities rather than all go to same city.

- We usually don't have enough cash to incite in the beginning of the
game. But I am reluctant to raise taxes or increase reserves, since it is
too easy to get the AI into "perpetual taxmen mode" this way.

New version attached.

  - Per

Attachment: non_massive_aidip2.diff
Description: Text document

Attachment: aidiplomat.c
Description: Text document

Attachment: aidiplomat.h
Description: Text document


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