Complete.Org: Mailing Lists: Archives: freeciv-ai: September 2004:
[freeciv-ai] Re: [Freeciv-Dev] Re: (PR#9887) AI defense code
Home

[freeciv-ai] Re: [Freeciv-Dev] Re: (PR#9887) AI defense code

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [freeciv-ai] Re: [Freeciv-Dev] Re: (PR#9887) AI defense code
From: "Gregory Berkolaiko" <Gregory.Berkolaiko@xxxxxxxxxxxxx>
Date: Fri, 3 Sep 2004 10:21:01 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=9887 >

On Fri, 3 Sep 2004, Gregory Berkolaiko wrote:

> Ok, lets think about it.  A is our defender, B is attacker.  strength is 
> defence strength and attack strength respectively.
> 
> The average number of hits unit A inflicts on B before getting hit _once_ 
> is
>       strength_A / strength_B
> (that's probability theory)
> 
> Since A can take hp_A / fp_B hits from B before dying, the average number 
> of hits it will inflict on B before dying is
>         strength_A / strength_B * hp_A / fp_B
> 
> Since each hit takes fp_A off B's health, the average number of health 
> lost by B is
>         L = strength_A * hp_A * fp_A / (strength_B * fp_B)

BTW, strength_A * hp_A * fp_A is called defence_rating in the code, so the 
code is not clueless about the probabilities.




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