Random number generator bugged?

galahadba

Warlord
Joined
Apr 28, 2006
Messages
103
There is some problem with the random number generator in FFH, we get the same event over and over again, be it good or bad, in one game i even pilaged a mine becouse i got five events where the same mine colapsed... and didn't want to spend more money on it... in other game my city got 8 events giving it food becouse of a hunt... and not only the event is repeating, but the title where it happens too... it always on the same title.
It probably happens in other things too (combat for example), but is more dificult to notice as every turn the order of the units, the odds, etc change...

heck i played a test game at low difficulty where 7 goody huts in a row gave me a settler. and i lost 3 99.7 battles, one after the other. the RNG for this game is flaky at best. so i'll take your word that its not supposed to be this bad. still


It was take form the other post of the chaos marauder... so it is not just my impression. seen as every turn the rng reset with the same seed, so giving the same results... very strange...
 
there's an option to disable loading the same seed.
 
there's an option to disable loading the same seed.

Well if i am not wrong, this option is not for it... this option is for reloads... so in this turn you get x results... if you reload the game you get these x results again, if you disable this option you get the results re-roled, so it enables you to reload the game until you win a battle for example...

But this not mean that if you got x results in turn A you will get the same x results in turn B... and this is what is happening and this is a bug
 
yes I understood it. But since I doubt there is any way to fix this bug from us players, I suggested using this option, so when you get this buggy behaviour you can reload and obtain different results.
 
yes I understood it. But since I doubt there is any way to fix this bug from us players, I suggested using this option, so when you get this buggy behaviour you can reload and obtain different results.

Well the ideia is good, but if i enable random seed i will not resist the tentation of reloading to get a better result when i lose that batle with 70% or mode chance of winning :P
 
There is some problem with the random number generator in FFH, we get the same event over and over again, be it good or bad, in one game i even pilaged a mine becouse i got five events where the same mine colapsed... and didn't want to spend more money on it... in other game my city got 8 events giving it food becouse of a hunt... and not only the event is repeating, but the title where it happens too... it always on the same title.
It probably happens in other things too (combat for example), but is more dificult to notice as every turn the order of the units, the odds, etc change...




It was take form the other post of the chaos marauder... so it is not just my impression. seen as every turn the rng reset with the same seed, so giving the same results... very strange...

The bug isn't FfH, the bug is BTS. The event generator was inherated from BTS. I have played several BTS games where the same city gets hit by a hurricane every 5 turns or bandits raid the same field over and over again.
 
The bug isn't FfH, the bug is BTS. The event generator was inherated from BTS. I have played several BTS games where the same city gets hit by a hurricane every 5 turns or bandits raid the same field over and over again.

Well it can be, i haven't played BTS for some time now, and i have noticed it here, maybe becouse of the option that gives you more events... but well the question is, there is no way to solve? the engine does not alow to use any other Random number generator? or to fix this one? or is the kind of modification that only firaxis can do?
 
Well it can be, i haven't played BTS for some time now, and i have noticed it here, maybe becouse of the option that gives you more events... but well the question is, there is no way to solve? the engine does not alow to use any other Random number generator? or to fix this one? or is the kind of modification that only firaxis can do?

players can mod maybe 80% of the code, but , theres two diffrent levels to it
 
Perhaps it is just thre result of using the random number generator millions of times. Eventualy, a streak will make it appear stuck... it's just statistical.

Pre-2.030, I got a mining accident. After the first time, it happened again, and again, and again... for a total of 6 or 7 times during the game.

Post-2.030, I got 5+ freaks in a row without a promotion. They were mutated, but not one got a promo. Normally, no more than 2 in a row are promotionless. I think I was 7/9. Seems broken, but it is probably just the result of "rolling the dice" millions of time, and eventually hitting a seemingly impossible streak.
 
I have to agree that the problem seemed worse to me in .25 ESPECIALLY with the mine accidents you mentioned. I was very reluctant to build any mines because they all seemed to collapse over and over again or get poisonous gases in them or something.

Now, I have to say I haven't noticed the repetition as much in .30. Yes, some repeat, but I thought it might be better because there are many more events now.

I really have issues with the randomness of goodie huts though....
 
Well the ideia is good, but if i enable random seed i will not resist the tentation of reloading to get a better result when i lose that batle with 70% or mode chance of winning :P

you play to enjoy first of all. Winning is part of it (always loosing is no fun), if reloading every loss won't let you appreciate your victories, you won't do it.

note: the repetition of events is not a BtS problem, nor a RNG problem IMO.
 
I have had bandits raid the same farmed tile over and over again, which is consistent with the other posts here.

Has anyone discovered if destroying the farm and re-building it (or the mine, or whatever is being affected) will stop the repetition of the event?
 
Just had a thought.

I think there is a good possibilty that these events (or at least some of them) are linked to the crime rate in the city.

If the city has a high crime rate then it'll pick a random event to happen. Either there are very few random events programmed in at the moment, which would give a high probablity of the same one appearing multiple times ( in which case I'm sure more events will be added), OR the code that determines which event on which tile should happen is bugged, i.e. it always picks the first eventable tile, which would mean we see the same event on the same tile time and time again.

possible confirmation of this would be to build buildings that reduce the crime rate and watch the frequency of the events. Maybe someone clever with time on thier hands could create a '0 Crime Rate' building, which would negate all crime in the city to see what this does to events.
 
It's also worth pointing out that pseudo-random number generators ARE streaky by nature; a single number generated in isolation is very close to random but a series of them will not behave in a truly random manner. Getting round this requires devoting exponentially more resources to random number generation, which is why Soren's RNG as used in Civ4 can be streaky sometimes - the alternative would be a higher system requirement and slower gameplay for a slight benefit.
 
you play to enjoy first of all. Winning is part of it (always loosing is no fun), if reloading every loss won't let you appreciate your victories, you won't do it.

note: the repetition of events is not a BtS problem, nor a RNG problem IMO.

I am almost sure that the problem is with BTS (or possibly the vanila Civ IV random generator) and not something introduced by FfH. My friends and I have had similar problems with the events in BTS for months. I did not have FfH loaded on my new coputer until late December, so it could not have been causing.

Some of the events that repeat in BTS:

Hurricanes hit the same city over and over again.
The same mine will collapse several times.
The same field will be raided by bandits.

There are a few others that I have seen repeat 5+ times in a standard BTS game. The problem that people are complaining about with the FfH events seems to me very similar to the behavior that I have personally experienced in BTS.

That's not to say that this great Mod team can't fix the problem. I wouldn't put anything past them :)
 
It's also worth pointing out that pseudo-random number generators ARE streaky by nature; a single number generated in isolation is very close to random but a series of them will not behave in a truly random manner. Getting round this requires devoting exponentially more resources to random number generation, which is why Soren's RNG as used in Civ4 can be streaky sometimes - the alternative would be a higher system requirement and slower gameplay for a slight benefit.

listen to this man, he makes sense.

Also, for those touting the random seed as a fix, all this does is reset the RNG when you reload. Therefore it shouldn't make any difference in terms of streaks, or very little. Remember, if you do even one thing different in a reload, the RNG order is now offset and all other results will now be different. This is why you can actually 'cheat' the system when reloading by simply performing some other RNG action and THEN redoing your failed battle or whatever (random seed on reload isn't necessary).
 
There is some problem with the random number generator in FFH, we get the same event over and over again, be it good or bad, in one game i even pilaged a mine becouse i got five events where the same mine colapsed... and didn't want to spend more money on it... in other game my city got 8 events giving it food becouse of a hunt... and not only the event is repeating, but the title where it happens too... it always on the same title.
It probably happens in other things too (combat for example), but is more dificult to notice as every turn the order of the units, the odds, etc change...

I don't think it can be the RNG. It must have been called dozens of times between those repeating events, to deal with combat, barabarian spawn, AI choices... and while RNG aren't perfect, they are not that bad, they don't get stuck for the truly astonishing number of calls that would imply.

More likely, if there is a problem, it is with the event selection code : perhaps there is only one possible event in your situation, so it always get chosen, or perhaps there is a bug that affects the choice regardless of the RNG. For instance, what if a lazy programmer wrote the code to just check if a mine exists in the city radius (which presumably always looks at tiles in the same order), then collapse that mine... without rolling to choose which mine : it is always the first mine found by first subroutine that get collapsed !

But don't forget : even true random number generators are streaky, far more than people expect.
 
in true basic, if randomize is used more than once the code can become less random...
(randomize makes it so the rng isn't exactly at the same point everytime it runs)
 
listen to this man, he makes sense.

Also, for those touting the random seed as a fix, all this does is reset the RNG when you reload. Therefore it shouldn't make any difference in terms of streaks, or very little. Remember, if you do even one thing different in a reload, the RNG order is now offset and all other results will now be different. This is why you can actually 'cheat' the system when reloading by simply performing some other RNG action and THEN redoing your failed battle or whatever (random seed on reload isn't necessary).

Although it is true what he says in no way does that explain the behaviours depicted above. The numbers should be more than random enough to allow those repeating patterns to take place.
 
Although it is true what he says in no way does that explain the behaviours depicted above. The numbers should be more than random enough to allow those repeating patterns to take place.

if those patterns happen once every game then it isn't really random...
 
Back
Top Bottom