Complete.Org: Mailing Lists: Archives: freeciv-ai: September 2002:
[freeciv-ai] Re: [Freeciv-Dev] autoattack

[freeciv-ai] Re: [Freeciv-Dev] autoattack

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>
Cc: Freeciv AI development <freeciv-ai@xxxxxxxxxxx>
Subject: [freeciv-ai] Re: [Freeciv-Dev] autoattack
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Mon, 2 Sep 2002 16:07:58 +0000 (GMT)

On Mon, 2 Sep 2002, Gregory Berkolaiko wrote:
> It's crap, yeah and AI doesn't use it but it should and it could be made
> better when we have path finding (and it wouldn't be a CPU killer then).

It already uses path finding.

> Now speaking about the AI, I think there should be two major attack modes,
> invasion and autoattack (preventive defence).Idiotic junk like f_s_t_k
> and k_s_w should die instead.

I agree.

Take a look at this patch. It cleans up the military attack function and
introduces a new one, ai_military_rampage(), which wraps findvictim.
Previously, a lot of code didn't loop findvictim, so that they would only
attack one adjacent unit. Now this happens automatically. We could improve
this further, to make it use path finding to do ranged attacks as well
(max range: as far as we can move, this is a one turn horizon function).

Then fstk can be replaced by code which only cares about invasions - doing
them and dealing with them.


"I don't see why people are so upset about cloning sheep. American
television networks have been doing that to their audiences for years."
-- Jello Biafra

Attachment: aimilatt2.diff
Description: Text document

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