Announcement

Collapse
No announcement yet.

Ai / dice rolling combat?

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

  • #16
    heres my combat log of my cavalry dying to the elephant

    Comment


    • #17
      There was no random seed in Civ II nor SMAC.

      Civ III did have a random seed; the same one for all events, you'd almost always be on a different number in the sequence by just hiting enter.

      I'm showing at the very least same combat seed in Civ IV; it's not tied to the attacker, for grins I've tried several different units all the same types but different promotions, all would die if they attacked first that round. So not tied to attacker.

      Then I try several different units all same types attacking a different units, and sure enough the first unit I use dies in all cases. So not tied to defender.

      Now for grins, hit return and try attacks the following turn.
      Yup, much better results from my perspective if I try that.

      Originally posted by ghen
      the random seed is created a few turns before the current round of combat. This was the same in Civ3 and maybe even Civ2. So if you reload a save and play the turn exactly the same you will get the same results each time.
      1st C3DG Term 7 Science Advisor 1st C3DG Term 8 Domestic Minister
      Templar Science Minister
      AI: I sure wish Jon would hurry up and complete his turn, he's been at it for over 1,200,000 milliseconds now.

      Comment


      • #18
        On the lose attacking with odds in your favor; yes, but I have noticed winning when the listed odds were heavily against me.

        I think over 1000 combats, the results average out right, but it does seem that there are more streaks than there should be.
        1st C3DG Term 7 Science Advisor 1st C3DG Term 8 Domestic Minister
        Templar Science Minister
        AI: I sure wish Jon would hurry up and complete his turn, he's been at it for over 1,200,000 milliseconds now.

        Comment


        • #19
          I used to have a similar problem with Civ3, every now and again I'd have an unlikely roll go in my favour which is completely understandable, no matter how unlikely something is, it is still possilbe. But then other times I'd have unlikely results go against me which was almost certainly an error in the game.

          The combat calculator is the problem, seeing exactly how much the odds are for each combat re-enforces the outrage and the thing where you only remember the 1 unlikely 5% battle result and not the other 19 that went as expected.
          Are we having fun yet?

          Comment


          • #20
            Yes unlikely rolls do happen, but when the unlikely becomes almost common, there is cause for suspicion...

            I didn't have time yesterday to do any tests of it, but I will try to perform some tests today or so.

            Here is my plan:

            Since the "error" seems to show up in high strength battles (tanks, destroyers, etc)... I will create 4 stacks of units: one of regular tanks, of of promoted tanks, one of regular infantry, and one of promoted infantry.

            The test will have 3 phases: a regular, city, and damaged.
            first I will have the stacks attack on open ground (so there are no modifiers). Then I will have them repeat the same attacks (I will make sure the RNG doesn't re-seed by not checking that option and reloading) against a generic city I'll place there.

            After that, I will bombard the defending stack until it is at 50 HP and repeat the tests on open ground and in the city.

            Does anyone know of a tool that extracts combat logs into a CSV or txt file? I'd like to put the results into a spreadsheet so that it will be easier to analyze them statistically. If there's no tool, I can program one myself, but it'd be nice

            Perhaps a DB would be better... then each combat could be one record in the DB, which would allow for more fine-grained analysis of the results..

            Any suggestions would be appreciated!

            EDIT: I was thinking of analysing the logs by creating a statiscal graph of expected results, then comparing actual results - I'm a bit fuzzy on the stats equations though, so if anyone is familiar with those and wants to help, I'd be much obliged!

            Comment


            • #21
              Just my two cents worth. I started an all-random game on Warlord yesterday on Pangaea. It become obvious pretty quickly that the map generated duel-size, and the only two civs were me as Tokugawa, and Victoria, and she had the lion's share of the land. If I didn't hit her quickly and hard, I was done for.

              I generated a bunch of swordsmen, archers, and catapults, and went after her closest cities. I took one, and went for London, which was defended by only two archers and an axeman. I bombarded down to 0% and suicided two catapults, then LOST an amazing EIGHT STRAIGHT ROLLS, EACH OF WHICH SHOULD BE 75% OR MORE IN MY FAVOR. Now, according to my calculator, 1/4 to the power of eight is about 1/65536. My army was decimated, and her units still had enough strength to come out and attack my remaining units on the next turn. I decided to resign and play a new game (yes, Dan Quayle'd again).

              Anyway, I'm OK with losing an occasional war, but perhaps the message that I have an 86% chance of winning the next battle is not quite accurate?

              Comment


              • #22
                Veritass,

                I've had a lot of stuff like that, too, since the last patch. Not that extreme, mind you, but...odd.

                The problem, of course, is that it's hard--impossible, rather, to determine anything from anecdotal evidence. The RNG is like that--somebody's gotta get the ass-end of the random numbers. If they were exactly predictable, well, they wouldn't be very random, would they?

                Not saying there isn't a problem; just saying it's hard to tell.
                [ok]

                "I used to eat a lot of natural foods until I learned that most people die of natural causes. "

                Comment


                • #23
                  What im noticing is the following

                  1/ first unit in my big stack to attack WILL almost always die, regardless of combat odds, even at 98% etc.

                  but the rest of my stack usually decimates the enemy

                  2/ 1st strikes seem weird/buggy/overpowered since 1.54, longbowmen with 0% culture being attacked by 14 str riflmen will beat my riflemen many times, i look at combat logs and they hit me some 8 times and i hit them twice. (perhaps 1st strike isn't only occuring at beginning and is getting in free hits during a battle? just speculating)

                  3/ enemy counters even if obsolete counters will beat your unit very easily, even if the str comparables is very diff, eg cavalry vs elephant is the bane of my existence currently, the elephant will almost always win, i have to send a riflemen in or the elephants whipe out my cavalry stack.

                  4/ my machine gun unit is insanely powerful most of the time (do i hear 1st strike) the enemy suicides an entire stack on 1 and can't beat it sometimes, then others sends 1 catapult then a 10 str unit beats it)

                  if theres a bug it feels to be around the actual combat % chance to win being wrong, the combat is slightly weird with 1st strike but otherwise is ok.

                  The reason i notice losing my 98% chance to win is i never send in a unit with a 2% chance to win unless it was a collateral damage unit, but the ai would send in normal units at that chance to win if its part of a big stack of suicidal doom.

                  Comment


                  • #24
                    One more thing that I've noticed; the damage each unit (attacker in my example) deals out isn't permanently fixed and is tied to order of attack as well. If you have three units, and you attacked 1-2-3, you would have a different result compared to 3-2-1. On the other hand, I haven't tested whether or not the second unit would have the same result.

                    edit: I'm almost thinking that Civ4 needs to have an "obsolete" bonus/penalty instead of this full firepower attack. That would make more sense.

                    edit2: Another thing. This full firepower thing is making ancient era warfare pretty impossible. A horde of warriors versus city defending archers would never win. (For example, I sent in five unupgraded warriors against a full-strength defending archer, and the archer sustained zero damage.) Even Axemen/Chariots don't make the cut anymore. I'm thinking either this firepower thing is too powerful, or first strike is bugged.
                    Last edited by cal_01; January 6, 2006, 20:49.

                    Comment


                    • #25
                      Well, my tests with unpromoted units bore out to what seemed like almost correct odds; I did have one test where out of 5 tanks attacking 5 unfortified infantry in a city, I lost 2 tanks...

                      The problem seems to be when a highly promoted unit is attacking (I haven't been able to check defending yet). I'll run some actual tests to verify this, but I strongly suspcet that perhaps in 1.52 there is a misplaced parenthesis or operator somewhere in the combat calculator!

                      EDIT:

                      I did some tests in worldbuilder with promoted units (just build them and made sure to have all the XP buffs set up), and it appears that either I am setting up the test wrong, or my entire theory needs to be revised

                      All of the combats went as expected... no deviations from predictions... *shrug* well, at least I know for sure now that the combat calcs aren't buggy (or at least they are "stealth" bugs)
                      Last edited by Yosh; January 7, 2006, 18:29.

                      Comment


                      • #26
                        Yea the combat seems right most of the time, it just becomes noticeable in those turns where your entire stack is wiped out by a lower tecced enemy stack of the same size and you scratch your head in disbelief

                        i have this cavalry unit ive been nurturing, its upto 88/101 exp (lvl 10) and every now and then when i see an elephant i save the game and take one on and so far ive never won with this unit, its more for amusement cause i know if i send a riflemen in he'll shoot that fat elephant and only take 1/2 str damage, whereas my cavalry unit of doom with 4xstr+ commando+ withdraw and some other abilities has always died when i give it a go.

                        (elephants get 50% vs mounted so maybe its fair enough, but do elephants get defensive bonus's? or are they treated like mounted for that purpose of having no defensive bonus's?)

                        Comment


                        • #27
                          You know, I was just about ready to shrug this whole thing off as crazy-talk, but I've started to notice that I've been able to consistently have the 'unlikely' dice rolls happen to me...

                          It happens ONLY when there are multiple promotions/modifiers involved.

                          I took screenshots of the combat logs -- many of them occured in the same turn, I'll try and put them together and post tomorrow.

                          The quirkiest thing is that it seems to be most consistent when the combat odds say anything between 73-81% or so. I can almost gurantee (no, really - it's that consistent) that if I attack when I have those odds, I will lose the unit!

                          Comment


                          • #28
                            Heh, I've just had 19 consequitive wins in warrior vs animal fights. Granted the Animal odds per round are only like 25%, but still... that's a pretty decent streak.

                            I also lost a 99.7% battle earlier, but it was fair since I'd won a great many battles with simialler odds. After all 0.03% is 1 in 330, that's bound to happen. About 10 combats per turn, all with 99%+ odds, I should expect an "upset" loss every 30 turns or so.
                            (The reason I have those odds is it's battles vs raging barbs, washing up against a hill capital crammed to the gills with axemen and guerilla archers)

                            Comment


                            • #29
                              Has anyone checked to see (or if it's even possible) if the random number seed is random "enough" in a small sample?

                              One of my other favorite games (Temple of Elemental Evil) had a horrid random number generator; over a large enough sample, the distribution was random. However, it would produce streaks and other weird anomalies that wouldn't happen in a proper generator.

                              Anyhow Yosh and Blake, I'm going to try a test tonight: ancient era archers and warriors. Hopefully, it'll confirm two things: archers are too powerful in the ancient era now and the random number generator (or combat at least) is messed up.

                              edit: PS. There's no way to export the combat logs, is there?

                              Comment


                              • #30
                                Yosh, it seems to me that the first attack of a sequence in that percentage will result in me losing the unit and the others all winning.

                                It's also possible that with multiple promotions, it may be using the wrong promotion.
                                1st C3DG Term 7 Science Advisor 1st C3DG Term 8 Domestic Minister
                                Templar Science Minister
                                AI: I sure wish Jon would hurry up and complete his turn, he's been at it for over 1,200,000 milliseconds now.

                                Comment

                                Working...
                                X