Style:    Language:

Author Topic: Stack Attack Calculator?  (Read 1845 times)

0 Members and 1 Guest are viewing this topic.

Offline stetson

  • Warrior
  • **
  • Posts: 99
Stack Attack Calculator?
« on: February 11, 2010, 09:23:54 PM »
Does anyone know if there has been a stack attack calculator produced yet?  I know there are calculators for determining the odds of a single unit v. another single unit... But what about a calculator or program that could run the odds of how often a stack of 7 chariots will kill 2 spearman (or even much more complicated formulas)... Anyone know if that exists yet?

[CC]Bantams

  • Guest
Re: Stack Attack Calculator?
« Reply #1 on: February 11, 2010, 09:35:03 PM »
rofl chars v spears ;D

Offline Tony[UYP]

  • Infantry
  • *********
  • Posts: 1396
Re: Stack Attack Calculator?
« Reply #2 on: February 12, 2010, 11:00:06 AM »
A combat calculator is possible because it just simply works out the chance of killing the unit outright, which is pretty simple based on defensive bonus, attack bonus and strength.

But the stack attack is more concerned with the % of life that each unit will take, which is near impossible to predict.  Your example of 7 chariots against 2 spears is semi do-able, but as soon as you start mixing stacks, a stack calculator becomes totally Lestat (useless).

Offline stetson

  • Warrior
  • **
  • Posts: 99
Re: Stack Attack Calculator?
« Reply #3 on: February 12, 2010, 03:17:57 PM »
Well, I would think its certainly possible to have one, because there would be a finite and probability for determining the amount of damage each unit would take.  (I know it would be one heck of a formula).

An easier way to write the program may be for the program to test the scenario 100 or more times quickly and tell you results.

Offline Tony[UYP]

  • Infantry
  • *********
  • Posts: 1396
Re: Stack Attack Calculator?
« Reply #4 on: February 12, 2010, 03:42:29 PM »
The formula is not the stumbling block here ... You can write one from a purely mathematical view point but as I said it would be totally Lestat.

Because each battle consists of 5 fights, so one freak battle can make the rest of the formula meaningless, as it can totally change which unit is fighting next.  Consider this example ...

You attack a stack consisting of 1 mace and 9 chariots, with a 12-Impi stack.  If the first impi gets some freak luck and manages to take the mace down to 3 Str, then the rest of your formula is doing more damage then good.  On the other hand if it takes 5 impis to kill the axe then there is a massive difference in outcome.

This is a really really simple example, consider the "knock-on-effect" if a stack consists of elephants/cats/axes/HA's, its not even worth thinking about.  A few freak battles, which there will be 100%, will have HUGE HUGE consequences going forward and the problem is you can not predict or model them.
« Last Edit: February 12, 2010, 03:48:22 PM by Tony[UYP] »

Offline Lestat

  • Creator of Legendary Topics
  • Knight
  • *******
  • Posts: 942
  • Gender: Male
Re: Stack Attack Calculator?
« Reply #5 on: February 12, 2010, 04:37:58 PM »
It is imposible to calculate stack atack ods...
to many unknown variables...

will first unit in defending stack lose batle or not
tehn second etc.. till last...

in 1v1 atack we have unexpected results...
 
« Last Edit: February 12, 2010, 05:18:23 PM by Lestat »


Pic of WOUMANS

Bantams-tk-tk2: dude stop spamming it is lame

Offline stetson

  • Warrior
  • **
  • Posts: 99
Re: Stack Attack Calculator?
« Reply #6 on: February 12, 2010, 08:26:44 PM »
Lestat, you absolutely can calculate the chances of one stack prevailing over another stack.  The possibility of 2,3,4, and even 5 units prevailing against a single unit has already been calculated.  And its just that, it tells you the percentage of times you can kill a single unit if you will attack it with 2, 3, etc.  I haven't seen a calculation of the odds of more complicated stack attacks, but I'm sure it can be done.  (And of course, a multiple quick simulation can be run to give you an idea - for instance you have 7 chariots and see 2 spearman in city - and simulation tells you that 40 times out of 100 the city dies to your attack).  This could be very useful information. 

And Tony, I understand your argument, but that's why its still called a 'possibility' or percentage to include the outliers.  So if I were to have the program calculate the situation you're talking about, it will account for the outlier possibility of an impi taking mace down to 3 str (probably less than 1% chance) all other possibilities of each attack and spit out a number that says less than 1% you win that stack attack (or by using a simulation program it shows 1 or 0 outcomes out of 100 with that attack winning).  That one is probably pointless, but there are closer calculations where this could be useful.  I'm not asking the program to tell me that I will win or lose the battle, but rather, what my chances of winning or losing are.

Also, Tony, each battle does not consist of 5 fights.  They each range depending on the number of hitpoints it takes to kill a unit.  (For instance, if attacker takes 31 HP for each battle it wins, and defender takes 13 HP for each battle it wins, it could take up to 11 battles to determine the winner - i.e. 7 defense wins and 4 attack wins.)

Offline Tony[UYP]

  • Infantry
  • *********
  • Posts: 1396
Re: Stack Attack Calculator?
« Reply #7 on: February 12, 2010, 08:39:52 PM »
The number of fights per battle is not really important.

If you really want to make the point, go into world builder, make a mixed stack and attack another mixed stack, on each reload you'll see how useless such an application would be.

Offline Atomation

  • Infantry
  • *********
  • Posts: 1434
  • Gender: Male
Re: Stack Attack Calculator?
« Reply #8 on: February 12, 2010, 09:00:49 PM »
A combat calculator is possible because it just simply works out the chance of killing the unit outright, which is pretty simple based on defensive bonus, attack bonus and strength.

But the stack attack is more concerned with the % of life that each unit will take, which is near impossible to predict.  Your example of 7 chariots against 2 spears is semi do-able, but as soon as you start mixing stacks, a stack calculator becomes totally Lestat (useless).

Now tony please.....

Of course it's possible to calculate the probability.  You simply need to calculate the average damage inflicted on the defending unit.  Then based on that, calculate the next battle, and so on.  Granted, it's going to have a very high variance, so for the most part completely unreliable, but that's a problem with civ and not a problem with the math.

This estimate would, of course, become more accurate with larger stacks, just as we would guess intuitively and based on experience that battles tend to make more sense in large numbers.

And to stetson - the amount of outcomes (final life values) is actually not important.  If there is a finite and determined number of outcomes, you can calculate using discrete mathematical methods, while if you have an infinite (or relatively infinite, if it's a very large amount) you need to use a calculus based approach to calculating the expected value of end damage taken.  If you know how to use calculus, then the actual computation is far simpler than grinding out hundreds of numbers with relative percentage weights attached to them.
« Last Edit: February 12, 2010, 09:10:20 PM by Missladyluck »
"It is not very unreasonable that the rich should contribute to the public expense, not only in proportion to their revenue, but something more than in that proportion." -Adam Smith, The Wealth of Nations

"I like free workers."
-corporate ceo

“No one can make you feel inferior without your consent” ~ ~ Eleanor Roosevelt

"Under capitalism, man exploits man. Under communism, it's just the opposite." -John Kenneth Galbraith

Offline Tony[UYP]

  • Infantry
  • *********
  • Posts: 1396
Re: Stack Attack Calculator?
« Reply #9 on: February 13, 2010, 01:58:18 PM »
Well this is exactly what I said; you can obviously model this from a mathematical view point if you make certain assumptions, like each battle takes an average amount of life.

The theory is over a big enough sample the results become more and more accurate.

But this is not the case in this situation because a single battle totally alters the model going forward, as the next unit down could have considerably weeker odds of winning, which effectively makes the model useless.

Offline stetson

  • Warrior
  • **
  • Posts: 99
Re: Stack Attack Calculator?
« Reply #10 on: February 16, 2010, 04:17:05 PM »
Well, at the very least a program that runs a 100 simulations of the attack and gives some reporting thereafter, I think would be useful.  In other words, I'm sitting with a stack of 12 HA double promo against cap with 6 spear.  and I could enter in all the factors, the program runs the numbers and tells me that out of the 100 times the program was run, 80 times the HA won... Would make it an easier decision to attack... If the number came back at 30 times, it would make it more difficult to attack.  (Or if not used during the game, then I could compute this afterwards)...

I think taking averages of damage done for each attack would be a big mistake.  No doubt there is variance... a 5 chariot stack could beat 2 spears in city, but its not likely (but knowing the more complicated stacks and their chances of success, I believe would help players)...

I'm also tired of people complaining that their stack attack doesn't win (especially when by a glance of the stack I can tell they don't have odds)... Another good use of the program would be to show them that they were just plain wrong about their odds.

Also, if there wasn't the larger variance, then the need for the program wouldn't be as much.

Offline CptMarrvelous

  • Civ4 - TD
  • Knight
  • ****
  • Posts: 967
Re: Stack Attack Calculator?
« Reply #11 on: February 16, 2010, 07:16:30 PM »
I just wanna know more about the random seed and how that works. Oddly, no one seems to know. Ask anyone in SP or Multi how the random seed works and you will never get an answer.

Is it seeded per unit... per player?

Anyway, the premise is this: Before you attack, click the mouse to hit the unit, stack attack or not, the game has already decided what the outcome will be. This is why there is an option to reload with random seed. If your playing single player, you attack, you lose and you didn't check this option, every time you reloaded, you would still lose that attack. Is this the same for multiplayer, I have no idea.

So how random is a random battle when the outcome is already predetermined?



This message was brought to you by C4P: Whittling away your freedoms one at a time
Lestat: Ignorance is the night of the mind, but a night without moon and star.

Offline Ellestar.TheElflord

  • Scout
  • *
  • Posts: 40
Re: Stack Attack Calculator?
« Reply #12 on: June 23, 2010, 07:01:34 AM »
Does anyone know if there has been a stack attack calculator produced yet?  I know there are calculators for determining the odds of a single unit v. another single unit... But what about a calculator or program that could run the odds of how often a stack of 7 chariots will kill 2 spearman (or even much more complicated formulas)... Anyone know if that exists yet?
Yet? FYI i made my calculator with that function before Firaxis fixed their own (Firaxis one showed odds like 101% chance to win). That was like 5 years ago, maybe 2 months after release.
http://c4combat.narod.ru/c4c.htm

 

anything

League