Conquer Club

The dice: an experiment

Talk about all things related to Conquer Club

Moderator: Community Team

Forum rules
Please read the community guidelines before posting.

The dice: an experiment

Postby MrsMad on Sat Jul 01, 2006 8:50 am

I decided, as I wanted to whoop ass at this game, to find out the exact chances of winning/losing armies when attacking. (ie so u know the best strategy - whether it's best to sit there building up armies or attack at every opportunity etc.). I'm a computer programmer, so I wrote a program whuich went through every combination of dice rolls to work out the statistics. Here's the results...

#(attacker) v (defender)
#3 dice v 2 dice
#2 off defender = 37%
#2 off attacker = 29%
#1 off each = 34%

#2 v 2
#2 off defender = 23%
#2 off attacker = 45%
#1 off each = 32%

#1 v 2
#1 off defender = 25%
#1 off attacker = 75%

#3 v 1
#1 off defender = 66%
#1 off attacker = 34%

At least, thats how it's SUPPOSED to be!

So, here's the thing...

I know that the dice are from random.org, but they appear incredibly biased towards the defender. There is NO WAY that when you attack with 3 dice versus 2, you only lose 2 armies only 29% of the time.

And there's no way that when attacking with 3 v 1 that you win 66% of the time.

Add a bit of code to the program which colllects the statistics on dice rolls (ie simular to the above). This would be very simple to do. Then post the percentages at the end of the month.

I am happy to retreat back into my cave if I am proved to be wrong :-)

MrsMad

ps. I know the random numbers are from random.org, but with an online game with tousdands of players based largely on the luck of the dice, it important to verify that it's accurate and truly random?
Corporal MrsMad
 
Posts: 11
Joined: Tue May 02, 2006 1:12 pm

Postby lackattack on Sat Jul 01, 2006 10:32 am

If you want to test the numbers you can write a greasemonkey script of sorts that will plug into your browser. Have it log the results and you can compare the probabilities to what you have calculated above.

I won't write the script because I'm confident the dice are random and my time is better spent on inproving the game.
User avatar
Corporal 1st Class lackattack
 
Posts: 6097
Joined: Sun Jan 01, 2006 10:34 pm
Location: Montreal, QC

Postby KoolBak on Sat Jul 01, 2006 10:36 am

Wow...MrsMad does more than just kick my ass.......coool!
"Gypsy told my fortune...she said that nothin showed...."

Neil Young....Like An Inca

AND:
riskllama wrote:Koolbak wins this thread.
User avatar
Private 1st Class KoolBak
 
Posts: 7351
Joined: Fri Feb 03, 2006 1:03 pm
Location: The beautiful Pacific Northwest

Postby MrsMad on Sun Jul 02, 2006 11:12 am

lackattack wrote:If you want to test the numbers you can write a greasemonkey script of sorts that will plug into your browser. Have it log the results and you can compare the probabilities to what you have calculated above.


Fair play. I'll have a bash at it.
Corporal MrsMad
 
Posts: 11
Joined: Tue May 02, 2006 1:12 pm

Postby Tr0y on Sun Jul 02, 2006 12:12 pm

A simple Greasemonkey script will not work because dice results are not present in the log. And even if they were... it would take a bunch ( 1000s ) of dice rolls to fairly determine if the dice are bias.

I remember reading that the dice file looks something like this...

D# D# A# A# A#
D# D# A# A# A#
D# D# A# A# A#

Where the # is the number on the dice.

A better random file would be...

# # # # # # # # # # # # #.... and so on.

The way the dice file is setup now is random, however a bias is easier to spot because they are separated into 'battles' ... If you just load the file with #s ... all people can say is there are more x's than y's ... but that is randomness for you.

Then attacker/defender bias becomes a less of an issue ( if an issue at all )...

Other things you can do to make the dice "more fair" would be measuring the distribution of each # and the frequency of them.
Keep generating #s till you get a set that most closely represents the expected values.

Of course unlikely things are going to happen. For example, rolling three 6s... But if you took a quarter an flipped it a 100 times, I'm pretty sure you will flip 8 heads/tails in a row.

If you want me to run tests to verify the "randomness" of the #s I can.
User avatar
Corporal Tr0y
 
Posts: 271
Joined: Mon Jan 23, 2006 1:26 pm
Location: Cary, NC

Postby Jota on Sun Jul 02, 2006 12:30 pm

So Greasemonkey has no way to save persistent data across pageviews?
User avatar
Sergeant 1st Class Jota
 
Posts: 634
Joined: Wed Mar 29, 2006 7:38 pm

Postby Pilate on Sun Jul 02, 2006 12:32 pm

The dice are not purely random in a statistical sense.

There is a 3.6 % chance (36 in 1000) of losing 3 "3 vs 1" rolls in a row. This is significantly slower than the actual chances in CC.
User avatar
Colonel Pilate
 
Posts: 382
Joined: Thu May 18, 2006 10:21 pm
Location: Toronto, Canada

Postby wacicha on Sun Jul 02, 2006 12:33 pm

dang Pilate you can do that kind of thinking and still kick my butt. good job
Image
User avatar
Major wacicha
 
Posts: 3988
Joined: Fri Jan 27, 2006 6:51 pm

Postby Jota on Sun Jul 02, 2006 12:38 pm

So you've finished doing a full statistical analysis of all die roll results over an extended period of time already, Pilate? Could you please publish your raw data and collection methods so that we can all confirm your conclusions?
User avatar
Sergeant 1st Class Jota
 
Posts: 634
Joined: Wed Mar 29, 2006 7:38 pm

Postby Mr.Catfish on Sun Jul 02, 2006 12:41 pm

"Never tell me the odds"; lol star wars
User avatar
Corporal Mr.Catfish
 
Posts: 6
Joined: Thu Jun 22, 2006 4:58 pm

Postby Tr0y on Sun Jul 02, 2006 12:42 pm

Well I was first going to respond... "It is not worth it"

But...

Then I started thinking about all those people who believe the dice are bad.

And I thought it would be funny to have a luck stat somewhere.... And maybe even a distribution of rolls as attacker.

e.g.
[ Wins x% | Losses x% ]

Rolls
1s [ # (#%) ]
2s [ # (#%) ]
3s [ # (#%) ]
4s [ # (#%) ]
5s [ # (#%) ]
6s [ # (#%) ]

So yea... I think I can do it... Dont know if I will or not... more of a fun stat...
User avatar
Corporal Tr0y
 
Posts: 271
Joined: Mon Jan 23, 2006 1:26 pm
Location: Cary, NC

Postby MrsMad on Sun Jul 02, 2006 12:54 pm

Currently working on it ;-)

Image
Corporal MrsMad
 
Posts: 11
Joined: Tue May 02, 2006 1:12 pm

Postby Tr0y on Sun Jul 02, 2006 12:58 pm

Sonava :shock:

*clicks close on photoshop... clicks no when asked to save luck gradient... [sigh]*

Looks like I have some competition.

Very well done :wink:

Did you use gm_getValue/gm_setValue to save data?
User avatar
Corporal Tr0y
 
Posts: 271
Joined: Mon Jan 23, 2006 1:26 pm
Location: Cary, NC

Postby MrsMad on Sun Jul 02, 2006 1:09 pm

lol *friendly competition*

I'll be taking the 'attacker rolls xxx defender rolls xx ' line and extracting the data from that then using those gm_getvalue and gm_setvalue. What u see there is just the html at the mo.

I'm thinking, it shouldnt be too difficult to create 2 different views. One for the current game and one for all the games u've played - each games data could be stored in a single setvalue string. Would be interesting just to see how lucky/unlucky u've been each game.
Corporal MrsMad
 
Posts: 11
Joined: Tue May 02, 2006 1:12 pm

Postby Pilate on Sun Jul 02, 2006 1:10 pm

Jota wrote:So you've finished doing a full statistical analysis of all die roll results over an extended period of time already, Pilate? Could you please publish your raw data and collection methods so that we can all confirm your conclusions?

I remember someone saying that the nice are not fully random, but they are as random as they can get.

For, 3 v 1 rolls. If you have 6 v1 and you attack up to three times (6v1, 5v1, 4v1) you should expect to NOT GAIN the territory one out of every 27.7 tries. I think the true value is significantly less than 27.7.

Actually, anyone can do a simple analysis.

Look at all the times you go three dice vs 1. You should expect to win 2 territories for every troop you lose. Make note of all the times that your success - troop lost ratio EXCEEDS 2. You'll notice that this happens very seldomly.

It's not random, but at least it's consistently not random. That's why i'm fine with the dice.
User avatar
Colonel Pilate
 
Posts: 382
Joined: Thu May 18, 2006 10:21 pm
Location: Toronto, Canada

Postby Pilate on Sun Jul 02, 2006 1:17 pm

wacicha wrote:dang Pilate you can do that kind of thinking and still kick my butt. good job


lololo, 9 years of schooling pays off.

I think I'm going to learn the math all over again when i go to teacher's college too.
User avatar
Colonel Pilate
 
Posts: 382
Joined: Thu May 18, 2006 10:21 pm
Location: Toronto, Canada

Postby joeyjordison on Sun Jul 02, 2006 1:43 pm

hey. still doin GCSE maths so i'm a long way behind u guys but i hav had a go at determining the likeliness of each dice combination using the method where u write the possible outcomes eg 1-6 and then the possible outcomes after those. so with 3 dice there are 3 columns looking something like this.

1-1
-2
-3
-4
-5
-6

only there is a third column and it is done for all the combinations. i then put in the fractions so 1/6 chance for each dice roll. my results showed pretty much the same as urs leading to the conclusion that the dice are biased to the defender.

please correct me if i hav gone wrong somewhere.
User avatar
Major joeyjordison
 
Posts: 1170
Joined: Wed Apr 19, 2006 9:10 am

Postby Jota on Sun Jul 02, 2006 1:54 pm

Pilate wrote:Actually, anyone can do a simple analysis.
Look at all the times you go three dice vs 1.


Yes, please do this. Until you have actually done it, using statistically consistent methods, you have no justification for making any claims about the dice either way.
User avatar
Sergeant 1st Class Jota
 
Posts: 634
Joined: Wed Mar 29, 2006 7:38 pm

Postby qeee1 on Sun Jul 02, 2006 1:57 pm

Joey... that post made no sense to me.

And I think you can make claims about the dice, without doing analysis, but should preface them by saying, "it seems to me" or something of the sort.

Anyway look forward to the results.
Frigidus wrote:but now that it's become relatively popular it's suffered the usual downturn in coolness.
User avatar
Colonel qeee1
 
Posts: 2904
Joined: Sun Feb 05, 2006 12:43 pm
Location: Ireland

Postby Pilate on Sun Jul 02, 2006 3:26 pm

Jota wrote:
Pilate wrote:Actually, anyone can do a simple analysis.
Look at all the times you go three dice vs 1.


Yes, please do this. Until you have actually done it, using statistically consistent methods, you have no justification for making any claims about the dice either way.


have you ever heard of gregor mendel? If he used your methods, we might not know about genes and alleles
User avatar
Colonel Pilate
 
Posts: 382
Joined: Thu May 18, 2006 10:21 pm
Location: Toronto, Canada

Postby Pedronicus on Mon Jul 03, 2006 1:33 pm

How long before enough data has been gathered to obtain a good gauge of dice?
Major Pedronicus
 
Posts: 2080
Joined: Tue Jan 24, 2006 2:42 pm
Location: Busy not shitting you....

Postby Jota on Mon Jul 03, 2006 1:40 pm

A few hundred rolls, maybe? There are formulas that will let you calculate your confidence level based on how many data you've accumulated, but I don't remember any of them off the top of my head.
User avatar
Sergeant 1st Class Jota
 
Posts: 634
Joined: Wed Mar 29, 2006 7:38 pm

Postby Pilate on Mon Jul 03, 2006 1:51 pm

no, a sample size of about 50 is definitely enough. i'm too lazy to check my stats textbook right now
User avatar
Colonel Pilate
 
Posts: 382
Joined: Thu May 18, 2006 10:21 pm
Location: Toronto, Canada

Postby AndyDufresne on Mon Jul 03, 2006 1:54 pm

I'd go for more than 50. More people would be willing to believe the results if there was a large test field.


--Andy
User avatar
Corporal 1st Class AndyDufresne
 
Posts: 24935
Joined: Fri Mar 03, 2006 8:22 pm
Location: A Banana Palm in Zihuatanejo

Postby MrsMad on Mon Jul 03, 2006 2:08 pm

I would imagine more like 1000 dice. But it's a guess.

luck analyzer coming soon.....

Image
Corporal MrsMad
 
Posts: 11
Joined: Tue May 02, 2006 1:12 pm

Next

Return to Conquer Club Discussion

Who is online

Users browsing this forum: No registered users