Tuesday, June 10, 2014

Vast Numbers

From Malcolm Gladwell's David and Goliath: Underdogs, Misfits, and the Art of Battling Giants, giving a typical example of a teacher speaking about class size:

"My perfect number is 18 [students in a classroom].  That's enough bodies in a room that no one person needs to feel vulnerable, but everyone can feel important.  18 divides handily into groups of 2 or 3 or 6, all varying degrees of intimacy in and of themselves.  With 18 students, I can always get to each one of them when I need to.  24 is my second favourite number.  The extra six bodies make it even more likely that there will be a dissident among them, a rebel or two to challenge the status quo.  But the trade off with 24 is that it verges on having the energetic mass of an audience instead of a team.  Add six more of them to hit 30 bodies and we've weakened the energetic connections so far that even the most charismatic of teachers can't maintain the 'magic' all the time.  And what about the other direction?  Drop down six from the typical 18 bodies and we have the Last Supper, and that's the problem.  12 is small enough to fit around the holiday dinner table - too intimate for many high schoolers to protect their autonomy on the days when they need to, and too easily dominated by the bombast or bully - either of whom could be the teacher herself.  By the time we shrink to six bodies, there is no place to hide at all, and not enough diversity in thought or experience to add the richness that can come from numbers."

In context, Gladwell is discussing that class sizes have been statistically proven (read the book before you disagree) to have no influence whatsoever on a student's ability to succeed in school, whereas of course teachers have preferences that have much to do with what teachers want.  I want to use the passage, however, to highlight those two things that I've put into bold.  The situation that bullies dominate, and where the players lack enough diversity in experience.

Sunday I included an excerpt from the book about emergent behaviour that I don't think I'm going to expand.  I'm don't feel that I am required to go through and point out sentences that people feel were not important enough to read or assimilate in order to understand the point - I put the sentence there and I assume the reader will read IT as well as all the other sentences in the passage.

The sentence I refer to is this:  "To produce synthesis of this kind requires a vast number of interactions . . ."  Vast.  As in, more than the reader can comprehend.  Since I had several people, good and bad, express a misunderstanding about what the word vast means, who feel that 'emergent behaviour' can result from the dialogue of players around the table, I thought perhaps I would try to give a little better explanation here.  For the book itself, it doesn't specifically matter. The passage is there to convey information to people who are somewhat 'up' on the mathematics. For those people who are not 'up,' the passage can sit in the corner like an old shoe until the day the reader comes back to it again with greater understanding.

Look at the passage from teachers again.  Six children are not enough to produce diversity.  There's a number of reasons for this.  First, if there are only six, they are probably very homogeneous in upbringing and culture.  Remember, it took 24 for it to be likely that there's a 'rebel' in the group.  Six children also have a lot of power to influence or dominate each other, as there's no place to escape.  This means that the bully in 12 children is 665,280 times as powerful among only six.  I can prove that mathematically.  Among 12 students (factorial 12!) the number of possible connections between those students is 479,001,600.  Among six students (factorial 6!) the number of possible connections is only 720.  Don't pretend that this isn't the case.  This is a reality of permutations, like God not being able to make a triangle with three sides that add up to anything other than 180 degrees.  [Alexis is wrong in parts here]

The amount of influence that a strong child - or adult - has among a group of six people is incredible compared to the amount of power that same individual has in a larger classroom.  This means that among six children, or the five players of your game + you, if there is one person who's personality is even a little bit stronger than the others, the others are going to follow that strong personality.  That is something you need to be accept.

This also means that, regarding 'emergent behaviour' is concerned, the large proportion of individual, unique moments - far, far too many of the possible random elements - are going to be skewed by that individual pushing or pulling everyone else in one direction.  There won't be enough kinetic energy in the system, there will be too many interactions that will produce null effects, and a critical mass of aberrant behaviour won't be reached.  Not remotely in your dreams.  If you think otherwise, you're not reading the above with a clear head, you don't understand enough about math or people, and you really ought to finish your education before weighing in.

Now let's look at numbers.  Let's start with the most popular example of all time where it comes to talking about the vastness of numbers and the likelihood of emergent behaviour.  Let's talk about cards.

You have a deck of 52 cards.  From this deck, in a truly random fashion, you decide to draw two cards. Let's say, you get first get an 8 of clubs and then a 3 of diamonds.  You put the cards back.  You shuffle the deck.  The deck is truly shuffled.  The deck exists in a universe where there are no flaws on the cards that would make any one card physically different from another card.  What are your chances of once again drawing an 8 of clubs and a 3 of diamonds in the same order?

The answer:  52!  (The exclamation point is not there for emphasis.  The '!' indicates 52 factorial). [Turns out, Alexis has his head up his ass for a lot of this post's math.  Please disregard, and see the comment from Giordanisti below]

In ordinary numbers, 52! = 8.0658175 x 10 to the 67th power.  How many is that?  Well, in round figures, if you wrote each possible combination in very small print onto a hydrogen atom (assuming that were possible), then you would have to write the possibilities on enough hydrogen atoms to make a small galaxy.

And now we are talking about numbers vast enough to produce emergent behaviour.  Humans interacting with each other just doesn't amount to beans.  If all the atoms of all the objects and persons at the gaming table could break apart and interact with each other, then yes, we would have enough big numbers.  But that's not what's happening.

The dice, on the other hand, like cards, are producing incomprehensibly vast random associations without our having any awareness that this happening - because numbers as big as these are just beyond our ability to cope.  That is why, thankfully, we have math to cope for us.

I continue to be astounded by people who think that math isn't important.  Or that math is the last thing that should be used to describe or explain something, or that somehow the power of the will can be used to prove that math isn't the master of all things.  Even as I write this post, there are wholly ignorant readers who are shaking their heads, thinking that I've somehow pulled a fast one, or invented a straw man, because they're damned resistant against any idea that mere numbers could control everything they do or see. They sit here on this internet and spit on the math and spreadsheets I make for my world and yet they just don't get it.

They sit on the internet.

The internet.

And pooh pooh math.

That is an amazing demonstration of sheer stupidity.

I'm going to end this post with a favourite quote from Robert A. Heinlein, that appeared in Time Enough for Love:

"Anyone who cannot cope with mathematics is not fully human.  At best, he is a tolerable subhuman who has learned to wear his shoes, bathe, and not make messes in the house."

UPDATE:

It occurs to me just now, a few hours after writing the above post, that there is a way of demonstrating this difference between player personalities and their effects upon possible behaviours as compared to the dice.

Try an experiment.  Sit down with your players and have them fight out a combat where no dice are thrown. Instead, tell your players that each round, they should just "go with their gut" on whether or not they hit. Then, when it comes around to the monster's turn, as the DM the reader should do the same.

Having done it once, whatever the result, set everything back to the start and have the players do it again. Take note of any differences.  Try it a third time.  Now a fourth.  How long will it be before you start to see that things are becoming very boring and silly and repetitive, as certain players either predictably change things up or predictably go with the same decisions as before.

Now, have the combat with dice.  Then have the combat again, with dice.  Take note of any difference. Take particular note of how the DICE, and the players reacting to the dice, force unpredictable behaviours from your players.

This is the difference.  This is why player decisions do not produce emergent behaviour, whereas the dice do.

10 comments:

Oddbit said...

I have one handy link on my blog for one very good reason.

To help me cope with my need for math. As in, Some of those factorials are a bit big for easy head math.

Tim said...

I was in a "university-level" math class in high school, which taught us first-year university equivalent mathematics.
Along with being brutally difficult (though masochistically fun), it was a three person class. Only three students were willing to try really hard math.
The other two wanted to be engineers. I was just taking it because I liked math.
We were fortunate that nobody tried to dominate any discussion (though, as the weakest link, I mostly controlled the speed of the teaching), but I certainly noticed, compared to other classes of 15 or so students, the atmosphere was different: I usually went with my teacher's thoughts on subjects in larger classes, but I found myself repeatedly wanting to discuss every point in greater detail when nobody else was there to ask what the hell did anything mean. It was an excellent learning experience.

D&D does not encourage discussion enough: according to the books, your teacher (DM) is supposed to lay down the swill that you swallow. I think it was on this blog that I read about distinguishing between the parent who tells a child to mow the lawn properly, rather than the parent who tells a child to see how mowing the lawn another way works out. A player who expresses curiosity and creativity, who tests the systems and points out flaws, is an ally to the DM. I know that if those students in my math class become engineers who never question the logic of the machinery they use, they will be bad engineers.

If we aren't learning while we're doing it, what the hell is the point of anything?

Alexis Smolensk said...

Yes Tim, the lawn mowing this was on this blog:

"Like the 10-year-old kid proudly telling his father that "I've found a new way to mow the lawn, Dad!" before realizing the new way actually sucks and takes twice as long to do a crappier job, people HAVE to get rid of classes and then put them back, get rid of skills and then put them back, divide the thief into four separate classes before realizing all four are useless, dividing the mage, dividing the fighter, imposing alignment, removing alignment, redesigning experience, redesigning experience again, redesigning experience for a fifth time, throwing out experience, etc., etc."

You'll be happy to know that I made the same point as your comment in my upcoming book.

Giordanisti said...

I just want to pipe in with a couple math corrections. I think the thrust of the article, that larger groups have more emergent properties than smaller ones, and can avoid domination of individuals more easily, is spot on.

First, saying that there are vastly more permutations in larger groups is true, but only indirectly related the ability of individuals to dominate. The figure of 12! refers to the numbers of ways in which 12 objects can be ordered, such as possible shufflings of a 12-card deck. This number does not directly equate to the power of an individual in a group. Saying that there are 12! possible connections is a little misleading. I assume you mean connections between pairs of people, which is written as 12C2 (12 choose 2), and happens to be 66. This is compared to only 15 for 6C2.

Secondly, about your card example. Actually, the chance of drawing the same 2 cards out of a shuffled deck is 1/(52*51), or the chance of drawing the first (1/52) times the chance of drawing the second (1/51). This comes to 1 in 2,652, still large, but not quite as enormous. 52! refers to the number of possible shufflings of the entire deck. That is, the chance of shuffling a deck and having it come out in numerical order, hearts to spades to diamonds to clubs, is 1/52!, and is truly mind-boggling.

Anyway, still an excellent article, emergent behavior is fascinating!

Alexis Smolensk said...

Drawing two cards in the same order?

Human interactions do not only happen in pairs!!!!

But I won't quibble. I'm not a mathematician, and I resign myself to be corrected.

Blaine H. said...

I actually have done the experiment of running combat with and without dice on several occasions, mostly to pass the time while on long trips to conventions or in traffic jams while going from one place to the next. Having a ready supply of test subjects of a variety of ages over the years that are willing to take part in these thought experiments is a wonderful thing.

Needless to day, despite only having a sample size of about only 30 or so people over the years IRL, I can vouch that you do run into very predictable motions and actions from players. They rarely do act outside their safety zones and while this can lead to interesting RP maneuvering and politics, it is terrible for combat. Games that have tried to 'Diceless' tend to get stale rather quickly.

You need some form of random factor to keep people off balance. Some kind of frame work that takes certainty out of the equation. That is a wonderful thing too.

So yes, I would like to say that your statement that player decisions do not lead to emergent behavior can be at least collaborated from another source.

Steven said...

I really enjoyed this post. You've been on a roll lately. I spent a significant portion of Sunday going through your excel generators due to your post on Saturday.

However, I think you've exaggerated the degree of control one can have on a small group versus a large group. I think the power dynamic scales by n/(2^(n-1)) not 1/n! as you stated (n being the number of people). My analysis is below. I've written most of the formula's in excel format for your convenience should you find a way to use them.

Between any two people in the group there is one relationship. This can be represented by the number of unique lines one can draw between n dots. The formula for that is n choose 2, which I'll write (n,2).

1) (n,2) = n!/(2!(n-2)!) = n*(n-1)/2

Excel: (n = A1),
=COMBIN(A1,2)

For n=6 this is 15 relationships. For n=12 there are 66 relationships.

Now to characterize the relationships: In this model each person may be either dominant or subservient to another. This can be represented by drawing arrows on the lines of the relationship circle. An arrow can point in one of 2 directions so the possible number of power relation ships is 2^(n,2). This is 2^15 for n=6, and 2^66 for n=12. That's a huge ratio of the number of possible relations 2^51 (about 2 quadrillion times more combinations in a group of 12 vs 6). But number of possible relations doesn't tell you about the distribution of power. Many of these combinations may result in the same power structure just with different people in charge.

So I think the question "How likely is it that one person in a group will get everyone to defer to them?" is an appropriate measure of the power of a bully or leader. In terms of what I've outlined here the question becomes "What percentage of states have 1 person dominant to everyone?".

In these states n-1 arrows are all pointing toward 1 person. So the number of arrows which can point in an arbitrary direction is (n,2)-(n-1). This is actually the same as (n-1,2) so that's 2^(n-1,2) different ways to arrange the remaining arrows. If any person is capable of being the leader then there are n times more configurations. So of the 2^(n,2) possible configurations a bully represents n*2^(n-1,2) of them.

2) n*2^((n,2)-(n-1)) / 2^(n,2) = n * 2^(n,2)/2^(n,2) * 2^(-(n-1)) = n/2^(n-1)

Excel: (3 versions),
=A1/2^(A1-1)
=A1*2^(COMBIN(A1,2)-(A1-1))/ 2^COMBIN(A1,2)
=A1*2^(COMBIN(A1-1,2))/ 2^COMBIN(A1,2)

So for n=6, the chance of a (fully dominant) bully is 6/2^5 = 6/32 = 18.75% Whereas for n=12 the chance is ~0.59%.

Now I'll compare the relative power of a bully between groups of different sizes. It's simply the ratio between the chance of a bully (m will represent the larger group).

3)(n/2^(n-1)) / (m/2^(m-1)) = n/m *2^( (m-1) - (n-1) ) = n/m * 2^(m-n)

Excel: (m = A2),
=A1/A2 * 2^(A2-A1)

For n=6 and m=12 this equals 32. So a Bully is only 32 times more powerful in a group of 6 rather than 12. This is still significant but not nearly has much as 12!/6!.

I also worked out the general formula for the chance of at least k arbitrary ranked relationships occurring. By that I mean a definitive leader like above but also a definitive 2nd, 3rd, etc to whom everyone defers except the next highest ranked person.

The derivation is a bit more complicated but the formula is:

4) n!/(n-k)! * 2^((k^2-2nk+k)/2)

Excel: k = B1,
=FACT(A1)/FACT(A1-B1) * 2^((B1^2-2*A1*B1+B1)/2)

Note this formula is only valid for 0 < k <=n. Technically k=0 is a valid. It tells you, you have a 100% chance of at least 0 ordering. For n=6 and k=1 you get 6/32 like above. And for n=k=6 you get 6!/2^15. If you dig into this you may notice that when n-k <3 all the percentages are the same. This is because with 3 or fewer people the relationship is either definitively ranked 1,2,3 or it'll mimic rock-paper-scissors.

Alexis Smolensk said...

Fantastic, Steven.

Your comment is an excellent reason to leave the post up, though I am not hopelessly embarrassed about my math.

Thank you.

Alan Harrison said...

Does this comment belong here? Possibly not, but I think you'd find this article interesting: http://www.theverge.com/2014/7/1/5856718/no-mans-sky-preview

Alexis Smolensk said...

Apart from the fact that game designers should never be allowed to speak (we can plug them in and feed them with tubes), it looks interesting. Recently, there's been a rash of games that promise far, far more than they deliver, so I suspend my expectations until I hear people I know give me their impression.