Another Plea for the Innocent Numbers!

Agamemnus

Warlord
Joined
Jan 9, 2002
Messages
286
Location
Massachusetts, New England, USA
EDIT: Lots of errors here, including the wrong mechanism. See bottom for update.

The random number generator / relative strengths of units is messed up in CivIII.

HYPOTHESIS:

Currently, your Civ III random numbers for the battle seem to look like this (uncorroborated evidence):


R = [INT(RND * 60) ] * relative health of unit * 1.4 (percent increase)

R, an arbitrary variable for our random number, is a percenteage from 0% to 420%.

They are, however, unrealistic. A better random number looks like this:

R = INT(RND * 20)

R, an arbitrary variable for our random number, is a percenteage from 0 to 20%.

The difference, game terms, is that a battle will depend less on the random factor and more on relative strengths/hitpoints.

Let's make a battle round example, based on how the random number seems to fit. note: uncertain how rng is factored in, if anyone would offer clarification?

I will assume the following:

A) The relative health are also considered when an attack is made, and a random factor is increased correspondingly, multiplied by 1.4.. (Modern Armor with 1/5 hitpoint vs. Spearman with 5/5 would have a 7-fold decrease in random number extra decrease points, and spearman would have a 7-fold increase in extra defense points. Multiply by 1.4 for good measure.)

B) There are 2 random numbers, one for each side.

C) There are no negative increases when adding in the random factor.

D) The random factor is +-40% effective defense/offense strength.

Attacker = 10 attack, 1/5 HP
Defender = 3 defense (60% smaller D than A), 5/5 HP

R1 = [INT(RND * 60) ] * 1/5 * 1.4 (percent increase)
R2 = [INT(RND * 60) ] * 5 * 1.4 (percent increase)

Consider that we add R1 and R2 to the Attacker/Defender points during that round. Who wins?

Rounding our numbers, the range is anywhere from a 11-3 to a 10-13. So then, it is quite, quite possible for the Defender to win.

--------


Have you ever had something like a Modern Armor lose to a pikeman? I have! And it sucks. :(

Solution:
A) Re-institute FIREPOWER .
B) Change relative strengths of units. (such as Zouave's thread)
C) Reduce the random factor!
D) Delete what I said in A from the code, if it exists, and it seems to. (You never see a modern unit get damage from an ancient one unless it has significantly fewer hitpoints.


More Problems

1) Artillery bombardment. Large lose streaks (20 bombings/artillery poundings unsuccessful, for instance. Why? I don't know. Bad RNG. It shouldn't, *can't* occur like this. It seems that some enemy units are 'uber' and can't take any damage at all, even if you pound dozens of times on them.

2) More Attack/defense. It's fixed. If you don't lose a lot of hitpoints, or even none at all, and you should have, next time you attack/are attacked, you're bound to lose. Seems the RNG remembers it gave you too high of an random bonus, so it gives you a really low one next time.

Something else I wanted to say..
:confused:

Oh ya, anyone know how the actual lying, cheating, deceiving RNG mechanism works? :lol:

EDIT: Firaxis, Please Give Us a slider for random number effect!

:)
 
Originally posted by Agamemnus
Oh ya, anyone know how the actual lying, cheating, deceiving RNG mechanism works? :lol:

Use the misunderstood, seldom used, underrated search feature to find out :rolleyes:
 
Alternatively, learn a tiny bit about statistics. Then realize that the behavior of the PRNG is not out of line.
 
'Statistics' have nothing to do with it.

Unless you're counting my dead Modern Armor.

----------------

Oh, and one more thing I forgot.

There should be a slider to determine rng.
 
Nope, the question at hand is fundamentally a statistical one and can be answered in no other manner. That question (really two linked questions) being, "Is the PRNG 'fair', and does the battle system work as documented (refer to page 82 of your manual)?" You are simply assuming that the answer is "no" based on the fact that you observed some results you thought were unlikely, and then making up some malarkey off the top of your head without any evidence for it (as you yourself admitted at the top of your post).

As a matter of fact, let's look at your example. Assuming the battle system works as documented and that the PRNG is fair, then in order for the MA to win, it must achieve 5 consecutive victories. Its odds of winning a given round are 24/(24+2) assuming the spearman has no bonuses - in actual fact it will always have some bonus, usually a large one. Thus the MA's odds of winning 5 consecutive rounds are (24/26)^5, or about 67%. So the spearman would win about 1/3 of the battles. Now let's suppose the spearman was fortified (+50%) on a grassland (+10%), for an effective defense strength of 3.3. The MA's chances then become only about 53%, and the spearman will win almost as often as the MA. Thus the observed results (the spearman often wins such a fight) are totally consistent with the documented behavior.

The fault is in your ASSUMPTIONS about what results the documented battle system will generate - assumptions that have no grounding in fact.

Of course, if you'd bothered to do as Kilroy suggested, or even read the documentation on the battle system and THINK a little bit, you would have found this out in a great deal more detail.
 
well said beamup - about how often do we get someone coming here who didn't like a particular result of a battle and then trying to statistically prove the RNG is wrong - ask yourself a question - why would they skew the RNG? what would Firaxis gain from that?
 
I will counter your reply with saying:

A) I am talking about modded A/D, not basic.
B) The spearman / Modern Armor modded attack/defense shouldn't have a max (their max) and a min of something ridiculous like 0 or 1. Perhaps a min of 80%, but not 0 or 1. IF you randomly subtract their A/D and not randomly add it, that is.

EDIT: Yes, I did use the search and didn't find anything of real value. Just proves my attention span is short when looking over 11 pages of THREADS! :crazyeye:

EDIT: Andyo, my argument is that Firaxis is just randomizing everything without leaving a base value (or at least an acceptable one) to the units.

EDIT3: Due to technical reasons, my manual is unavailable currently. :scan:
 
Thanks, andyo.

Also, I found (took 2 minutes) a recent thread where this was extensively discussed, and where a couple of very nice tools for calculating combat outcome probabilities were posted.

Useful thread

Also, there have been extensive efforts made to empirically test the combat algorithims in a controlled, statistically relevant manner. Don't have time to find one of them right now, but the results I recall were all fully consistent with the algorithm working as documented with a fair PRNG.

Perhaps something on this subject should be added to the FAQ, particularly links to some of the relevant threads? They are certainly Frequently Asked Questions!

Edit: Your so-called "modded" A/D values are just something you made up out of thin air (giving you the benefit of the doubt and not concluding you pulled them out of your...) that have no relevance to anything at all. Also, I guess it would be a bit OT to comment that pretty much everybody knows what "My manual is unavailable" typically REALLY means.
 
Well there was a thread many months ago, in which someone made a map with units lined up beside eachother, and he did statistical annalysis of the units attacking. He came up with results that showed that the AI does not get an unfair advantage, and spearmen do not win against Modern Armor nearly as much as people here seem to complain.

One last thing. Why do people want to win with no effort, If you just want the combat system to be like, who ever has more tanks wins and we just subtract the doubles from the winning guys army, well you are playing the wrong game.
 
1) IT IS unavailable!
2) Civ3 is should not be a chance game.
3) Artillery = losing streaks that are nigh-impossible.
4) I looked at that tool and others like it and it seems that the total randomness you can have in a battle is just all the attack/defense points, like I said. And it shouldn't be that way.... as I said in the previous point.

I'm going to edit my post with that mechanism in mind.
 
Ok, one more time and tell me if I got it right:

The random number generator / relative strengths of units is messed up in CivIII.

Bottom-up battle rnd:

R = INT(RND * Attack/Defense)

This RND is, however, unrealistic. A better random number looks like this:

R = INT(RND * 20)

Or at least like this:

R = INT(RND * Attack/Defense * .2) + Attack/Defense * .8

R, an arbitrary variable for our random number, is a percenteage from 0 to 20%.

The difference, game terms, is that a battle will depend less on the random factor and more on LUCK.

Let's make a battle round example, based on how the random number seems to fit. note: uncertain how rng is factored in, if anyone would offer clarification?

I will assume the following:

A) There are 2 random numbers, one for each side.

B) The minimum rolled attack is 1, maximum is the units Attack/Defense.

Attacker = 10 attack
Defender = 4 modded defense

R1 = INT(RND * 10)
R2 = INT(RND * 4)

Who wins?

Rounding our numbers, the range is anywhere from a 1-4 to a 10-1. So then, it is quite, quite possible for the Defender to win. (although unlikely..)

--------


Have you ever had something like a Modern Armor lose to a pikeman? I have! And it sucks.

Solution:
A) Re-institute FIREPOWER .
B) Change relative strengths of units. (such as Zouave's mod)
C) Reduce the random factor!


More Problems

1) Artillery bombardment. Large lose streaks (20 bombings/artillery poundings unsuccessful, for instance. Why? I don't know. Bad RNG. It shouldn't, *can't* occur like this. It seems that some enemy units are 'uber' and can't take any damage at all, even if you pound dozens of times on them.

2) More Attack/defense. It's fixed. If you don't lose a lot of hitpoints, or even none at all, and you should have, next time you attack/are attacked, you're bound to lose. Seems the RNG remembers it gave you too high of an random bonus, so it gives you a really low one next time.

Please Give Us a slider for random number effect!
 
The RNG works correctly. This weekend I've been playing a variant devised by Arathorn, when at the time of first contact with another civ, you negotiate for what you can get (no per turn deals), and then declare war. That's it, Always War until the end of the game.

So far almost all of 5350 years now, I've been at war, against a constant stream of swordsmen, Mounted Warriors, Impis, Jaguar Warriors, bowmen, longbowmen, spearmen, pikemen, knights. I have also killed many more units than I have lost, probably because I've been extremely careful in positioning my forces, and not going into battles which are risky (such as sending a 1 or 2 HP elite against a defensive unit).

I've certainly lost a few battles that I think should be won, but when I consider the huge number of battles thus far, it's not surprising that I've had bad luck in a few. It's just those were unusual, and our brains are constructed to take notice of unusual events, specifically. But I would be hard pressed to remember specific events of where the battles went as expected, because there was nothing to notice, to remember.

Go play a game of Always War. Learn to handle your military.
 
OK, explanation from the beginning.

Suppose you have a unit of attack strength x attacking a unit of defense strength y (including all modifiers). The battle will be resolved as follows.

1. Generate pseudo-random number, z, lying between 0 and 1.
2. If z < x/(x+y), the defender loses 1 hit point. Otherwise the attacker loses 1 hit point.
3. Repeat from step 1 until one combatant is reduced to 0 hit points.

This is how it works. Some details may be different, but such things (like comparing z to y/(x+y) instead of x/(x+y)) would make no significant difference.
 
As one of my tutors once said: "if something goes wrong you'll tell 11 people, if something goes right, you'll tell 2 people". I think this explains why we always seem to hear of spearman beating tanks. I myself have never had this experience, (yet).
 
How is your pseudo-random number generated? If it is the same as I indicated, it works in nearly the same way. That is, you can always get a big enough number to kill the attacker.

Which just isn't realistic. Spearmen in my view are little animated bytes in a formation with nice bronze spears. Modern armor are little animated bytes that go 80 mph and can shoot large, really high explosive, fast projective, at distances of up to several miles, complete with tracking and aiming technology.
 
First, Beamup is right on target when explaining how the combat actually works. There's no cheating involved and no incorrect RNG. Agamemnus, you may argue that you personally think the randomness is too high, but that is a subjective view, and gives no reason to say that the random number generator is messed up. Whether the relative strengths of units is messed up is a valid opinion (which I disagree too though).
Have you ever had something like a Modern Armor lose to a pikeman? I have! And it sucks.
I've had a tank lose to a spearman. Yes I actually have once. It didn't suck at all, it would suck more to have such a technological lead and therefore being able to automatically win all battles without any risk, thought or planning.
Solution:
A) Re-institute FIREPOWER .
B) Change relative strengths of units. (such as Zouave's mod)
C) Reduce the random factor!
A) I see no reason for it.
B) If you want it, do it in the editor. I don't want it.
C) Same as B.
1) Artillery bombardment. Large lose streaks (20 bombings/artillery poundings unsuccessful, for instance. Why? I don't know. Bad RNG. It shouldn't, *can't* occur like this. It seems that some enemy units are 'uber' and can't take any damage at all, even if you pound dozens of times on them
The reason is not bad RNG, it simply happens because the artillery bombardment factor isn't very high compared to the city's defense factors. This is deliberately done by Firaxis. Many players think this sucks and have edited it. You should do that as well instead of blaming the RNG which fuctions correctly.
2) More Attack/defense. It's fixed. If you don't lose a lot of hitpoints, or even none at all, and you should have, next time you attack/are attacked, you're bound to lose. Seems the RNG remembers it gave you too high of an random bonus, so it gives you a really low one next time.
Now you really lost all my respect! This is merely unfounded superstition on your part, probably from seing a few such examples and forgetting all the times where you won several times in a row. Do you have any statistical proof, or is it merely your "feeling"? Have you bothered to statistically test this at all, and have you bothered to read the threads where people has done some serious testing and found that the RNG functions correctly?

I know the answer...
 
Whether there is too much random involved is something that can be discussed and is a matter of personal taste - and something that can be fixed in the editor by increasing the number of HP for the units.

But it was you who wrote:

"Artillery bombardment. Large lose streaks (20 bombings/artillery poundings unsuccessful, for instance. Why? I don't know. Bad RNG. It shouldn't, *can't* occur like this.", and:

"Seems the RNG remembers it gave you too high of an random bonus, so it gives you a really low one next time. "

So it seems to me that you wrote that it didn't function correctly... but it's good if you don't think so any longer ;)

Except for the fact that artillery effectivety is pretty low (and thus often fail), those quotes are blatantly wrong.
 
Originally posted by Agamemnus
How is your pseudo-random number generated? If it is the same as I indicated, it works in nearly the same way. That is, you can always get a big enough number to kill the attacker.

Which just isn't realistic. Spearmen in my view are little animated bytes in a formation with nice bronze spears. Modern armor are little animated bytes that go 80 mph and can shoot large, really high explosive, fast projective, at distances of up to several miles, complete with tracking and aiming technology.

I agree with you, it should never happen that an old age units like pickman beat a modern armor. It make no sens at all. Does the rng faulty or battle system ?

Artificial rng are crap ( especialy those which come with a 60$ game), they dont give thrue random number, it is a programm and if you know the programmation you will be able to predict the next supposidly random number, which make no sens. They look like random but they are not. Talk to a specialist in statistic ( teacher or scientist like me) and he will tell you exactly what i said. This is why they use numeroted ball in national lottery, if it was a programm then it could be hack and the supposidly random number predict. In a game like civ 3 they make the battle system to work on supposidly random number and that s why we see unrealistic result.

When an ai. is crippled with old units, just to bad he loose, that it. it mean this a.i. have no more ressource to built modern one or it mean you should play on higher level, but in no way the damn pickman should be able to even scratch the paint on modern armor. It is not so hard to understand even for fanboy.
 
Originally posted by Tassadar
I agree with you, it should never happen that an old age units like pickman beat a modern armor. It make no sens at all. Does the rng faulty or battle system ?
Personally I think its fine that the pikeman stands a chance, but that's discussed too many times now. It's pretty ignorant to question whether this is the fault of the rng though, when there exists tests that prove that the RNG creates the correct (according to the rules) results. But if you don't care about proof you may continue to be ignorant...
Artificial rng are crap ( especialy those which come with a 60$ game), they dont give thrue random number, it is a programm and if you know the programmation you will be able to predict the next supposidly random number, which make no sens. They look like random but they are not. Talk to a specialist in statistic ( teacher or scientist like me) and he will tell you exactly what i said. This is why they use numeroted ball in national lottery, if it was a programm then it could be hack and the supposidly random number predict. In a game like civ 3 they make the battle system to work on supposidly random number and that s why we see unrealistic result.
This is partly true and partly wrong. A RNG computes next number based on a seed, and computes the current number from the same seed, that's true, but a RNG can simulate true random numbers so good that you will be unable to spot any difference in a game like this. The RNG used in CIV3 has been tested and been confirmed to give good pseudo-random numbers that closely simulates real random numbers. The unrealistic results come from a pretty unrealistic battle model which is clearly described in the rules.
When an ai. is crippled with old units, just to bad he loose, that it. it mean this a.i. have no more ressource to built modern one or it mean you should play on higher level, but in no way the damn pickman should be able to even scratch the paint on modern armor. It is not so hard to understand even for fanboy.
But it is obviously hard for you to understand that other people have different preferences, is it? If I'm a fanboy, then its because I happen to think this is a fun game. Does that disqualify my opinion?
 
Back
Top Bottom