Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2000:
[Freeciv-Dev] Re: how to improve the AI's attack (was: old/bad code in a
Home

[Freeciv-Dev] Re: how to improve the AI's attack (was: old/bad code in a

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: how to improve the AI's attack (was: old/bad code in autoattack.c (PR#351))
From: "Peter Schaefer" <schaefer@xxxxxx>
Date: Wed, 3 May 2000 15:47:10 +0200


>On Tue, May 02, 2000 at 11:47:41PM +0200, Reinier Post wrote:
>>   + the AI has no sense of 2D space
>> 
>> When AI cities defend, *all* cities defend equally well, even those
>> that are 20 tiles from the enemy borderline.  In assessing the need
>> for defense, a flood fill algorithm should be used to determine the
>> proximity of enemies, under the assumption that it will be sufficient
>> to defend the borders.  In assessing the direction of expansion or
>> conquest, the same algorithm can be used to determine defensible
>> borders.  

Well I tried some code that changed the cities where the AI builds walls,
by adding my version of border detection, but it got awfully slow since my
code went in a double loop over all cities, making it O(cities) squared.
Not smart enough :-| .
We need a way for people to replace the AI with their custom AI, so people
can have fun working on it and compare it with the standard AI.




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