Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2005:
[Freeciv-Dev] Re: (PR#11995) Stupid AI Creates Tall Stacks
Home

[Freeciv-Dev] Re: (PR#11995) Stupid AI Creates Tall Stacks

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] Re: (PR#11995) Stupid AI Creates Tall Stacks
From: "Benedict Adamson" <badamson@xxxxxxxxxxx>
Date: Mon, 24 Jan 2005 12:29:22 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=11995 >

Per I. Mathisen wrote:
...
> the fix should be
> done in pf. Which is, unfortunately, as I understood it, non-trivial.
...

Detecting which tiles have dangerously large stacks is quick and easy 
using a movemap to find which enemies can attack the tile. That can be 
implemented in a PF is_pos_dangerous function. Then it is a simple 
matter of using that function in the PF for AI unit movement.

Unfortunately, the AI movement function, ai_unit_goto, uses a warmap 
(via do_unit_goto) rather than PF, so most of the work for this would be 
rewriting ai_unit_goto.

I'm thinking of fixing this problem as part of my improvements to the AI 
defence code, PR#10694. However, rewriting ai_unit_goto is only 
peripheral to the defence code itself, so I suggest rewriting 
ai_unit_goto and have that change reviewed and committed before 
implementing a fix to prevent tall stacks.

Any comments or advice? Has anyone tried to alter ai_unit_goto to use PF 
before?





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