Announcement

Collapse
No announcement yet.

Warrior, Archer, Spearman Screens using 4roll combat

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

  • Vondrack asked:

    Originally posted by vondrack
    Thanks, but I would rather do my own calcs than use someone's 'blackbox'. Could you give me a hint how the probability of c=(a+b)/2 from known probabilities of a & b is calculated?

    My secondary school math was enough for the old combat system (elementary combinatorics), but once this averaging thing kicks in, I am pretty much lost...

    Thanks.

    EDIT: Do I suspect correctly that integrals will have to be used?

    Sir Ralph replied:

    Originally posted by Sir Ralph

    You can't calculate this without knowing the distribution of the probability in form of a continuous function (i.e. how to calculate the probability of a and b depending on a third parameter). If you know this continuous function, you can calculate the probability of c the normal way (using the function).

    An example: How is the probability of getting 1.5 out of a die roll, knowing that both 1 and 2 have a probability of 1/6? Nonsense, obviously, but the correct answer would be 0.

    Another example: Imagine a die (cube) with two 1's, one 2 and three 3's. The probability to get a 1 is obviously 1/3, the probability of 3 is 1/2. The probability of 2 (1/6) doesn't lie between.
    How to find the distribution of c from knowing c = (a + b) / 2, and knowing the distributions of a and b. We are dealing with approximately continuous variables here (they're actually discrete, like dice, but are best treated as continuous for ease of use).

    Take a simple case: a single random number (a), which ranges from some value a_min to some other value a_max, and has some probability distribution f(a). The probability of finding a in some range a1 to a2 is the integral from a1 to a2[i] of f(a), as long as the integral from a_min to a_max is 1. For our pseudo-random number generator, a_min = 0, a_max = 1 and f(a) = 1 - namely we generate random numbers between 0 and 1 with each number being equally probable.

    Once you average over two variables, things get more complex. A set of two random numbers from 0 to 1 can be represented as a square (each side of length 1) = the a-value runs along one side from 0 to 1, and the b-value runs along a side perpendicular to it from 0 to 1. The probability of a falling in a certain range (a_min to a_max) and b falling in a certain range (b_min to b_max) is the integral over the area defined by those limits (if we want to know the probability a is between 0.6 and 0.8 while b is between 0.15 and 0.37, we integrate over the rectangle defined by those 4 lines). In the case of uniform distributions, the probability is simply the area (once the total area is normalised to 1). Since we are interested in calculating the probability of getting a given calue of [i]c/[i], we have to integrate over the 'area' that gives that value of c - which is essentially a thin diagonal strip running from a=0, b=2c to a=2c, b=0 (for c < 0.5). This lets you calculate the probability distribution of c (which in this particular case looks like a triangle with its peak at c=0.5). The integration has to be done piecemeal - the limits you use for c < 0.5 are not valid for c > 0.5, so the integration is divided into two seperate functions.

    Averaging over three variables (d = (a+b+c)/3), you have to find planes of constant 'd' within the cubic volume defined by a, b and c. The integration has to be done over three seperate cases (d < 1/3, 1/3 < d < 2/3, d > 2/3), and the final probability distribution of d is a set of three quadratic equations (one for each range of d listed above), giving something vaguely gaussian-shaped.

    For four variables, yuo have to do integrations of 3-volume slices of a 4 dimensional hypercube, giving you a set of 4 cubic equations describing the probability distribution of your variable e=(a+b+c+d)/4. One cubic equation is valid over e=0..0.25, one for e=0.25..0.5, one for e=0.5..0.75 and one for e=0.75..1.0.

    In combat calculator terms, you need to find out x, the unaveraged probability of the attacker winning one round of combat, and then integrate this set of cubic equations to determine the probability of actually winning of losing. Example: if the old-style probability of the attacker winning a single round was 0.586, the the probability of winning a single round in the new style would be found by integrating the first cubic from 0 to 0.25 plus the second from 0.25 to 0.5 plus the third from 0.5 to 0.586. The probability of losing would be the the integral of the third cubic from 0.586 to 0.75 plus the fourth cubic from 0.75 to 1.0. Once you have determine these new probabilities, you just plug them into an old combat calculator, using these new values as the probability of the attacker winning a single round. Once you've done the donkey work of finding the correct set of cubic equations, it's pretty straight forward, but getting those equations can be fairly tedious to do by hand, and rather prone to mistakes unless you are very careful.

    Or you can do it the way I did - by simply simulating a few million combats fn each case. It is trivial to change the random number generator to generate an average of four numbers, and the results then follow quite happily.

    Comment


    • Originally posted by Theseus
      Let's summarize, collapsing the positions down into a few players:

      * Catt: Grrr. Now I'm getting mad... taking the lawyer hat off.
      * Catt: Puts on robe and wizard hat.
      We need seperate human-only games for MP/PBEM that dont include the over-simplifications required to have a good AI
      If any man be thirsty, let him come unto me and drink. Vampire 7:37
      Just one old soldiers opinion. E Tenebris Lux. Pax quaeritur bello.

      Comment


      • Vulture:

        (I never felt this "dizzy" smilie to be soooo appropriate!)
        "The only way to avoid being miserable is not to have enough leisure to wonder whether you are happy or not. "
        --George Bernard Shaw
        A fast word about oral contraception. I asked a girl to go to bed with me and she said "no".
        --Woody Allen

        Comment


        • vulture, thanks for your time!

          I knew it. Integrals... That's something I simply cannot do out of memory. And having little time to dig into this using math books, I will have to give up for the moment.

          Anyway - I am glad to know the principle I thought would have to be used was correct. Your explanation is very easy to understand and imagine - it was only now I realized averaging more than 2 rolls would become more complex, if calculating precise formulas.

          Thanks again!

          Comment


          • 3. Finally, the fact that some people in this forum are surprised that 12 archers can take this city most of the time proves Aeson's point: these players either do not understand the odds they face or are choosing to ignore them.

            I am not sure that anyone is surprised at that, it is more that we are surprised anyone would have 12 archers or want to use them to attack a city that is known to have pikes or better,
            Given the current combat system, I would not be shocked if 12 of anything could beat 3, I just would not attempt it witha large disparity in unit strengths. I would want at least a unit with a 3 attack value.

            Comment


            • Originally posted by vmxa1
              I am not sure that anyone is surprised at that, it is more that we are surprised anyone would have 12 archers or want to use them to attack a city that is known to have pikes or better,
              Given the current combat system, I would not be shocked if 12 of anything could beat 3, I just would not attempt it witha large disparity in unit strengths. I would want at least a unit with a 3 attack value.
              Clearly, I'm not surprised by this result either, nor do I feel it is somehow "unrealistic" or wrong. Mass does have its own value in combat, and can help compensate for technological inferiority. I'm using this example only because it has been used several times in this thread.

              That said:

              If I were the attacker and found myself in this position, I'd be fascinated to know why I didn't bring swordsmen along.

              If I were the defender, I'd beat myself senseless for being stupid enough to allow the AI to stack 12 archers next to my city without doing something about it.
              They don't get no stranger.
              Do not taunt Happy Fun Ball.
              "We will not tire, we will not falter, and we will not fail." George W. Bush

              Comment


              • Originally posted by Tall Stranger
                That said:

                If I were the attacker and found myself in this position, I'd be fascinated to know why I didn't bring swordsmen along.
                Maybe you don't have any iron?

                If I were the defender, I'd beat myself senseless for being stupid enough to allow the AI to stack 12 archers next to my city without doing something about it.
                It was just an example that came to the top of my head. I didn't even work out the odds first - I just made an educated guess that 12 archers would run through 3 Pikemen behind walls. At that stage, I didn't realise that fortifying the pikemen also gave an advantage as I was under the impression that walls negated the fortify bonus. When I did do my test (unfortified pikemen), it seemed pretty clear that the archers would in the large majority of cases, win through. Somebody else did it with fortified pike and although not as clear cut, the archers still won through more often than not.

                Also - consider the following example. You create a new city next to a mountain. It hasn't yet expanded it's influence because no temples have been built - you built walls first.

                The enemy city 4 squares away from it expands it influence, right up next to the mountain. That means that inside that city could be 12 archers just ready to move along a road and on top of the mountain, next to your city.

                Unless you are so paranoid that you spend gold every turn to view the enemy city, you could quite easily find yourself ready to be assaulted by 12 archers next turn. The fact that they're on a mountain means they will be better protected from counter-attack.

                If the AI did this, I'd be quite surprised!. There is nothing to stop a human player from doing just this though.
                Three words :- Increase your medication.

                Comment


                • Originally posted by Tiberius
                  Vulture:

                  (I never felt this "dizzy" smilie to be soooo appropriate!)
                  Me too.
                  The greatest delight for man is to inflict defeat on his enemies, to drive them before him, to see those dear to them with their faces bathed in tears, to bestride their horses, to crush in his arms their daughters and wives.

                  Duas uncias in puncta mortalis est.

                  Comment


                  • Originally posted by Jeem


                    Maybe you don't have any iron?
                    Then, in all likelihood, I wouldn't be attacking.

                    It was just an example that came to the top of my head. I didn't even work out the odds first - I just made an educated guess that 12 archers would run through 3 Pikemen behind walls.
                    I think that's my point. Many of the complaints about the combat system being unrealistic are, in fact, based on people NOT working out the odds. In the scenario you describe above (3 fortified, with walls), the odds are almost certainly against the attacker. Yet some people will attack nonetheless, then complain that the AI cheats when they (rightly) lose the battle. If the player is on the defensive, in some extremely rare cases (less than 1 in 200), they will lose while only killing a single attacking archer and start complaining.

                    At that stage, I didn't realise that fortifying the pikemen also gave an advantage as I was under the impression that walls negated the fortify bonus. When I did do my test (unfortified pikemen), it seemed pretty clear that the archers would in the large majority of cases, win through. Somebody else did it with fortified pike and although not as clear cut, the archers still won through more often than not.
                    I can't find anyone who has done 3 pikes fortified with walls, but if without walls the odds are 60% for the archer, they should drop below 50% with walls added. (I'd do it, but at my work computer).

                    Also - consider the following example. You create a new city next to a mountain. It hasn't yet expanded it's influence because no temples have been built - you built walls first.
                    I know I shouldn't fight the scenario, but who builds walls before temples? Can't think of a reason to do it in SP. Maybe in MP.

                    The enemy city 4 squares away from it expands it influence, right up next to the mountain. That means that inside that city could be 12 archers just ready to move along a road and on top of the mountain, next to your city.

                    Unless you are so paranoid that you spend gold every turn to view the enemy city, you could quite easily find yourself ready to be assaulted by 12 archers next turn. The fact that they're on a mountain means they will be better protected from counter-attack.

                    If the AI did this, I'd be quite surprised!. There is nothing to stop a human player from doing just this though.
                    First off, whether playing SP or MP, I'd be sure to have a unit sitting on that mountain to deny anyone the use of it without declaring war. If you're at peace, it will force your opponent to, at the very least, reconsider going to war. If you're already at war, why on earth would you build a city near the enemy without a large supporting force nearby to defend it?

                    Second, the fact that the AI is unlikely to do send those 12 archers is one very good reason not to make "unusual results" even more rare. A human will simply create larger SODs to compensate for the change in the rules. The AI, on the other hand, will likely continue to send its units in small bunches, only to get chopped to pieces by the superior human player. In these cases, the only real hope the AI has is that it gets lucky. I'd much rather see Firaxis work to improve the AI's war planning than have them tinker with a combat system that, IMO, is not broken.

                    I'd still like you to answer the three questions regarding the A/D values and RNG, which I put forward in a previous post.
                    They don't get no stranger.
                    Do not taunt Happy Fun Ball.
                    "We will not tire, we will not falter, and we will not fail." George W. Bush

                    Comment


                    • Originally posted by Tall Stranger


                      Then, in all likelihood, I wouldn't be attacking.
                      Well, that's a pretty poor strategy IMO. If 12 archers can go through 3 defended pikes more often than not, then by my reckoning (untried, naturally), 8 will go through 3 spears. Actually, the figure is probably closer to 6-7.

                      Are you saying that whether on not you have Iron dictates whether or not you attack? If so, perhaps you should try out some archers as they really aren't that bad at it.

                      I think that's my point. Many of the complaints about the combat system being unrealistic are, in fact, based on people NOT working out the odds. In the scenario you describe above (3 fortified, with walls), the odds are almost certainly against the attacker.
                      No they aren't! 12 archers will beat 3 fortified pikemen behind walls around 65% of the time. The odds are with the attacker.

                      Yet some people will attack nonetheless, then complain that the AI cheats when they (rightly) lose the battle. If the player is on the defensive, in some extremely rare cases (less than 1 in 200), they will lose while only killing a single attacking archer and start complaining.
                      If you attack 3 fortified pikes behind walls with 12 attackers and lose, you've been unlucky.

                      If you lose 3 fortified pikes behind walls for the consolation of just one archer, you've been even more unlucky.

                      Put it this way - you may as well roll a dice at the start because the combat is so random that it can go to either extreme too often. Far better that both parties have a reasonable expectation of what the outcome will be, and the times when the reasonable expectation isn't met are rare enough to be actually 'rare'. That is what Mike from Firaxis was alluding to in the other thread - the combat is still going to be capable of swinging both ways, but the likelyhood of it doing so is made much rarer. That way, wild swings are going to be so unusual that they really are rarities, and all the more important for it.

                      I can't find anyone who has done 3 pikes fortified with walls, but if without walls the odds are 60% for the archer, they should drop below 50% with walls added. (I'd do it, but at my work computer).
                      I did it. Are you talking about a 2-roll or 3-roll scenario here or the game as it stands?


                      I know I shouldn't fight the scenario, but who builds walls before temples? Can't think of a reason to do it in SP. Maybe in MP.
                      I do, frequently. Walls are the first thing I'll build after taking an enemy city. They are cheap and give 50% defensive bonus to the defensive troops I move up after taking it. This allows me to be confident that I have left a decent defence in place so I can move my attacking troops on to the next city. Does the AI never counter attack you?

                      First off, whether playing SP or MP, I'd be sure to have a unit sitting on that mountain to deny anyone the use of it without declaring war. If you're at peace, it will force your opponent to, at the very least, reconsider going to war. If you're already at war, why on earth would you build a city near the enemy without a large supporting force nearby to defend it?
                      So, when you send a settler out to build a city, you also send a full complement of defensive units every time? Or, you always have a standing army nearby?

                      Do you ever expand in 2-3 different directions at the same time? Don't you feel the need to grab the best land ASAP when against an Emperor level AI? If you don't do it, they certainly will. You cannot always protect every city you create - most times you are hard pushed to defend your core cities early on.

                      Second, the fact that the AI is unlikely to do send those 12 archers is one very good reason not to make "unusual results" even more rare. A human will simply create larger SODs to compensate for the change in the rules. The AI, on the other hand, will likely continue to send its units in small bunches, only to get chopped to pieces by the superior human player. In these cases, the only real hope the AI has is that it gets lucky. I'd much rather see Firaxis work to improve the AI's war planning than have them tinker with a combat system that, IMO, is not broken.
                      If you think the AI sends it's units in small bunches then surely that's the problem? Any decent defence and road network leading to the front lines will be able to halt anything except the most dominanant of AI attacks. This is true *right now*. To me, that's a bigger problem with the game than any proposed change to the combat.

                      I'd still like you to answer the three questions regarding the A/D values and RNG, which I put forward in a previous post.
                      I am not a statitician. If Firaxis say the combat is streaky then I'm quite happy to agree because I do. If you are saying that it isn't streaky, then perhaps your own definition of 'streaky' differs from mine and the Firaxians.

                      Why not ask them to define what they mean by 'streaky' and we can go on from there? I can't *prove* something is broken unless there are specific rules governing it. All I've got is gut feeling and instinct, and like many others, I feel that the randomness of combat is so marked that it's basically bringing the game down.

                      I could give examples, but others will say stuff like 'that's too small an example so it doesn't count'. For example, in my latest game I've consistently seen so many results where the better attack/defence lost that it made me think there was little point in wasting time building 'better' units.

                      I'm talking stuff like the AI beating my fortified pike on mountains with longbows in 4/5 combats, then me taking their Riflemen defended cities (size 7+) with Cavalry in equal measure. The whole game as it stands rewards higher numbers of reasonable troops in preference to small number of elite troops.

                      After reading and participating in this thread, I find myself 'breaking' the game more often by sending Med Inf against Riflemen(4A vs 6.6D minimum), because I know that the combat is so random that I've got a bloody good chance of winning first time, and if not, an even better chance next time. So long as I've got superior numbers and the A/D values are not hugely dissimilar, then I can be sure I'll win through in the end.

                      From what I've witnessed recently, the AI will shy away from attacking defenders which have at least 2.5 times the combat value. That tells me that the AI considers attacks of 2 vs 4, 4 vs 9, 6 vs 14 and so on to be 'winnable'. Then again, 4 vs 9 isn't much worse than a 1A vs 2D so it's no wonder. What that equates to is longbowmen taking on a rifleman behind walls and winning about the same amount of times as a warrior attacking a spearmen in the open.
                      Three words :- Increase your medication.

                      Comment


                      • Jeem, you are still annoying the cr*p outta me, and your sample is still too small.

                        But I d*mn well like your attitude, your thought processes, your knowledge of the game, and your articulation.

                        So the point to the whole above post was: Variability in combat is still too extreme?

                        OK, fine, I concede (although not too much). The challenge remains: As we nudge towards more deterministic combat, gameplay balance unavoidably changes, in both slight and major regards.

                        Posit 2-roll combat resolution: What needs changing?

                        And for the love of god, per vmxa1's recommendations, use smilies, or something, to soften the communication effect!
                        The greatest delight for man is to inflict defeat on his enemies, to drive them before him, to see those dear to them with their faces bathed in tears, to bestride their horses, to crush in his arms their daughters and wives.

                        Duas uncias in puncta mortalis est.

                        Comment


                        • There's something else fundamentally wrong with the examples being bruited about.

                          Yes, of course, given the current combat model, number of units can trump quality.

                          But, hmm, there is something slyly wrong about all this... shields invested in units? stack composition?

                          Let's use this 12 Archer vs. 3-4 Pikes example:

                          It's a silly example. As previously stated by others, excepting unique situations (e.g., the mountain / nearby city / culture boundary example... sheesh), no human or AI player is gonna walk up to an attack that way; rather, that stack will be bolstered with Spears and Swords... and, btw, the defense will prolly never be so simple as 3 Pikes alone, but will rather also have bombard and attack units.

                          Thus, isn't the example a canard? Sorta non-representative of GAME BALANCE?

                          Grr.

                          /me smacks Jeem with a large wet trout.

                          I just don't think combat balance, and thus game balance, is that far off. This is not The Sims, fer chrissakes.

                          (Shades of RL)

                          Too bad, buddy, you gotta deal with inimical factors and nation-states, and that means a Home Defense force. And guess what? Sometimes (? in today's world) those threats come frm less technologically advanced enemies.

                          Heck, the more I think of it that way... the more I am a FAN of randomness in C3 combat! Do I need to list the examples?

                          /me is on the verge of a rant, and TOTALLY re-heating this into a war. (but in a good way)

                          Yep, in RL there have been hands-down, '4-roll' confrontations between nations and cultures... but, dear god, think of the opposite RL examples!

                          [Sidenote: I really do like it that Jeem, and others, want to debate all of this, and do so. Makes 'poly what it is, I think. ]

                          [Second sidenote: NYC business guy faces off against Scottish ?. News at 11.]
                          The greatest delight for man is to inflict defeat on his enemies, to drive them before him, to see those dear to them with their faces bathed in tears, to bestride their horses, to crush in his arms their daughters and wives.

                          Duas uncias in puncta mortalis est.

                          Comment


                          • Originally posted by Jeem
                            Well, that's a pretty poor strategy IMO. If 12 archers can go through 3 defended pikes more often than not, then by my reckoning (untried, naturally), 8 will go through 3 spears. Actually, the figure is probably closer to 6-7.
                            Sure you can take one city, the problem is that you probably lost half your army trying to capture it. Unless you were able to target an iron deposit city, you are SOL. And unless you have destroyed the offense of the AI civ, or the war has been going on for some time, its pretty unlikely that you can sue for peace by taking one city. 12 archers are easy enough to muster. 24, 36 archers, enough to capture 4+ cities is not, especially when you figure in unit upkeep costs. Not to mention the spears that must accompany the archers.

                            Originally posted by Jeem
                            I do, frequently. Walls are the first thing I'll build after taking an enemy city. They are cheap and give 50% defensive bonus to the defensive troops I move up after taking it. This allows me to be confident that I have left a decent defence in place so I can move my attacking troops on to the next city. Does the AI never counter attack you?
                            I've never heard of this strategy (building walls after capture) being used, and I've been here posting and lurking for years now. I build enough units prior to war that I blow through the enemy. My units only stop to heal, the rest march onwards, I don't wait around for him to counter attack. By the time walls could be built, ie. after resistance has ended and I could rush them, there are rarely enemy troops within sight. And if my goals are finite, say to capture a lux or resource city, then I don't wait for the enemy to march to my gates, I take them out before they attack. Walls never come to my defense. In civ, the only good defense is a good offense.

                            See: Gathering Storm-Vox war, PTWDG. An immortal horde approached our cities via a mountain range. Did we wait for them to actually hit our city guarded by pikes? No, we pinged them with cats until redlined and them hit them with Medieval Infantry

                            Comment


                            • In civ, the only good defense is a good offense.

                              This may be true, game-wise, but I prefer to have defensive/occupation troops there also. It helps my believability factor.*

                              It helps that my foot units have increased offensive strengths (but defense bonuses have also been increased).

                              *Rommel syndrome: the illusion (or delusion) that you are partaking in reality, not just a game or simulation.

                              Comment


                              • OT

                                *Rommel syndrome: the illusion (or delusion) that you are partaking in reality, not just a game or simulation.
                                Interesting... can you supply any references to medical texts on this subject? :-)
                                Enjoy Slurm - it's highly addictive!

                                Comment

                                Working...
                                X