Combat odds worth rechecking?

vranasm

Deity
Joined
Feb 2, 2002
Messages
6,437
Location
Czech Rep.
Ok as you probably know karadoc we run the SG game in K-mod now.

i today played turnset with WC rush. Here is the report http://forums.civfanatics.com/showpost.php?p=11771027&postcount=108

the thing that catched my eye when playing was the streak of luck with WC's I won straight 4 fights on sub 40% odds.

Some would say luck and rng and anecdotal evidence. That is of course right.

I read somewhere long time ago that first strike (and most probably first strike immunity) get false battle odds.

Soo... The question is...were the odds displayed correctly and I was just mighty lucky (almost to the point that going to lottery would be worth the walk) or should you look into displayed combat odds a bit deeper?
 
0.4^4 = 0.0256. So you're still far away from lottery odds ;)
 
It's funny because I was going to make a post just like OP a few weeks ago but I assumed I had just really bad luck so I held myself. But now that someone made a post about it I'll also chime in.

I noticed the same thing in a K-mod game a few weeks ago (it was 2-3 versions older). Basically, I lost more than several battles 60-80% in my favor in a row (I was attacking). The common theme was my battles were against units with first strike. So I also thought to myself maybe the combat odds calculator doesn't take first strike into account.

We don't want to waste karadoc's valuable time on checking useless things, but I would also second that something looks fishy about combat odds against first strike units.

By the way, amazing work karadoc. AI is something developers always neglect in favor of more features. It's so nice to see someone (almost) fully focused on AI development. I hope you never stop working on it!
 
I'm pretty sure I haven't changed anything that would effect the accuracy of the combat odds calculation. So if there is something wrong with it in K-Mod, I expect that the same problem would exist in the base game (and probably in every other mod as well).

The accuracy of the odds is something that has been brought into question from time to time by many different people, but generally the consensus is that the odds actually are accurate; and it's just our weak little human minds that are making us think there might be a problem.

In general, people are not good at judging randomness; so I don't think this is something that we can work out just by playing the game -- and the formulas for calculating the odds are not completely straight-forward, so it isn't easy to just read the code to see if the calculation is right. -- So I figure the best way to get some piece of mind on this issue is to just gather a bunch of real data directly from the game, and then to see if the statistics work out the way we would expect them to.

...

I don't really want to spend a lot of time messing around with this, but in case anyone is interested, I've attached some data to look at. The data is the calculated odds and the real outcomes from every non-barbarian battle in three complete games. 3481 battles in total.

The left column is the sum of the combat odds and the withdrawal chance, and the right column is '1' if the attack survived, and '0' if the attacked died.

So take a look, and run some test on it or something. Tell me if you still think there is something wrong. We can get more data if we need it.
 

Attachments

So I figure the best way to get some piece of mind on this issue
Freudian slip? :)

Hi guys,

As you might know I'm the one who wrote the Combat Odds mod and I can tell you now I'm confident the odds you see in your game are accurate. Getting the formulas to work right when first strikes were involved was difficult but doable.

And actually the odds in the unmodded game were pretty accurate too. The exception was in some of the earliest versions (e.g. the release version) of civ4 vanilla where it was sometimes very obvious the odds were wrong because you could get more than 100%. Those inaccuracies were patched out though, and in fully patched BTS there are only two things which could be considered wrong in the combat odds:
1. Barb bree wins. Unlike in my combat odds mod, the game will lie to you about the odds of defeating the first barbarian (or more) on Prince level and below.
2. Siege units in some very specific circumstances show higher odds of surviving than they really have.

Both of these were addressed in ACO though, and so K-Mod will not have these errors.

If you notice things that seem odd about the results you're getting in battles, you can put it down to human fallibility and, as karadoc suggested, our being terrible at judging randomness. In particular, a common mistake for people to make is to think a real random sequence has more streaks than it ought to.
As an aside,
Spoiler :
one of my favourite anecdotes on this topic is one I read about...
A statistics professor set his students a homework task where they were required to toss a coin 100 times and record the results on a piece of paper. However he had half of the students not toss a coin at all and just fake the results as best they could. Their aim was to make the faked results look as real as possible. So he didn't know which students did which, he had some method like whether their mother was born in an odd or even year.
Anyway, the professor once he had collected and examined those assignments he was able to tell with remarkable accuracy which results were real and which were faked. The reason was that the people who were making up their results had bias towards avoiding streaks. I can't remember the exact maths of it but for 100 coin tosses, it's something like 1 streak of 11 tails or heads which can be expected more than half the time, which for the people making up their results they probably wouldn't think looked random.:crazyeye:

Also, I have a fairly old thread on this topic which is well worth a read if you're still skeptical.
Combat Odds and RNG
In particular, I describe better the points 1 and 2 I made above (I didn't want to write all that stuff again just for this post).

If you still have any questions about the combat odds or any doubts feel free to ask or comment and I'll do my best to help you.
 
Thanks for the info. I never had the time to write a program to process the file Karadoc provided but I'll take your word about human fallibility.
 
Back
Top Bottom