Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2001:
[Freeciv-Dev] Re: wrong defending unit (PR#854)
Home

[Freeciv-Dev] Re: wrong defending unit (PR#854)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Freeciv Developers <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: wrong defending unit (PR#854)
From: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxxxx>
Date: Mon, 23 Jul 2001 23:46:02 +0300 (IDT)

On Mon, 23 Jul 2001, Christian Knoke wrote:

> > > BTW i saw it sometimes take phalanx, sometimes settler,
> >
> > THAT should not happen! (unless phalanx is veteran or settler is ill)
> 
> It does! --> http://www.enter.de/~c.knoke/bugs/defense3.sav.gz
> 
> But I guess the reason here is, that the chariot is veteran 8-/

Indeed.  Veteran chariot has attack of 4.5 and it's just too much for
settlers and their healthy lifestyle ain't gonna help 'em no more:

settlers chance to survive = 0.1633
phalanx chance to survive  = 0.1861

which also shows how much more effective veterans are.

there is a way to tell which unit has bigger probability to survive
against an attacker without actually computing this probability.  the
key quantity is

   (hpa*p - hpd*(1 - p))/Sqrt[hpd*(1 - p)], 

where p = AttackPower/(AttackPower+DefencePower) and Sqrt is square root.
the lagrer it is, the larger is the probability that the defender will
survive.  the mathematics behind the formula is curious but not rigorous.  
still, I think, a time might come when AI will need such function often
and it might be of some use then.


oh well, so much for boring stuff,
G.



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