Battles aren't random, they're scripted

Midgard Eagle

Warlord
Joined
Feb 3, 2003
Messages
293
Location
Bergen, Norway
I know this has been mentioned before, but only as "AI Cheating" and "luck". I just wanted to state my opinion:

If this has been posted before, I'll delete the thread (honestly, if I can at least).

The "random" battle system isn't random; nor is it about luck or AI cheating: My theory is that the battle system runs on a script. For example, there's a script like

Defender gets hit
Attacker misses
Attacker hits
Defender misses
Defender misses
Attacker hits...

What makes me think this? Well, some times in battles I've watched the first few hits and I've gone "okay, now x is going to win"... and I've been right. For example (I don't know any, but I'm giving a fictional example), if the attacker hits twice and the defender misses once, for the attacker to hit again, I know the defender is going to hit and the defender is going to miss..

Crap example, but do you get the idea?

Now, if this holds true, I guess it's still up to "luck" to decide which script/part of the script to run, I guess. But I could of course be wrong, as I've only played like 5 or 6 games. What I'm sure of is that the AI doesn't give itself an advantage (like hitting enemies often and seldom taking hits).

Midgard Eagle
 
I've seen this too.
 
There is an element of pre-ordained-ness to the battles, but mainly due to the way the system is set up.

For example, if you win the first round it might seem like you "always" win the battle. That's not because it's scripted that way, but a function of the fact that once one of two regulars loses the first hp, it is at a substantial disadvantage to then win three of the next four rounds to win. The relatively low number of opportunities provided for by the low hit points makes it easy to predict what will happen after only one or two rounds.

(One is reminded of the fatuous statistic once quoted that a certain English football club never lost when its lead striker scored. Given the relative rarity of the times when a good defence will concede 2 or more goals, that is not that remarkable a statistic.)

And of course, with random seed saved, any single battle certainly is scripted.
 
This has always been a problem with random-number generators. To save computing power, the generator uses a relatively simple formula to come up with the "random" number. This creates more patterns than a sequence of truly random numbers.

However, the generator is set up so results always average out over a large number of trials.
 
Originally posted by Midgard Eagle
I know this has been mentioned before, but only as "AI Cheating" and "luck". I just wanted to state my opinion:

If this has been posted before, I'll delete the thread (honestly, if I can at least).

The "random" battle system isn't random; nor is it about luck or AI cheating: My theory is that the battle system runs on a script. For example, there's a script like

Defender gets hit
Attacker misses
Attacker hits
Defender misses
Defender misses
Attacker hits...

What makes me think this? Well, some times in battles I've watched the first few hits and I've gone "okay, now x is going to win"... and I've been right. For example (I don't know any, but I'm giving a fictional example), if the attacker hits twice and the defender misses once, for the attacker to hit again, I know the defender is going to hit and the defender is going to miss..

Crap example, but do you get the idea?

Now, if this holds true, I guess it's still up to "luck" to decide which script/part of the script to run, I guess. But I could of course be wrong, as I've only played like 5 or 6 games. What I'm sure of is that the AI doesn't give itself an advantage (like hitting enemies often and seldom taking hits).

Midgard Eagle

:rolleyes:

To use a quote from Civ: "Increase your medication!".

Combat in Civ3 is random. You see a pattern where there is none. And yes, there have been lots and lots of threads about this matter.
 
Hurricane I have been able to almost consistently predict battles once they get started.
 
The max is 5 hps for elite units. Thus the repeat of the same result through random result generation is high. If you try to test that on 10hps, the difference will be more obvious.
 
Originally posted by Hygro
Hurricane I have been able to almost consistently predict battles once they get started.
WOW, and you waste your power playing civilization. Why don't you run to Las Vegas where you get money out of predicting the roulette once it gets started? :rolleyes:
Oh, you've been thrown out after bankrupting the casinos...

Seriously though. You're the most supersticious person that's posted so far. The battles have been thourougly tested and proven to be an (almost) perfect simulation of totally random results. So any pattern you think you see is in your head - unless you really can predict the future or have mind powers that affect your computer.
 
Originally posted by DaveMcW
This has always been a problem with random-number generators. To save computing power, the generator uses a relatively simple formula to come up with the "random" number. This creates more patterns than a sequence of truly random numbers.

However, the generator is set up so results always average out over a large number of trials.
Dave, this is actually wrong, but its a common misconception. The human mind expects a list of random numbers to be more evenly distributed than real random numbers are. The civ RNG has been tested by people knowing what they're doing, and found that the RNG gives you results that closely follows truly random numbers. There's no more patterns to see in civ3 than if we had a 100% perfect random generator.
 
Originally posted by Hygro
Hurricane I have been able to almost consistently predict battles once they get started.
If you want to, we can test it. I, or some other may start a game and conduct some battles. He can then post the first outcome (or as many as you need), and then you can predict the rest of the results, then we'll get to see how close you get. I'll bet that in the long run you will be right about half the time.

Do you want to try?
 
Originally posted by TheNiceOne

Dave, this is actually wrong, but its a common misconception. The human mind expects a list of random numbers to be more evenly distributed than real random numbers are. The civ RNG has been tested by people knowing what they're doing, and found that the RNG gives you results that closely follows truly random numbers. There's no more patterns to see in civ3 than if we had a 100% perfect random generator.

TNO, I disagree and believe Dave is right. Random number generators do have patterns occuring in them that can be identified if you study them long enough. My father used to play Yahtzee (a dice rolling game if you are unaware of it) for hours (and I mean 3-4 hours every day for a couple of years!), but noticed that patterns came up in the random number generator (easier to spot in a dice game). After a period of time, he managed to pick up on these patterns (for example, spotting 3 sixes rolled in a row), and could predict what the next numbers in the RNG sequence was going to be after this. What was even more impressive, though, is that he managed to memorise these sequences, and didn't write them down. I think he managed to get one sequence of almost 100 dice rolls memorised - pretty impressive.

However, this sort of pattern recognition would be very difficult to spot in Civ, where random numbers are generated for all sorts of events (not just battles), and you are never sure of what 'value' is actually generated by the RNG (just the result).
 
@pompeynunn: If this was a 'dice roll' in a computer game, then I believe you (and it was impressive). If it were real dices: sorry I don't fall for that. You don't mention this info in your post...

Your second statement is very true: the RNG doesn't only apply for battles. Also goody huts, galley moves, etc...
 
Originally posted by pompeynunn
TNO, I disagree and believe Dave is right. Random number generators do have patterns occuring in them that can be identified if you study them long enough.
First, if the input to the RNG is a 32-bit number, then there will indeed be one big 4 billion numbers long pattern that will be repeated indentically again and again for every 4th billion number.

However, this is so long that no player will ever notice it. The question is if there can be repeating sub-patterns within this large pattern.

I have now searched hard and long for a thread I remember I read half a year ago or so, where some players had tested the raw output from the civ3 Rng and found it to behave as it should regarding streaks and patterns. I could not find the correct thread so my defense is weakened, but I found a few other interesting threads though.

Look at this and
this thread.
 
I've noticed something else. Try this:

Save the game just before a battle (without doing any trades, negotiations, etc.)

Now, do a battle without any trades and/or negotiations/treaties, then do one with any combination of the above. (like peace treatiies, alliences, etc.). The RNG -will change-.

Also, the AI does different things depending on your troop placement. The might sign alliences if you have an X number of troops in the feild (maybe they just feel threatened), or they might do something different if you leave your troops in their cities.
 
Originally posted by Chieftess
I've noticed something else. Try this:

Save the game just before a battle (without doing any trades, negotiations, etc.)

Now, do a battle without any trades and/or negotiations/treaties, then do one with any combination of the above. (like peace treatiies, alliences, etc.). The RNG -will change-.

You're so right about that. This is a good thing of course, but can also be used to mislead preserve random seed. Then again, if you do that, you only mislead yourself ;)
 
Originally posted by Chieftess
Save the game just before a battle (without doing any trades, negotiations, etc.)

Now, do a battle without any trades and/or negotiations/treaties, then do one with any combination of the above. (like peace treatiies, alliences, etc.). The RNG -will change-.
This is interesting. I've heard similar before, but never tested it myself (should be easy to find out exactly what kind of diplomacy that uses RNGs).

My first guess is that if the AI suggests a deal (either if they contact you or if you select "what would you need for the xxx"), then civ3 first calculates the minimum accepted trade value, and then adds something (it tries to ask for more than the minimum it will accept).
This added value may well be partly random. I.e., if you want to buy a tech and asks what the AI will need, it may suggest the minimum price + 5-10%, where the 5-10% is randomly selected.

This is just a guess though.
 
Originally posted by Midgard Eagle
The "random" battle system isn't random; nor is it about luck or AI cheating: My theory is that the battle system runs on a script. For example, there's a script like

Defender gets hit
Attacker misses
Attacker hits
Defender misses
Defender misses
Attacker hits...

Gamblers' Fallacy
http://info-pollution.com/evidence.htm

The human mind sees patterns where none exist. Just look at the clouds. Do you see the man with the big nose?
 
Originally posted by TheNiceOne

First, if the input to the RNG is a 32-bit number, then there will indeed be one big 4 billion numbers long pattern that will be repeated indentically again and again for every 4th billion number.

However, this is so long that no player will ever notice it. The question is if there can be repeating sub-patterns within this large pattern.

I have now searched hard and long for a thread I remember I read half a year ago or so, where some players had tested the raw output from the civ3 Rng and found it to behave as it should regarding streaks and patterns. I could not find the correct thread so my defense is weakened, but I found a few other interesting threads though.

Look at this and
this thread.

I stand by my assertion that patterns in RNGs can be detected - obviously for the Yahtzee game I quoted earlier (yes, it was a computer game, admittedly on my ancient ZX Spectrum many years ago!) the input to the RNG wasn't 32-bit, but somewhat less than this. The ZX Spectrum was only an 8-bit computer, so I am guessing that this limited the input to the RNG to 8-bit too. I agree that a 32-bit input to the RNG will not produce any repeatable pattern that could be identified by the user, but have we been told what the Civ 3 RNG uses as the input? I am not an expert on RNGs and the way they work, I can only state categorically that I have seen one computer program where the patterns could be recognised.

Of course, we are getting away from the original purpose of this post, which basically stated that the results of the battles were 'scripted' - no they aren't.
 
Back
Top Bottom