[Freeciv] Re: siege
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Sam Steingold <sds@xxxxxxx> writes:
> > For each square being considered, each friendly unit that can
> > reach the square must be compared to each enemy unit that can
> > reach the square.
>
> not really - the best offensive enemy unit has to be compares to the
> best defensive and the best offensive friendly unit. this is O(n
> log n)
But how do you determine the best defensive and offensive friendly
unit that can reach the tile, or the best offensive enemy unit that
can reach it, for that matter, without iterating over all of the
active units? And it's not just all of the ones that can reach the
tile, because to determine that you really have to iterate over *all*
of them.
And furthermore, the way you previously described the "all out war"
had unit after unit in simulated fights until all the units that could
reach the tile would be exhausted. I quote:
the probability is computed by applying the standard "Probability
101" formulas by playing out battles between the best units one by
one.
E.g.: suppose a coastal tile can be reached by one player's
"warrior" unit, and the enemy has a battleship and a cruiser at
distance 3 from the tile.
Suppose the probability of battleship winning against the warrior
is 0.9 and the probability of the cruiser is 0.8. Then tile
availability is 0.1*0.2 = 0.02 [not taking damage into account].
How is that only O(n log n) when you do it for every tile within the
work radius of every city in the game?
--
$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}}
split//,"ten.thgirb\@badanoj$/ --";$\=$ ;-> ();print$/
- [Freeciv] Re: siege, (continued)
[Freeciv] Re: siege, Sam Steingold, 2005/08/09
- [Freeciv] Re: siege, Peter Schaefer, 2005/08/09
- [Freeciv] Re: siege, Jonadab the Unsightly One, 2005/08/10
- [Freeciv] Re: siege, Sam Steingold, 2005/08/10
- [Freeciv] Re: siege, Jonadab the Unsightly One, 2005/08/12
- [Freeciv] Re: siege, Sam Steingold, 2005/08/12
- [Freeciv] Re: siege, Gaël Le Mignot, 2005/08/12
- [Freeciv] Re: siege, Sam Steingold, 2005/08/12
- [Freeciv] Re: siege,
Jonadab the Unsightly One <=
[Freeciv] Re: siege, Per Inge Mathisen, 2005/08/27
|
|