Announcement

Collapse
No announcement yet.

Preference for Certain Great Leaders? Bug?

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

  • Preference for Certain Great Leaders? Bug?

    I have noticed in a few games that there is a tendency for the game to give you great engineers , even if the percentage probability is low. in a recent game (modded, so i dont think i can post it ?) i had been trying to get a great prophet (at the time about 20% of the world followed a religion i had founded), and after a while had added an engineer to the city to bulk up the points/turn. the percentages the turn before getting a great person were something like

    great prophet - 41%
    great artist - 19%
    great engineer - 21%
    great scientist -19%

    i got a geat artist, so like the cheat i am , i reloaded. I then got a great engineer (cai lun), so i reloaded again.in short, i reloaded 3 more times and got cai lun every time.so ,when i was supposed to get a prophet 2 out of every 5 times, i got none.

    what is strange is that i was playing the Chinese, and i had recently been the first to discover paper, which is what cai lun is known for.could this mean that certain civs have predilections for certain great people? or if you get a tech a great person is associated with it will increase the chance of their appearance?or is this just bad luck over and over again? i have had this problem in other games of civ4, but of course i have none of the saves.
    also, i only have patch 1.52 , modded for caravan , railroads, terraform and next level.(kickin it old school civ2 style)

  • #2
    Probability of none of those five GP events giving you a Great Prophet = 0.59^5 = 0.0715. Fails to be significant at 5% level.
    Participating in my threads is mandatory. Those who do not do so will be forced, in their next game, to play a power directly between Catherine and Montezuma.

    Comment


    • #3
      Re: Preference for Certain Great Leaders? Bug?

      Originally posted by pikachu22
      i got a geat artist, so like the cheat i am , i reloaded. I then got a great engineer (cai lun), so i reloaded again.in short, i reloaded 3 more times and got cai lun every time.so ,when i was supposed to get a prophet 2 out of every 5 times, i got none.
      Dice rolls are dependant on in-game actions. If you reload and do exactly the same things as before, you should always get the exact same result. If you got an Artist on one attempt, you probably did something different that time (moved units in a different order or to a different location, built something else in a city, etc -- not sure what exactly affects the roll but it's designed exactly to prevent this kind of 'reload cheating').

      what is strange is that i was playing the Chinese, and i had recently been the first to discover paper, which is what cai lun is known for.could this mean that certain civs have predilections for certain great people? or if you get a tech a great person is associated with it will increase the chance of their appearance?
      Nothing of the sort is the case.
      Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

      Comment


      • #4
        does The "new random seed on reload" option apply to GPs also? ...or does it apply only on combat?
        Vi Veri Veniversum Vivus Vici

        Comment


        • #5
          Originally posted by Locutus


          Dice rolls are dependant on in-game actions. If you reload and do exactly the same things as before, you should always get the exact same result. If you got an Artist on one attempt, you probably did something different that time (moved units in a different order or to a different location, built something else in a city, etc -- not sure what exactly affects the roll but it's designed exactly to prevent this kind of 'reload cheating').
          The reason you'll always get the same dice rolls except when you do something different (and not always then) is because you have to have the game do something that requires a dice roll to get a different result from a loaded save game. This is because you'll always get the same numbers in the same order from the same seed.

          See, when you first start the game, it picks a number as a 'seed' to generate random numbers from. So it's different every time, it's usually based on something that's always changing, i.e. your system's clock. The numbers it then derives from it are not truly random.

          Now, I only understand the principles of this and not the actual details of how numbers are generated from a seed these days so I'm going to use an analogy that's probably a lot simpler. Let's say that a game uses a 5 digit number which is the last 5 digits of the number of milliseconds since you turned the computer on. Let's say that number, by odd coincedence, is 12345. The computer could then run that number through a preset math equation to get a new number - for my example, we'll say the multiplies the seed by it's first digit, divides it by it's last digit, squares it.

          In the example, it would multiply 12345 by 1, divide it by 5, and then square that...in this case 6095961. The game can then use that number to generate the 'random' result, and then use it to generate the next number. In my lame random number generator example, we take the last digit as the random number from 0 to 9 for the game's dice roll, then take the last 5 digits and run it through the formula again - in this case. 95961 multiplied by 9, divided by 1, and then squared. Continue doing this as long 'random' numbers are needed. Since the game hides the seed from you and doesn't tell you what mathematical operations it's performing on it, it's as good as random for you.

          Now, this process is complicated because some formula might get in a loop where the same number is generated over and over again - that could easily happen with mine, which is why I said it was lame, but you should understand the concept.

          And since this process is NOT really random, you will always get the same strings of number from the same seed. In effect, when the game chooses it's seed, it's making all those dice rolls ahead of time. When you start the game, you might have 1, 1, 3, 6, 4, 7, etc.

          So let's say we start a game with those seeds. The first time something random happens, it's going to get that first number. The first numbers are all going to be used up by the random map generator. We'll consider for our purposes the first 'dice roll' after the game actually starts to be Roll 1. It will probably be a roll determining what comes from a tribal village, as will the next several.

          Now, here's where it gets interesting...the AI is always going to behave the same way based on what has happened around it, so if the player does the exact same thing from the start of the game to the end they will always get the same results from the same seed, but relatively minor things can change the order that the rolls happen in.

          Let's say at turn 5 the player popped their first hut and got a tech. They then started over from the beginning of the game. If they pop that same hut on turn 5, they will get the same tech. If he waits until turn 6, he may or may not get the same tech, depending on whether or not any other random numbers were generated in the game - i.e. a computer player popped a hut and got the number that the player would have got that turn. Then the player grabs the hut on turn 6 and gets a different number.

          You can see how one could manipulate this to get different results. Let's say on a certain turn the player has a warrior next to a bear and a scout next to a hut. If he gets the hut first then fights the bear, he'll have the same results for the hut and the battle every time he does it in that order. But if he doesn't like what the hut gave him, he can reload, and attack the bear first, using the random number that would have been used to decide what was in the hut for the battle, then getting the next number for the hut.

          Because of the nature of the AI, you could possibly end up getting different random numbers from the same seed without the player doing anything that generates a random number. As an example, consider a player that is at war with another civilization. If for 5 turns he does the exact same thing and on the 6th turn does something that generates a random number, the AI will react to him the exact same way, and get the exact same number of dice rolls, and so on the 6th turn the player will always get the same 'random' result. But if the player does different things, even if those different actions do not generate any random numbers, he might still cause there to be a different number of 'dice rolls' before turn 6 and get a different result. For instance, he might move a unit near an enemy city, which causes the AI to send a unit back towards that city which otherwise would have fought a barbarian, and so there are less random numbers generated before the player get's theirs.

          This explains why sometimes the player just can't seem to win, making people think the game is fixed. Let's say the player has an archer next to three different units, a warrior, an archer, and an axeman. The player attacks the axeman. Behind the scenes, the computer determines the next 'random' number to come up is a very low one, and in this hypothetical situation rolling high is better. The player loses. He reloads the game, and attacks the archer. Since he has the same dice roll, and it's a very low one, he loses. He reloads, figuring that the odds of his archer losing to the warrior are very low (let's say only 1 in 100), but the roll he is destined to get at that moment in time is really that low. In fact, if the player attacks anyone with anything at that point in the game, he's probably going to get bad results.

          NOTE: I'm aware that Civ4 combat resolution is based on lots of rolls, probably in part because of this. But if your next 10 rolls are all bad ones, you'll probably lose anyway no matter who you attack. This is why if you lose a battle where you had a 99% chance of winning, that unit is probably going to lose even if it attacks someone else after reloading.

          If you check Generate Random Seed on Reload, every time you load the game you'll get a different seed, and thus you'll have different random results if you reload.

          My apologies to those who understand this better than me, I'm trying to put my understanding of it in a very understandable form.

          Comment


          • #6
            Yawn!!!

            I guess you are a real crowd puller at parties.


            What point are you trying to make?
            "What if somebody gave a war and nobody came?" Allen Ginsberg

            "Opinions are like arses, everyone has one." Anon

            Comment


            • #7
              Originally posted by Harrier UK
              Yawn!!!

              I guess you are a real crowd puller at parties.


              What point are you trying to make?
              Oh, expletive off. Badtz Maru gave an excellent explanation of the way the random seed system works, and I for one found it helpful and useful.
              Participating in my threads is mandatory. Those who do not do so will be forced, in their next game, to play a power directly between Catherine and Montezuma.

              Comment


              • #8
                Originally posted by Harrier UK
                Yawn!!!

                I guess you are a real crowd puller at parties.


                What point are you trying to make?
                The point is that the Civ4 world is almost entirely deterministic, and the only thing that can change 'random' events is player actions.

                Comment


                • #9
                  Harrier UK, you can see my previous post as a summary of the one by Badtz Maru if you don't want to read his post I figured explaining the system in full would be boring to many and time consuming to me, so I kept it short and very crude

                  For those people who did read it (and Badtz Maru himself), a few notes:

                  1) The game doesn't actually keep a database of a gazillion random numbers to use throughout the game, that would be a huge waste of memory. In reality it just takes the first random number using the existing seed (much like Badtz Maru explained) but it recalculates the seed immediately after that, so it's using a different seed every time it needs a random number. Of course the calculation to determine the new seed is simple and predictible and uses the old seed as basis, much as Badtz Maru explained above, but as long as the numbers are big enough and the player is not aware of the calculatation, it all seems random to him/her. This doesn't really change anything about Badtz Maru's explanation, but if you're gonna explain it, might as well do it right

                  2) The AI uses lots of random numbers to determines its behaviour, so statements like "AI will react to him the exact same way" aren't true -- in the same situtation the AI might react (slightly) differently if the order of random events is changed.

                  3) The game sometimes uses random numbers in places you wouldn't expect (AI routines being one place) and doesn't use randomness in places where you would expect it, hence my previous statement that I'm unsure what exactly affects the roll. This also makes it a bit hard to predict what you have to do to affect the seed or to keep it unchanged. Though if someone were to either study the SDK (but keep in mind that random rolls might take place outside the SDK as well) and/or do lots of experiments with reloading it wouldn't be too hard to figure this out for the most part.
                  Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                  Comment


                  • #10
                    Originally posted by Locutus
                    1) The game doesn't actually keep a database of a gazillion random numbers to use throughout the game, that would be a huge waste of memory. In reality it just takes the first random number using the existing seed (much like Badtz Maru explained) but it recalculates the seed immediately after that, so it's using a different seed every time it needs a random number. Of course the calculation to determine the new seed is simple and predictible and uses the old seed as basis, much as Badtz Maru explained above, but as long as the numbers are big enough and the player is not aware of the calculatation, it all seems random to him/her. This doesn't really change anything about Badtz Maru's explanation, but if you're gonna explain it, might as well do it right
                    I did explain it right, that it uses the results of the last calculation as the seed for the next one. I said that 'IN EFFECT' it's like a long list of predetermined rolls, because even though it's re-seeding with the results of the last calculation, it's always going to re-seed with the same result.

                    2) The AI uses lots of random numbers to determines its behaviour, so statements like "AI will react to him the exact same way" aren't true -- in the same situtation the AI might react (slightly) differently if the order of random events is changed.
                    You just disagreed then agreed with the same statement. If you do things exactly the same, and in the same order, the AI is going to get the same results for it's various random rolls that determine it's behavior. Only if you somehow change the order from the last save will the AI get different random results. If the AI 'randomly' determines that it's going to move a unit north instead of south, if you reload from immediately before that decision, it's always going to make the same choice.

                    Comment


                    • #11
                      So all of this (requiring university-level concepts even just to explain) was devised simply to stop people being able to get different results from reloading?

                      Gosh the lengths some developers will go to to restrict the personal liberty of their customers.

                      Comment


                      • #12
                        Originally posted by Son of David
                        So all of this (requiring university-level concepts even just to explain) was devised simply to stop people being able to get different results from reloading?

                        Gosh the lengths some developers will go to to restrict the personal liberty of their customers.
                        It's no great lengths, it's the standard way random numbers are generated in all computer games, it's just that some games save the original seed, while others create new ones. I think it's probably slightly more trouble for the game to generate a new seed upon reload than to just save the last one.

                        There are other benefits to this system as well. For instance, you can replay an entire game in exact detail if you have the original random seed and the player's turn history - you wouldn't need to save the AI's moves or combat results, because they would be the same. This could be used to save a replay using a fraction of the disk space.

                        I think Civ3 was the first Civ game to not automatically regenerate the seed upon reload, but they patched in the option to do so when people who had grown accustomed to being able to save before a battle then reload if the results didn't go their way complained.

                        Comment


                        • #13
                          If you really want an artist, go into world builder, get rid of the engineer and make an artist.

                          Comment


                          • #14
                            I've had a game where all I seemed to get was Great Artists - even though those were very unlikely to spawn. In another game Great Prophets kep popping up!

                            I consider which Great Person is spawned from the wonder when I choose which city to build a wonder in. That way I should be able to have some kind of control over it

                            \Skodkim

                            Comment


                            • #15
                              Thanks very much both badtz maru and locutus, i found your explanations very complete and informative. I figured if i did different unit moves it might affext the outcome, but i couldnt be bothered fiddling around with it to find what combination worked, something i will now give a try!

                              This has given me a much greater understanding of the way civ4 works, and i dont think any of it required university level maths, so thanks a lot. I honestly wasnt expecting a response so spot on, helpful and prompt.if only all posts on apolyton could be so well argued and unbiased!

                              thanks again for the great replies, i will definitely turn on generate random seed, i had seen that option but didnt understand its use.

                              Comment

                              Working...
                              X