Civ IV combat odds are rigged.

It is most certainly valid to pose the question.

Clearly some level of unknown increases the suspense and the fun, but the extreme rolls can negate that in a hurry.

Loosing at 97% is even more annoying when you have seen the source code and know how rigged the combat odds are :lol:

I changed it in my mod so that combat odds below 5% / above 95% are 0% / 100%. If you attack at 0% you will never will, but still do damage to enemy unit. and if you attack at 100% you will always win, but might take damage.

My guess is that they made combat random in CIV4 to reduce snowball effects and create some kind of artificial challenge since the tactical AI is rather poor. For example in CIV5 combat is a lot more deterministic and that allows much more to abuse tactical AI.
 
You know theres a difference between 'rigged' and being wrong right? Even if problems did arise from what your talking about it would only be wrong, not rigged.....
I changed it in my mod so that combat odds below 5% / above 95% are 0% / 100%.
So to solve perceived rigging you added actual rigging? ..... Genius! :lol:
If anything, it's up to the people who blindly believe anything they see ("oh look combat odds, they must be right") to come up with some hard evidence.
Theres a lot of confidence in the odds, and for good reasons. Many tests have been carried out and the code has been torn through. A few issues have been found, but they have been tiny in the grand scheme of things and i'm not sure if any actually remain, a modder (PieceOfMind) even wet to the trouble of improving the combat odds to cover the health distribution of a winning unit (Advanced Combat Odds).
In short your going to have to prove this 'rigging', though it should be no problem for you as you've found it in the code right?
 
getCombatOdds uses the average of chanceFirstStrikes, while CvUnit::setCombatUnit uses a Distribution GC.getGameINLINE().getSorenRandNum(chanceFirstStrikes() + 1, "First Strike"). If anything, it's up to the people who blindly believe anything they see ("oh look combat odds, they must be right") to come up with some hard evidence.

I think if you wanted to create combat odds that aren't rigged, you code only one combatodds function and use it both to display odds and calculate combat, instead of coding two different functions.
I'd first like to reiterate what I said:
Obviously the code for calculating the odds is different to the code for the actual combat, because those are two completely different tasks.

Now, to spell it out a bit more clearly, the code for displaying the odds cannot use the same methods that determine the outcome of combat, because the code that determines the outcome of combat does not at any point specify the probability of any one team winning. The combat is a simulation which involves many different input numbers, and which uses many random numbers from the random number generator. The output of that simulation is the final HP of each unit, the XP gained, and whether or not they live or die, etc. At no time during this simulation does it specify or calculate what the probability of winning is, and so this code cannot be used to display the combat odds.

The odds could in principle be estimated by having the game create hundreds (or thousands) of identical temporary units so that it could execute the combat code on each of them and record the outcome each time to build up statistics of what the probability of winning is. Such a system would be possible, and could be fairly accurate. But it would still be just an approximation, and it would also be painfully slow. (Keep in mind that the AI makes heavy use of these combat odds when making its decisions.)

In a card game such as poker, one doesn't calculate the probability of getting a flush by simply playing the game. The calculation of the odds is quite different to process of actually playing the game. Similarly for calculating the odds of winning a lottery with a number picking machine, and similarly with combat in Civilization 4. The calculation of the combat odds is not the same process as the combat itself.

I am not the author of the combat odds calculation, so I'm not going to guarantee that it is completely accurate, but I will say that the arguments you've put forward against it are invalid. And I can also say that I've personally looked through the code which calculates the odds to verify that it makes statistical sense, that I've carried out some cursory statistical tests inside the actual game to verify that the results are not completely wrong.

Here is a thread in which I respond to someone questioning the combat odds calculation in K-Mod, and directly below my post if a post by the person who actually wrote the calculation. I think your characterisation of us "blindly believing anything you see" is insulting and false, and that the burden of proof is on you to show that the odds are inaccurate in the way that you claim.
 
Loosing at 97% is even more annoying when you have seen the source code and know how rigged the combat odds are :lol:

I changed it in my mod so that combat odds below 5% / above 95% are 0% / 100%. If you attack at 0% you will never will, but still do damage to enemy unit. and if you attack at 100% you will always win, but might take damage.


Annoying to lose a 97% battle?
I don't really understand this. You do realize you have a three in hundred chance to lose one such battle? And the more battles you fight, the higher the chances are to lose one of them... it's practically inevitable to lose a 99% battle playing CivIV!

I always wonder about persons making this claim... do they play much CivIV at all? Personally I've lost a couple of >99% battles this year only. And I frequently lose 98% battles (But then, I have also won 1-3% battles - so it evens out, I presume). How to lose all those high-percentage battles, you say? Siege, siege and more siege. Get (almost) all your attacking battles into the 95-99.9% area. You will lose some of them no matter what!

Also, I'll tell you what would be boring... knowing beforehand that you'll win/lose the battle. That would be the end of my civilization-playing days for sure...

No, I'm not an expert in mathematics, but I do have a basic understanding of statistics. If you had the same, you wouldn't call losing a 97% battle in CivIV "rigged."

[hope I didn't sound to "harsh" or "judgmental" here, but really - do expect to lose battles playing CivIV, seriously...]




Yours Sincerely

Kjotleik of Norway :)
 
I was under the impression that displayed odds survived a fairly rigorous statistical exercise, though I don't remember well enough. That doesn't, of course, mean that the underlying code will look clean though.

(But then, I have also won 1-3% battles - so it evens out, I presume)

Doubtful, if only because it is seldom rational to attack at such odds and AI behavior is very different from that of humans fighting AI or human-human stuff.

Also, I'll tell you what would be boring... knowing beforehand that you'll win/lose the battle. That would be the end of my civilization-playing days for sure...

I assert bias. You've never played such a game. It could easily be better, and considering that the VAST majority of the civ IV experience entails EXACTLY such careful planning at a high level, there is precedent for it IE most of the rest of the game.

It's a bit silly to say that "deterministic combat is boring", but then to turn around and say "well, for 90% of the game I can cause results functionally similar to deterministic combat by using other mechanics". Siege warfare isn't pure deterministic combat; but when you're fighting "mostly 95% odds or higher battles" and can afford to lose 10+ of them in a row and still have an easy winning outcome, it's so close as to be irrelevant (and you can reach such a scenario through entirely deterministic mechanics). How would your strategy materially change in such a scenario? If you would otherwise execute the same strategy, why is it more "fun" to do the same thing?

I'm a bit flabbergasted at the overwhelming bias against deterministic combat in an overwhelmingly deterministic game, that is frequently hailed for its deterministic features as having depth and sound strategy.
 
I'm a bit flabbergasted at the overwhelming bias against deterministic combat in an overwhelmingly deterministic game, that is frequently hailed for its deterministic features as having depth and sound strategy.

I think the issue is that then there's no way to "catch up". In the game we have now, spammed Longbows+Cats can hold off Riflemen and Infantry so your civ can survive and you have some potential to catch up... if it was predetermined you should just ragequit as soon as the first AI has Macemen.
 
Now, to spell it out a bit more clearly, the code for displaying the odds cannot use the same methods that determine the outcome of combat, because the code that determines the outcome of combat does not at any point specify the probability of any one team winning.
I don't know what you mean with "specify the probability". The code isn't created randomly at runtime. Even the Probability space is finite. Just calculate the possibility of each possible outcome and add them up (well you have to assume that the RNG is perfect, but the rigged combatodds function assumes that aswell). You don't know if a unit will win all combatrounds, but you know the probability for it.

It might use a bit of CPU time, there are probably about 1000 different scenarios for a combat yes, but atleast you get combatodds that aren't rigged. Or you could replace the combat system with one that has a fairly easy probability function. Like the Combat system in civ1. would be super easy to have combat odds for it that aren't rigged. Or completly get rid of randomness in combat like TMIT suggests. That would also remove rigged combatodds.

And I can also say that I've personally looked through the code which calculates the odds to verify that it makes statistical sense, that I've carried out some cursory statistical tests inside the actual game to verify that the results are not completely wrong.
yes, very true. But when the true probability is 98% (making some basic assumptions like no numerical errors and perfect RNG) and the game displays 96% (making the same basic assumtions, just using an arbitrary probability function) instead of 98%, that is rigged. Rigged doesn't mean completly wrong.
 
yes, very true. But when the true probability is 98% (making some basic assumptions like no numerical errors and perfect RNG) and the game displays 96% (making the same basic assumtions, just using an arbitrary probability function) instead of 98%, that is rigged. Rigged doesn't mean completly wrong.

What DO you mean by rigged then? It looks like your definition of rigged is "the displayed odds are not the true odds, which means I cannot make a fully informed choice". Is this accurate?

Which is all fine and good (and to a certain extent accurate in the base game), except the common usage of "rigged" that I (and I assume most?) comprehend is "the game purposely creates an outcome regardless of the input." Some examples would be on Settler when you get auto-wins against barbs regardless of the combat engine results, or your own example of making what should be a 95% chance of victory and turning it into an auto-win. You are using the word "rigged" in a completely different way than I would.

In the way that I would define "rigged" above, the combat odds are NOT rigged. You essentially agreed with karadoc on this point above, you just continued by saying that you would use a different word than the rest of us.
 
I don't really understand the code involved or anything about RNG's - this makes the game more fun (or realistic) for me I suppose. If I am attacking with a unit (or units) that I just absolutely cannot live without (they just HAVE to win...), then I 'save' before I attack. If I lose, I will occasionally reload. For me, problem solved.
 
Sun Tzu once said : "In planning of war, if the enemy have 1.000 chariots, bring 10.000 spearmen."
Though keep in mind that Abraham Lincoln is quoted saying:
"The thing about quotes on the internet is that you cannot confirm their validity."

and Buddha... well, read my sig ;)
 
I'd first like to reiterate what I said:

I am not the author of the combat odds calculation, so I'm not going to guarantee that it is completely accurate, but I will say that the arguments you've put forward against it are invalid. And I can also say that I've personally looked through the code which calculates the odds to verify that it makes statistical sense, that I've carried out some cursory statistical tests inside the actual game to verify that the results are not completely wrong.

IIRC, community member DeepO wrote the odds calculation, after the original vanilla release had none, leaving most players bewildered and frustrated by the combat system. Occasional complaints about unlucky RNG strings today are nothing compared to back then.
 
I think the issue is that then there's no way to "catch up". In the game we have now, spammed Longbows+Cats can hold off Riflemen and Infantry so your civ can survive and you have some potential to catch up... if it was predetermined you should just ragequit as soon as the first AI has Macemen.

That's not how it works though, since you can use collateral or weak unit ---> strong unti still. Or defensive bonuses.

Even with RNG combat, you're not going to win if you're tiny and backwards.

I don't really understand the code involved or anything about RNG's - this makes the game more fun (or realistic) for me I suppose. If I am attacking with a unit (or units) that I just absolutely cannot live without (they just HAVE to win...), then I 'save' before I attack. If I lose, I will occasionally reload. For me, problem solved.

I'm not sure how selectively deterministic combat favoring one side is a better model than deterministic combat :lol:. As I pointed out, true RNG-based combat isn't realistic whatsoever. Rather, it's being used as an oversimplified model where difficult-to-predict events or enemy choices occur. However, what you (and really nobody) still haven't done is give a reason other than preference that deterministic combat would actually be worse than RNG combat. Preference is a valid reason of course...or would be to a player who's thoroughly explored both models. It doesn't make sense to use it when arguing straight theory.

IIRC, community member DeepO wrote the odds calculation, after the original vanilla release had none, leaving most players bewildered and frustrated by the combat system. Occasional complaints about unlucky RNG strings today are nothing compared to back then.

I did not know that. That's quite interesting haha.
 
[Doubtful, if only because it is seldom rational to attack at such odds and AI behavior is very different from that of humans fighting AI or human-human stuff.]

[I assert bias. You've never played such a game. It could easily be better, and considering that the VAST majority of the civ IV experience entails EXACTLY such careful planning at a high level, there is precedent for it IE most of the rest of the game.]

[It's a bit silly to say that "deterministic combat is boring", but then to turn around and say "well, for 90% of the game I can cause results functionally similar to deterministic combat by using other mechanics". Siege warfare isn't pure deterministic combat; but when you're fighting "mostly 95% odds or higher battles" and can afford to lose 10+ of them in a row and still have an easy winning outcome, it's so close as to be irrelevant (and you can reach such a scenario through entirely deterministic mechanics). How would your strategy materially change in such a scenario? If you would otherwise execute the same strategy, why is it more "fun" to do the same thing?]



Ever since I joined CFC I have always held your opinions in high regard. I still do, actually. But on this matter I don't agree with you. It is as simple as that.

The really low-odds wins have been defensive ones... leaving one damaged unit alone after having taken out a dangerous opposing unit that "absolutely needed to be stopped."

Well, I will admit to bias. I'd be lying if I didn't. But after reading through the "What if combat wasn't RNG dependent" thread, I do understand a bit more where you come from on this issue. I'm not convinced, though. From my understanding of it; your complaint is not really the mid- to end-game, but the beginning. You yourself has written that RNG-combat resembles deterministic once siege comes into play (if I understand you correctly).

If I get your point you say that deterministic combat doesn't remove/reduce the chance to lose a war. It just makes it easier to know the outcome of single battles. As for the war itself, that depends on the strengths/numbers of units and their deployment (at the doorstep/in the fog of war/retreated in home territory etc., etc.). This will still make the results from the war itself unknown (or "random," in the eyes of the person without full information).

Having scouted the surrounding lands well, you would know if you could survive early-game under deterministic combat rules. But you couldn't be 100% sure under RNG-combat rules. The latter is, in my book, interesting in itself. And knowing for sure that you will die if you're boxed in, with Montezuma's huge stack inbound is not anywhere near fun in my opinion. I'll be happy to take my heroic last stand to try to get that 10% win that would secure survival for "one more turn..."

Balanced starting-positions? I don't see the fun in that either (except in multiplayer competitive games, that is).

Resources that deplete is one interesting aspect I would love to test, actually. Each mined resource could have a random number of "uses" (like between 20-50 units worth). And if you could make farmed corn/wheat/rice yield between 3-7 food per turn depending on their location on the map (to simulate good/bad weather), that would peak my curiosity as well. It could very well be random. Not for a single farm itself, but for an area (like a small continent having it's own "weather" that turn).

Once I reach the stage where siege comes into play, I'm always happy that I managed to survive the dangerous early years (against barbs and trigger-happy AI's). Maybe this is silly, but I do value the randomness of a single battle; even if I am certain I will win the war. My guess is that you don't. And that's fine by me. I just happen to think "my way" is better, that's all. The "fun" comes from "not knowing" the outcome of single battles.

Now, if I had tried a game with deterministic combat, I could better make up my mind about its merits. As I have not, I can only assume how it would feel. And per today my assumption is that it would be boring. Am I wrong? Perhaps, but I guess I won't get the opportunity to find out...



Yours Sincerely

Kjotleik of Norway :)
 
The really low-odds wins have been defensive ones... leaving one damaged unit alone after having taken out a dangerous opposing unit that "absolutely needed to be stopped."

I'm just saying that we as players do a better job of avoiding terrible odds battles. I've won some fights at the minimum odds possible to display though. Saying it "evens" out isn't accurate because a string of far too few outcomes on a statistical basis has a chance of being game-deciding right now.

You yourself has written that RNG-combat resembles deterministic once siege comes into play (if I understand you correctly).

Yes, that is correct. I feel deterministic outcomes would significantly improve the early game while not altering late game strategy much.

Having scouted the surrounding lands well, you would know if you could survive early-game under deterministic combat rules.

You'd need near-perfect espionage on someone to attain that, to the point of seeing what they're producing and what proportion of troops are moving to each location being attacked.

And knowing for sure that you will die if you're boxed in, with Montezuma's huge stack inbound is not anywhere near fun in my opinion. I'll be happy to take my heroic last stand to try to get that 10% win that would secure survival for "one more turn..."

One more turn maybe, but if it's the kind of thing where you have a 10% chance to survive, you aren't going to recover even if you win those battles :lol:. Interestingly, this particular disadvantage is a result of one other random factor (spawns) and deterministic ones otherwise.

Balanced starting-positions? I don't see the fun in that either (except in multiplayer competitive games, that is).

I believe some maps should have it and some not, with some bias towards having them relatively balanced...or at least normalized to the point where you don't auto-lose. There are some starts where against competent players or deity AI you can't do anything at all (3 cities or less, no strategic resources), unless you want to use Inca or Mali 24/7.

On a side note, while I feel these mechanics are too RNG-driven too early, I feel the opposite about the AI; as it stands right now peace treaties, war bribes, and other manipulations make the one thing in the game that absolutely should not be deterministic (other players) far too much so. I would gladly trade more random (though hopefully still viable) choices out of the AI in return for a deterministic combat model. Just as you feel a known combat outcome is dull, I find spamming peace treaties, war bribes, and knowing based on XML that the AI will act as it does is dull. If it were truly a well-written, dynamic AI, I'd be able to look at those XML or even the code and still not be 100% sure at any moment exactly what it would do.

I'll see what I can do about digging up the actual mod; I'll probably need to find it in drop box if it still exists now.

As for the current RNG outcomes, nobody's been able to prove deviation from expected results over large sample sizes except for a rarely-occurring catapult/siege bug that got patched out a while back (basically, the siege would fight an extra round past what it should have under some rare circumstances, but the disiplayed odds didn't factor that extra round).
 
Top Bottom