Page 1 of 2

Dice: An independant thesis confirming their randomness

PostPosted: Thu Jul 24, 2008 6:49 am
by e_i_pi
After hearing a raft of complaints of the lacklustre dice everyone seems to be suffering from nowadays, I've completed an independant study on the dice. You'd think making a random number generator was easy right? Just use some function like Rand() or something?

WRONG!

It's actually a very complex process. First, we start with our equation, that strictly ensures true randomness (don't listen to what people say about computers not being able to generate true randomness - they're obviously not down with this equation):

Image

  • 'P' is the probability of a certain number coming up, 'r' stands for range (in our case, 1 to 6) and 't' for type (in our case, freemium or premium). Yes, premium membership does make a difference! Not only in this equation, but in other ways, as we shall discover later. Moving on...
  • 'g' is for game type, which has a major impact, hence it being on top of the line thingy. Ever wondered why you never win Escalating? Well those little gt and grs might be your answer ;)
  • That funny looking upside-down 'y' is actually the greek letter lambda. No, it has nothing to do with lambs. But it does make a difference when you play on Ancient Greece or Alexander's Empire, and to a lesser extent, World 2.1 (but only if you're holding Europe).
  • The 'o' with the cowlick is a miniature of AndyDufresne's avatar, were it Tin Tin. Which it isn't. But it's from a similar era, and it's easy to mix the two up. Anyhow, that's to ensure that the mods have a better chance of winning than your regular schmoes, perfectly sensible, since a mod that is a cook simply would not be taken seriously.
  • The pi symbol has nothing to do with me, alas, but may explain why I am a Major at this point in time, having once been a cook. In fact, I'm almost certain that if my name actually contained the pi symbol, I probably would be Conquerer. Or Captain. Some rank with a very geometric symbol anyhow. That's how maths works. Geometry.
  • r1 and r2 once again respresent range. r1 is your dice range, r2 is your opponents dice range. That's right, your opponents dice range is always twice yours. That goes for attacking and defending dice. Don't worry, it affects your opponent as much as it affects you.
  • The 'dV' is only there to throw people off. Many people think computers can't produce random numbers simply because that dV is sitting there. It in fact has no effect on the equation whatsoever which, up to that point, is entirely totally 100% random.

This equation will always produce a completely random result. Even when you lose 40 armies to 1. That's the way randomness works. Randomzor, the ancient Sumerian god of cubes, drew a name out of a hat, and it happened to be yours. Did you know that hat contains over six billion names? That's China's fault.

Anyhow...

This equation gets referenced by the CC website thousands of times every day. So many times in fact, that we can produce a distribution plot of results based on past dice rolls. Here's a plot of the past 3 days results:

Image

As we can see, several factors affect the distribution plot, namely Touch, Target, Release, and Time.

  • Time is the time we take to click the Attack button after deploying our armies. Clickable maps are a godsend for many players who were once plagued with unwinnable dice.
  • Target is the number we're aiming to get on our dice, as read from the lasers in our CD drives, transmitted through the internets, and into the CC servers. As you can see the average number people aim for is about 5.7. Most want all 6s. Some of us like to keep it real.
  • Touch is a measure of how hard we click the mouse button. PC-rage (and Mac-rage too) doesn't pay when it comes to playing CC.
  • Release is how long it takes for us to lift our finger off the mouse button after clicking it. For some reason this is measured on the same scale as Target. This is a mathematical enigma still unsolved to this day.

So we can see there is quite a lot that goes into our dice results. Why are there two graphs you ask? Well Graph #1 (the red one) is the plot for Freemiums, and Graph #2 (the black one) is Premiums. As you can see, Freemiums actually have a higher distribution of 4s, 5s, and 6s than Premiums. But that's only if they click the Attack button -150 milliseconds after hitting the Deploy button.

This plot can be hard for the layman to digest. So, to assist the community to understand the role the dice play in our games, and to settle, once and for all, the dispute about random dice, I have provided the easy-to-read graph below. Enjoy.

Image

Q.E.D.

Re: Dice: An independant thesis confirming their randomness

PostPosted: Thu Jul 24, 2008 7:20 am
by wakka
Brilliant :D

Re: Dice: An independant thesis confirming their randomness

PostPosted: Thu Jul 24, 2008 7:58 am
by cicero
Beautiful and brilliant.

Re: Dice: An independant thesis confirming their randomness

PostPosted: Thu Jul 24, 2008 8:15 am
by TaCktiX
Bogus math is insanely fun to pontificate on, especially when the first equation is truly a probability equation, but what means what being turned into something different entirely.

Re: Dice: An independant thesis confirming their randomness

PostPosted: Thu Jul 24, 2008 8:17 am
by MeDeFe
Wouldn't this work just as well?

Image

Re: Dice: An independant thesis confirming their randomness

PostPosted: Thu Jul 24, 2008 8:37 am
by e_i_pi
MeDeFe wrote:Wouldn't this work just as well?

Image


int getRandomNumber(ByVal SubscriptionType as String)* is what you're after.

* I cannot be held accountable for code in any language other than VB

Re: Dice: An independant thesis confirming their randomness

PostPosted: Thu Jul 24, 2008 8:39 am
by yeti_c
e_i_pi wrote:
MeDeFe wrote:Wouldn't this work just as well?

Image


int getRandomNumber(ByVal SubscriptionType as String)* is what you're after.

* I cannot be held accountable for code in any language other than VB


Not sure that's gonna return an int?! -> Although my VB is mega rusty!!!

C.

Re: Dice: An independant thesis confirming their randomness

PostPosted: Thu Jul 24, 2008 8:55 am
by jbrettlip
Awesome post....if CC had academy awards, this would be a certain nominee for best thread-starter of the year.

Re: Dice: An independant thesis confirming their randomness

PostPosted: Thu Jul 24, 2008 8:55 am
by TaCktiX
That'll return an int. Functions look almost identical in VB compared to Java and C++.

Re: Dice: An independant thesis confirming their randomness

PostPosted: Thu Jul 24, 2008 9:11 am
by yeti_c
TaCktiX wrote:That'll return an int. Functions look almost identical in VB compared to Java and C++.


Except for the keyword "Function" at the start?

But - I'm really querying the use of String - towards the end of the function!?

C.

Re: Dice: An independant thesis confirming their randomness

PostPosted: Thu Jul 24, 2008 9:22 am
by InkL0sed
yeti_c wrote:
TaCktiX wrote:That'll return an int. Functions look almost identical in VB compared to Java and C++.


Except for the keyword "Function" at the start?

But - I'm really querying the use of String - towards the end of the function!?

C.


Yeti, you obviously don't realize - all Strings in VB equal to 4 by default.

It helps when adding them.

In Java: "Yeti" + "_c" = "Yeti_c"
In VB: "Yeti" + "_c" = 8

Re: Dice: An independant thesis confirming their randomness

PostPosted: Thu Jul 24, 2008 9:23 am
by gdeangel
Bunch of wankers...

http://www.gamesbyemail.com/DiceGenerator

Call these guys and have them generate the dice file for this site. Tell random.org where they can stick their radio antennas.

:twisted:

Re: Dice: An independant thesis confirming their randomness

PostPosted: Thu Jul 24, 2008 9:44 am
by Robinette
I do see one problem that you did not account for...

In thread after thread people say that real dice perform differently, and the one variable still missing here is the time delay between rolling the dice, and the number being revealed...

So if CC would just add a time delay for the dice to be "in the air, and bouncing on the table" then I think all this fussing would stop... and if the dice could be a graphic rolling and bouncing across the screen then we could all SEE the dice being random.

Re: Dice: An independant thesis confirming their randomness

PostPosted: Thu Jul 24, 2008 9:46 am
by yeti_c
InkL0sed wrote:
yeti_c wrote:
TaCktiX wrote:That'll return an int. Functions look almost identical in VB compared to Java and C++.


Except for the keyword "Function" at the start?

But - I'm really querying the use of String - towards the end of the function!?

C.


Yeti, you obviously don't realize - all Strings in VB equal to 4 by default.

It helps when adding them.

In Java: "Yeti" + "_c" = "Yeti_c"
In VB: "Yeti" + "_c" = 8


I didn't know that at all!!!

Cheers for the heads up!!!

C.

Re: Dice: An independant thesis confirming their randomness

PostPosted: Thu Jul 24, 2008 10:09 am
by Timminz
My favourite part, is the square root of Batman.

Re: Dice: An independant thesis confirming their randomness

PostPosted: Thu Jul 24, 2008 10:25 am
by Thezzaruz
Robinette wrote:So if CC would just add a time delay for the dice to be "in the air, and bouncing on the table" then I think all this fussing would stop... and if the dice could be a graphic rolling and bouncing across the screen then we could all SEE the dice being random.


Add in some of these fuzzy dices and it will be great... :mrgreen:

Re: Dice: An independant thesis confirming their randomness

PostPosted: Thu Jul 24, 2008 3:36 pm
by Bones2484
Thank goodness I'm premium. I can roll a cow!

Re: Dice: An independant thesis confirming their randomness

PostPosted: Thu Jul 24, 2008 4:34 pm
by AndyDufresne
We should surely add this to our FAQ. ;)


--Andy

Re: Dice: An independant thesis confirming their randomness

PostPosted: Thu Jul 24, 2008 5:23 pm
by poo-maker
:lol: A fun read. :mrgreen:

e_i_pi wrote:
Image

Q.E.D.



:roll: lmao

Re: Dice: An independant thesis confirming their randomness

PostPosted: Thu Jul 24, 2008 6:29 pm
by e_i_pi
MeDeFe wrote:Wouldn't this work just as well?

Image


gdeangel wrote:Bunch of wankers...

http://www.gamesbyemail.com/DiceGenerator

Call these guys and have them generate the dice file for this site. Tell random.org where they can stick their radio antennas.

:twisted:


Scroll to the bottom of this page. Anyone notice a similarity between MeDeFe's code and gdeangels suggested dice roller?

Re: Dice: An independant thesis confirming their randomness

PostPosted: Thu Jul 24, 2008 9:59 pm
by fireedud
What does Q.E.D. stand for?

Re: Dice: An independant thesis confirming their randomness

PostPosted: Thu Jul 24, 2008 10:05 pm
by lancehoch
qed = quod erat demonstrandum = that which was to have been demonstrated

Re: Dice: An independant thesis confirming their randomness

PostPosted: Thu Jul 24, 2008 10:36 pm
by Ditocoaf
Grr... everyone here is talking all this fancy code stuff. The only kinds of code I know are GML, and TI-83+ "basic".

Re: Dice: An independant thesis confirming their randomness

PostPosted: Thu Jul 24, 2008 11:02 pm
by e_i_pi
Ditocoaf wrote:Grr... everyone here is talking all this fancy code stuff. The only kinds of code I know are GML, and TI-83+ "basic".


If you're looking for a random number generator in Basic...

10 PRINT "4"
20 GOTO 10

Re: Dice: An independant thesis confirming their randomness

PostPosted: Thu Jul 24, 2008 11:05 pm
by Ditocoaf
e_i_pi wrote:
Ditocoaf wrote:Grr... everyone here is talking all this fancy code stuff. The only kinds of code I know are GML, and TI-83+ "basic".


If you're looking for a random number generator in Basic...

10 PRINT "4"
20 GOTO 10

nonono... TI-83+ is a graphing calculator... what it calls "basic" code is just a list of commands that you can select from, that doesn't really resemble actual basic at all. Fun for programming games to play in math class, though.