Announcement

Collapse
No announcement yet.

Chance to win

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Chance to win

    I tried to calculate chances that unit that is X times stronger will lose to another unit (without any specials like first strike etc.)

    Code:
    Str	chance to
    ratio	lose
    1	0.5
    1.01	0.371
    1.05	0.347
    1.1	0.32
    1.15	0.295
    1.2	0.271
    1.25	0.0957
    1.3	0.0854
    1.35	0.0763
    1.4	0.0682
    1.45	0.0333
    1.5	0.0293
    It seems that in CIV it's impossible to kill something with a horde of weak units.

    According to civilopedia, when two units with strengths X and Y fight each other, unit X deals X/5Y% of Y health per strike. So, unit X should hit with StrikesX=round up(5Y/X) strikes to kill unit Y. Unit Y should hit with StrikesY=round up(5X/Y) strikes to kill unit X.

    So, there will be no more than MaxStrikes=StrikesX+StrikesY-1 rounds in a battle.

    Unit X has CTH_X=X/(X+Y) chance to hit, unit Y has CTH_Y=Y/(X+Y) chance to hit.

    So, chance to lose is equal to
    ChanceToLose = Sum (
    (MaxStrikes! / ( I! * ((MaxStrikes-I) ! ))) *
    * CTH_Y^I * CTH_X^(MaxStrikes-I) )
    where I = 0..(StrikesY-1)

    Am i right with these formulas?
    Knowledge is Power

  • #2
    From what I've read, when a hoarde of weak units attacks a strong one, the initial attackers will lose but will have a chance to cause some damage in the process. That damage affects not only the defender's health but also its strength rating when the next unit attacks it. So eventually, the stronger unit will be weakened to a point where a weaker unit can kill it - at least unless the strength disparity is so totally lopsided that the attackers tend to lose without causing any damage. Developing a stack combat calculator is going to be a very interesting proposition.

    Comment

    Working...
    X