Complete.Org: Mailing Lists: Archives: freeciv-ai: August 2002:
[freeciv-ai] cleanup of AI move and attack handling (PR#1803)
Home

[freeciv-ai] cleanup of AI move and attack handling (PR#1803)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>, <freeciv-ai@xxxxxxxxxxx>
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [freeciv-ai] cleanup of AI move and attack handling (PR#1803)
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Wed, 7 Aug 2002 01:39:32 +0000 (GMT)

On Wed, 24 Jul 2002, Raimar Falke wrote:
> On Sun, Jul 21, 2002 at 04:57:10PM -0700, Per I. Mathisen wrote:
> > This is a rather big cleanup of unit movement handling. It
>
> >- moves a lot of ugly AI code out of general server code
>
> This is good. Can you make a patch which only does this?

Yes. Patch attached. AI people, please take a close look at this, in
particular the extra sanity forced on bodyguards.

> >- changes barbarians so that they can move over huts, but
> >  they will not scoop them up. so you can attack a barbarian
> >  and be surprised to find that you also stumbled into a hut.
> >  I think this is a fair price to pay for generalising away
> >  a rather nasty barbarian exception, which would halt its
> >  gotos without any advance warning.
>
> The reason you give (rather nasty barbarian exception) isn't valid if
> part point above is implemented.

I don't understand what you are saying here. The point above refered to
the AI, but this doesn't really have anything to do with AIs (in theory,
humans can be barbarians too).

Actually I wish to remove the exception completely, there is no reason why
barbs shouldn't trigger huts. They shouldn't hunt for huts, but that is an
AI issue, not something to hardwire in the server. Is this a civ2 thing?

> >- changes what happens when diplomats and caravans move into
> >  a city or unit. there used to be lots of exceptions for these
> >  units in the lowest level movement code, these have all but one
> >  been moved into the client.
>
> I'm not sure if a more smarter client is what we want in this case. In
> any case the code should be moved from client/control.c into common/
> or client/*_common so that it can be used by other code.

I am pretty sure I don't like the way all kinds of functionality is
stuffed together in one operation like now. Ideally there should be a
separate attack request and move request, but I don't want to go that far,
at least not now (the issue: due to lag, we may unintentionally issue a
move order that becomes an attack order in the server, or vica versa).

By making the client smarter here, we allow for some more customization
and player control over default actions. I don't think this should be put
in common/, and I don't see the difference between putting it in control.c
and client/*_common.

> >- the one remaining exception: a diplomat that moves into an
> >  allied city whose owner mysteriously has lost his embassy (this
> >  can only happen because of Marco Polo's, i think). in this case,
> >  we automatically establish an embassy.
>
> >  i intend to fix this differently later (treaties should be broken
> >  if you lose your embassy with your treaty partner).
>
> IMHO we should do this before and not after.

Ok.

> >- i have added a new server feature: autodiplomats. this is simply a new

> I can bake an agent which does this. Client based and faster than the
> human defender.

But will it be faster than the human's autoattack client?

Yours
Per

Attachment: aionlymoveclean.diff
Description: Text document


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