Events in BOTM

Assuming that the AI does exactly the same things as well (or is that what you mean by players/computers)? Or does each player get their own set of "random" numbers?
A pseudo random number generator works from a single truly random seed to create a series of seemingly random numbers. So jesusin is right on the mark. The 'dice' is rolled once, and the seed gotten determines the whole sequence of numbers. So if two players did *exactly* the same things every time, their games would be identical.

So were does that initial number come from? Since the computer can't randomly come up with one, doesn't it have to use a number that it already "knows"? And to make that unique for each game, some time number would seem to make sense ...
Sources for random seeds is a whole research domain. Going by the system clock is an oft-used solution that works well for most applications.

It strikes me that these are not random numbers but scrambled numbers ... like a word scramble game. You start with a real word, then scramble the letters. The resultant nonsense word may appear like a random collection of letters, but is it the product of a seed word and a scrambling algorithm. I am guessing that the goal is to generate a number within some range (maybe 1 to 100), so what we have is a scrambled sequence of the numbers between 1 and 100 (or maybe a scramble sequence of 1 to 1 milllion that then is mapped onto 1 to 100 ... ), rather than a random generation of a number between 1 and 100.

But a sufficiently complex algorithm can appear grossly random.
You are very right. The whole purpose of a pseudo-random number generator produces a sequence of numbers that should for all purposes seem random even though it isn't. :)
 
I'm not a computer programmer or anything near. My experience came from playing simulation games as a kid. We used 10 and 20 sided die depending on what we were playing. Every time there was an "event" that needed an outcome determined, you rolled the die. It was truly "random". Why would it be hard to "program" a die roll?
 
It was truly "random". Why would it be hard to "program" a die roll?
It wouldn't be hard at all, if that's what you really wanted. But it isn't, for much the same reasons that have been given in this thread for why we keep the "new random seed on reload" checkbox unchecked. True randomness is seldom a desired feature.
 
I'm a programmer by trade, true randomness require a mechnical process. (e.g. Powerball / various side die from D&D / etc.)

What RNG do is two fold:
1. They have a mathemical function that based on the last number (between zero inclusive & one exclusive) generates a new number (also between zero inclusive & one exclusive)
2. Something that will pass as random once is used as the starting seed. (A classic example is what milisecond is it? That tends to work well because of the dificulty of trying to start anything at an exact microsecond.)

The zero to one limitation normally doesn't matter; if you want a six sided die result you multiply the PRN given and add one. If you want to similate two six sided dice roll (monopoly) you do that to two RNGs and sum the result. The normally is because there are some specific numbers in various algorithms that are particularly bad to multiply by; in the java standard random function all numbers that are 2 ^ N -1 (N any positive int) are the worst choices to multiply by.

What does matter is predictability of the results (can a human determine a pattern?) & speed of computations (is the user going to complain about combat taking too long?)

One reported patern in Civ 4 vanilla was: When I make a stack attack, my first unit always loses no matter how good the odds are and the rest normally win even at bad odds.
 
I'm not a computer programmer or anything near. My experience came from playing simulation games as a kid. We used 10 and 20 sided die depending on what we were playing. Every time there was an "event" that needed an outcome determined, you rolled the die. It was truly "random". Why would it be hard to "program" a die roll?
Is a die roll in fact a random process? I think that or the outcome of a coin flip is entirely deterministic ... and predictable if you knew ALL of the starting parameters (positions, forces) and properites of the struck surfaces. Since we don't, the result is unpredictable, if not random. Now perhaps what we mean by our common notion of random is an unpredicable outcome with equal probability among the possibilites.

So we play with a UNG (unpredictable) rather than an RNG ... and maybe we have programmed a die roll after all? :lol:

dV
 
A singer sung a song in my cathedral while I tried a cultural game. This fact produced a GA that otherwise would have cost me 3000GPP. It WAS a big deal. I don't want a cultural award depend on such a thing. I don't want the all-times-worldwide-cultural-HOF-best-ever-date to depend on such a thing.
Then don't use it, just disband it. Problem solved. ;)
In a test game, I had a slave revolt in my capital (is it always the capital?) that simply would not end. With the capital shut down, I could not generate the 10 gold to make it go away by sacrificing a population head, and I quit the game in disgust.
Ouch. Maybe jesusin will share some of his blessings with you.
Let's not mix apples & oranges please? I think most if not all people have no problem with a monthly WOTM. I think the main problem is limited staff time & resources that prevents running three xOTM every month, and the poll & submission statistics supported that if there was one series that should be cut back to a less frequent schedule it was WOTM.

All that is completely irrelevant to this discussion.
Well, I humbly beg to differ with you. One of the main arguments against Warlords was that BtS has the same alterations from Vanilla plus other things. Random Events are one of the plus other things. Hence, nerfing Random Events brings you closer to Warlords. Many, though not all of course, of the other new things that BtS offers happen way after jesusin will achieve his cultural victory (e.g., corporations). Now I happen to know that jesusin does not play Warlords, hence his only point of reference is comparing Vanilla and Bts. So I suggest that those who want to nerf Random Events just play WOTM.

Still think it's irrelevant?
 
Assuming that the AI does exactly the same things as well (or is that what you mean by players/computers)? Or does each player get their own set of "random" numbers?

So were does that initial number come from? Since the computer can't randomly come up with one, doesn't it have to use a number that it already "knows"? And to make that unique for each game, some time number would seem to make sense ...

dV

I do some simulation work with random number generators so I'll try to answer these questions.

A typical random number generator is an algorithm which produces a list of billions of unpredictable, non-repeating numbers (say each has 64bits) which you interpret as numbers from 0 to 1 for a probability. Each number serves as the seed that generates the next number in the list so the initial seed chooses a starting point in the list which will eventually loop around to the starting point if it runs long enough. Given a half decent number generator this won't be an issue for a game of civilization.

The initial seed is either input manually (if you are interested in repeating a series of numbers through a code to verify that the latest bit of refactoring really doesn't change the results) or taken from a call to the computer's clock. I am almost certain that the CIV code calls the clock to seed the number generator at some point during map creation. The seed can be saved to continue using the list upon reload or a new call to the clock can be made when the game is reloaded. (GOTM and HOF games continue from the saved seed)

If you knew the generator algorithm (which I believe is accessible but I've never looked) and the exact time (to the millisecond) the clock was checked to set the seed, you could in theory follow the random number generator. This would take a lot of knowledge of the AI position to understand how many numbers are used during each turn and is probably not possible in games with barbarians. It would require knowledge of factors like the number of mines worked each turn (which use the generator to determine if resources are popped) and the number of fogged squares which could generate barbarians. Even with the initial seed and generator algorithm, this isn't really possible. If you exactly repeat your actions in a game, the AI will 'randomly' do the same things and the number generator will reach the same point in the list of unpredictable numbers but it wouldn't be feasible to know what the next set of random numbers will be for your turn.

The algorithms are checked to avoid patterns such as high numbers are more likely than average to follow low numbers and most generators from the last 20 years avoid any obvious patterns. A pattern like a low number is more likely than average to follow another low number would give more clusters of high or low numbers than one would expect randomly. A bad number generator could do this and make it more likely to win low odds battles or lose high odds battles. Some early generators had problems like this but it really isn't an issue with commonly used algorithms. I know the original C# random number generator was pretty weak (had a low periodicity) but the CIV code contains its own, better generator for portability to Macs. (If you really need a LARGE list of pseudo-random numbers, you are going to eventually run into correlation and repetition issues with any algorithm.)

It is possible but unlikely that each AI has a separate generator (really a separate initial seed to the same generator - I can't think of any reason to include 18 different generator algorithms in the game). With the same algorithm, each AI would start at a different point on the same list of numbers. They could start very close to each other and use the same numbers from the list. Reusing numbers probably wouldn't be an issue in the game (they would be used for different purposes) but is usually frowned upon and really wouldn't help make the game any more random. (I work with multi-cpu simulations where one cpu serves as the number generator for all the other cpus to avoid any possibility that multiple cpus start reusing parts of the number list. This could really skew statistics if your multiple simulations are really repeats of each other.)
 
@RTB: Not sure I'm following this, but does that mean each time the RNG calls the list, it goes further along the list? In other words, as soon as any RNG event makes it different, that game is different than another game played from the same seed?
 
@RTB: Not sure I'm following this, but does that mean each time the RNG calls the list, it goes further along the list? In other words, as soon as any RNG event makes it different, that game is different than another game played from the same seed?

That's right. We start the GOTM with the same seed and my scout zigs while yours zags. This results in a different number of fogged tiles and a different number of calls to the RNG list to check for barbarian generation during the IBT. The RNG is at different points in the list at the start of the AI's next turn.

Our games have now diverged even if we make all the same choices from that point forward. The AI will make different build and research choices, barbarians and animals will pop up in different locations and Monty will make an early DOW which screws up one of our attempts to build the Pyramids while the other is set to race up the tech tree.

Edit:
I actually like this randomness. It would be boring if everyone who tried a CS sling succeeded or failed in a GOTM. What if there was less randomness and a CS sling automatically succeeded against certain sets of leaders at high levels? The randomness adds tension to the game which I think is the source of the fun. The game loses a lot of its excitement when you reach the point where random events really aren't going to affect the outcome and its just a matter of efficiently micromanaging your way to victory.

Some random events which give huge military advantages have been removed in the HOF Mod and some (like the free artist from cathedrals) probably should. The ice sculpture isn't such an issue for me. (Do you want to build an iceball city to try for the event?). Everyone has a different line on how large random events should be. (free pastures or destroyed pastures in the early game? slave revolts? hurricanes destroying buildings? free golden age when attacked?) I would vote for allowing most of the events in the BOTM.
 
I do some simulation work with random number generators so I'll try to answer these questions.
Thanks RTB, for the expert explanation that I was hoping for.

Some random events which give huge military advantages have been removed in the HOF Mod and some (like the free artist from cathedrals) probably should. The ice sculpture isn't such an issue (do you want to build an iceball city to try for the event?). Everyone has a different line on how large random events should be. (free pastures or destroyed pastures in the early game? slave revolts? hurricanes destroying buildings? free golden age when attacked?) I would vote for allowing most of the events in the BOTM.
Now that the myth that different players might be playing the same BOTM with a different subset of random events (which would introduce bias and differential "at-risk status", an unacceptable situation) has been busted, I think the random events question now boils down to whether any events that we all agree are gamebreaking and need to be removed still remain in the BOTM.

So the more productive further discussion (if any) on this subject perhaps should focus on a particular random event that someone sees as worthy of banning (rather than bashing the whole random events concept).

dV
 
the only thread I am aware of that is comprehensive of every random event present in BtS is the one Ori wrote awhile ago, and that was linked to in this thread already.

The most powerful ones were actually disabled by Firaxis before launch, but left in in case anyone wanted to reactivate them...the next tier I believe was already disabled by the HOF mod.
 
The random events make the game much more fun which is the most important thing about playing, IMO. Removing random factors from the game is futile. If you lose a few 95% odd combats early in the game it can put you out of contention just as much as any of these random events. Same thing with an AI declaring war on you early. I never liked the idea of removing most of the goody huts from the map, either. Randomness is there and it makes the game more fun. I never thought the GOTM was about seeing who was the best civ player but more about sharing our stories and strategies. The random events make reading about people's games more interesting. If a less skilled player manages to win an award by luck then I'm happy for them.

Then again, my opinion probably doesn't matter because I haven't submitted all that many GOTM's over the years, although I've always enjoyed it when I did take part.
 
I'm thinking that the really powerful ones turned off by firaxis were proof of concept.
And showed empathicaly: yes they work.
And those particular ones are too powerful to be fun so no point in developing a pro-civ event & anti-civ event for every civ.
 
I'm not a computer programmer or anything near. My experience came from playing simulation games as a kid. We used 10 and 20 sided die depending on what we were playing. Every time there was an "event" that needed an outcome determined, you rolled the die. It was truly "random". Why would it be hard to "program" a die roll?

It's hard because computers are deterministic and the starting conditions are known exactly. Thus the results are knowable in advance. A human rolling a dice is also deterministic, but in general you can't measure the starting conditions, so the results are not predictable, and so appear random.

A pseudo-random number generator used by a computer is a deterministic algorithm that is unpredictable (unless you work at it), and so appears random. They are also chosen for other desirable statistical properties, like uniform probability, and a long time between the sequence returning to its start point and reproducing itself. Different applications require different properties of a PRNG, but between decades of cryptographic and Monte-Carlo simulation research needs, we've worked most of these out.

Another way to reduce randomness in Civ4 would be to use different PRNGs for different classes of event, e.g. combat, GH, AI decisions, RE, barb spawn. All you need is a different seed for each of these to start from. This means that differences in barb-spawning from the order people do their initial explorations don't directly affect AI decisions, etc. It would also mean that the combat results can't be affected by triggering a different RNG sequence, such as by moving a unit in the previous turn to change the amount of fog on the map.
 
Another way to reduce randomness in Civ4 would be to use different PRNGs for different classes of event, e.g. combat, GH, AI decisions, RE, barb spawn. All you need is a different seed for each of these to start from. This means that differences in barb-spawning from the order people do their initial explorations don't directly affect AI decisions, etc. It would also mean that the combat results can't be affected by triggering a different RNG sequence, such as by moving a unit in the previous turn to change the amount of fog on the map.

Hey, that would be great! The GH would give the same result to all players.

That means that:
- People like Shillen, looking for fun, would be happier
- People like me, looking for comparability, would be happier
 
About RNG, not only RE:
I was playing a game for my EQM/Warlord quest, i've found a wonderful starting spot, nice land around and a successful warrior rush to a neighbour.
Also, some luck with GHs. The game was goin' well, research a bit low 'cause overexpansion, but nothing i cant recover in few turns.
As usual i was aiming for the CS sling, even at warlord difficulty i find this is the best way to use the Oracle.
Useless to say, a very safe date for Oracle is usually 800 BC, but often 500 or late.
Asoka built the Oracle in 1360 BC! No marble in his territory, only a good production capital. 1300 BC is considered a safe date on Monarch, unless there is some industrious Leader around, but 1360 is absolutely out of the blue at warlord, and by Asoka.
I abandoned the game, still shocked.
 
Some random events which give huge military advantages have been removed in the HOF Mod and some (like the free artist from cathedrals) probably should.

Is that any bigger in its effect than the usual randomness in great person generation, where you may have set yourself up for an 80% chance of an artist, but then you randomly get a scientist or a prophet instead?

(Great explanation btw)
 
Is that any bigger in its effect than the usual randomness in great person generation, where you may have set yourself up for an 80% chance of an artist, but then you randomly get a scientist or a prophet instead?

(Great explanation btw)

IMHO, the great person generation is under the players control. You can generate great people with 100% probability under most circumstances. You choose to build wonders in great person generating cities or to run additional specialists to generate a great person faster. I often take these risks but I know the risk.

The free artist from cathedral event only occurs in cultural games and great artist generation is a big part of a cultural victory. Its a bigger issue for the hall of fame than the game of the month. An free great artist will probably save 5-8 turns in a normal speed victory. In the GOTM, everyone who was trying for a cultural victory has a chance at the event and I can just shrug my shoulders. In the HOF, every competitive cultural victory category will eventually be won by a well played game which also contains free artists popping up. It would be frustrating to play a game for 10 hours and have no chance at a good finish due to a random event which can't or doesn't occur in that game. The HOF has an even larger submission bias than the GOTM so lucky BTS events are going to occur in most submissions.


Aside:
Personally, I think there should a special "event master" award for the first player to use a free golden age to speed a cultural victory in a GOTM. You must intentionally antagonize an AI while generating culture, get a free golden age when the AI DOWs, and win faster due to the accelerated great artist production in the golden age. I look forward to your spoiler.
 
Back
Top Bottom