[freeciv-ai] Re: [Freeciv-Dev] autoattack
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Mon, 2 Sep 2002, Per I. Mathisen wrote:
> 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.
I mean proper path-finding with sensible horizon.
> > 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).
I especially like this:
- int id;
+ int id = punit->id;
- id = punit->id;
+ assert(punit);
:)))
Anyway, it seems to make sense. It will probably break a lot of things
but then we hunt em down.
> Then fstk can be replaced by code which only cares about invasions - doing
> them and dealing with them.
Yep.
G.
- [freeciv-ai] Re: [Freeciv-Dev] autoattack, Gregory Berkolaiko, 2002/09/02
- [freeciv-ai] Re: [Freeciv-Dev] autoattack, Per I. Mathisen, 2002/09/02
- [freeciv-ai] Re: [Freeciv-Dev] autoattack,
Gregory Berkolaiko <=
- [freeciv-ai] [Patch] AI can fly v3, Gregory Berkolaiko, 2002/09/03
- [freeciv-ai] Re: [Patch] AI can fly v3, Per I. Mathisen, 2002/09/03
- [freeciv-ai] Re: [Patch] AI can fly v3, Gregory Berkolaiko, 2002/09/04
- [freeciv-ai] [Patch] AI can fly v4, Gregory Berkolaiko, 2002/09/04
- [freeciv-ai] Re: [Patch] AI can fly v4, Gregory Berkolaiko, 2002/09/04
|
|