Complete.Org: Mailing Lists: Archives: freeciv: August 2005:
[Freeciv] Re: siege
Home

[Freeciv] Re: siege

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv@xxxxxxxxxxx
Subject: [Freeciv] Re: siege
From: Sam Steingold <sds@xxxxxxx>
Date: Wed, 10 Aug 2005 12:47:03 -0400
Reply-to: sds@xxxxxxx

> * Jonadab the Unsightly One <wbanqno-IrLFYxOktEFfGaWA9+OTKt@xxxxxxxxxxxxxxxx> 
> [2005-08-10 12:08:34 -0400]:
>
> Sam Steingold <sds@xxxxxxx> writes:
>
>> for each tile and player, define "tile availability" to be a number
>> from 0 to 1, and use it to determine the actual benefit derived from
>> working the tile by multiplying it by the nominal benefit (food,
>> trade &c) and rounding appropriately.
>> 
>> tile availability is defined as follows:
>
> [by an O(n^2) algorithm if I understand it correctly, where n is the
> number of units that can reach any of the city's tiles in one turn,
> which with railroads could easily be dozens of units, potentially
> thousands on a large map]
>
> That might have an adverse impact on performance, since it has to be
> calculated each turn for each city.

why is it quadratic?
we apply units one by one.

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.mideasttruth.com/> <http://www.iris.org.il> <http://ffii.org/>
<http://www.jihadwatch.org/> <http://www.palestinefacts.org/>
Linux: Telling Microsoft where to go since 1991.




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