Showing posts with label math. Show all posts
Showing posts with label math. Show all posts

Monday, March 9, 2020

Star Trek, RPG Dice, and STEAM

A few weeks ago I saw an interesting Venn diagram posted on Twitter by someone named Christine Liu:

In hindsight, I guess it's not surprising to see so much overlap between science and art... after all, the education acronym STEAM (science, technology, engineering, art, and math) includes them all.  I just enjoy seeing these intersections, and I guess I've tried to make the central region of this diagram a focal point of this blog, too.

(Sometime, ask me about a talk I heard at a conference a while ago about how astronomer Johannes Kepler got the idea for one of his eponymous "laws" of planetary motion.  The answer, I say in Buzzfeed listicle mode, will surprise you!)

Today, though, my thoughts about this STEAMy synergy turn to the world of dice.  If you're coming here from the RPG world, you know all about them.  You may know that a two-handed sword does 3d6 damage against large opponents, and no speed factors will tell you otherwise.  You may have been inducted into the illustrious Order of the d30.  You may have scratched your head about the fairness of some very non-Platonic Zocchi dice.

But did you know about how Vulcans use them?

Almost 30 years ago, Star Trek: The Next Generation brought back Leonard Nimoy as Spock.  That episode may have been a bit underwhelming in some ways, but it showed some interesting aspects of alien cultures that fans had been hungering to see for years (well... this fan, anyway, he said pointing two thumbs inward).

In the episode, a Romulan kid shows Spock a set of little dice-like blocks that supposedly convey "the syllabic nucleus of the Vulcan language."  In an episode of Star Trek: Picard from just a few weeks ago, those dice showed up on the desk of a Vulcan admiral.  Since we never got a good look at them, I always just assumed they were either cubes or four-sided dreidels (since Nimoy had a history of using elements of his Orthodox Jewish heritage in creating bits of Vulcan culture).

But no!  An enterprising (heh? heh?) fan found pictures of the actual props from 1991 and posted some detailed shots...

Click to enlarge... it's only logical
There are some shapes here that RPG veterans have probably not seen:
  1. Okay, we do have one bog-standard D&D die, an 8-sided octahedron (d8) on the left of the image above, with slightly sawed-off corners.
  2. There's also a square pyramid (5 sides), at the top, which I don't think is useful for dice-rolling at any aspect ratio.
  3. But then we come to the truncated octahedron (14 sides), on the bottom.  Essentially keep sawing off those corners of the d8 until the triangular faces erode into hexagons.  A Google image search for "d14" seems to bring up a few manufacturers that use this shape, but it's not employed by many games.
  4. Lastly, the one that surprised me the most: the rhombicuboctahedron (26 sides) on the right!  There's kind of an architectural mini-majesty to that shape, which I don't think I'd ever taken notice of before.  No less than Johannes Kepler himself gave it that Greek-derived monster of a name, but if you were around in the 1980s you may remember it as Rubik's Snake.
However, if you were around during the ancient Han dynasty, you may remember either the 14-sided one or the 26-sided one (with 8 of its corners minimized to give it 18 rounder sides) as dice for the Chinese board game Liubo.  Some random examples from Google image search...

Anyway, 8 + 5 + 14 + 26... I guess there must be 53 unique syllables in the Vulcan language.

Where was I going with this?  Oh, the ART of it all.  It's kind of amazing how these uniquely deterministic 3D geometries can be used (hacked?!) to give our brains randomized input that assists in our creative endeavors, be they games or divination or actual art pieces.  They all have the capacity to instill wonder, push boundaries, and do the other stuff in the middle of that STEAM diagram at the top of this post.  Occasionally one also finds designers of Glass Bead Games employing randomness as a spur to creativity, too!  I keep ruminating on becoming one of those designers someday, so these posts are a set of running notes that may someday be assembled into something bigger....

Tuesday, April 4, 2017

Mathematical Rebirth

It's been a busy spring, but I want to be sure to post to the blog when there's something I'm excited about.  Given that this something has to do with games, spirituality, and math... I think it counts.

When I was 12 or 13 years old, I became obsessed with a little book in my school's library.  Rebirth: The Tibetan Game of Liberation described a strange cousin of "Chutes and Ladders."  Seemingly originating in the 13th century, this was a game of 104 squares that essentially led you from hell (at low numbers) to heaven (at the top).  You started out near the middle, at square #24, and you rolled dice to determine where you go next.  You can go up or down, of course.  Each square has its own unique set of rules for where the dice take you next.  You can get stuck in some squares for a long time.  The closer you get to Nirvana at the top, the less of a chance you have for going back through the nasty stuff at the bottom...


"Playing" this game is supposed to be a meditative exercise that gets you thinking about your karma, and about how all the ups & downs of life are just transitory distractions from the important things -- well, the important things if you're a Buddhist, anyway.  :-)

I've never been a Buddhist, but I was obsessed with this thing as a kid.  Along with D&D's systematized lists of gods and outer planes, I suppose I was eager to find some mathematical rigor in the often woo-woo world of spirituality.  I copied out the board onto a large piece of cardboard.  I still have it, 40 years later.  Here's a piece...


A few days ago I got to thinking about this game again, and I looked up some details online.  For the fun of it (shut up), I wrote a computer program to simulate the square-by-square rules and was thus able to run thousands of random games.  It was cool to learn that the most probable number of "turns" was about 93.  The shortest possible game I think runs about 18 turns, and the longest ones that my computer churned through were about 430 turns in duration.  Oh, the wheel of karma can sometimes be cruel.

I was also curious about how the game tended to progress from the lower to the higher levels, so I made a graph of 200 random games, with time normalized such that the longer and shorter games all are squeezed into the same start-to-finish range:


I find it interesting that there's such a tight cluster of activity in the lower realms (below about square #26) in the first third of the game, then the probabilities spread out to nearly everywhere.  Once you're about two thirds of the way done, though, you rapidly converge on the higher nirvanas and make increasingly steady progress to full enlightenment.

I also found an article by someone named Jonathan Doner, which proposed that the overall concept of this game could be "reskinned" straightforwardly to other spiritual traditions.  (I'm so doing that.)  The article goes on to talk about how playing the game could be a useful means of general education for an enlightened citizenry -- a possible path to the ancient Greek concept of paideia, perhaps.  For sure, it reminds me of the lofty sacramental goals of my own little slice of nirvana: the Glass Bead Game.  We'll see where this leads....

Saturday, July 20, 2013

Music of the Spheres

In my last post, I talked a bit about a metaphor I found on the Internet that compares musical tonality to a kind of "gravity" exerted by heavenly bodies.  That spurred on even more thinking about the ancient idea of the music of the spheres.  Going back to Plato and Pythagoras, the idea is that the motions of the planets, in their nested crystalline orbs, create a celestial music that we humans cannot hear. There's also some astrology in there, since the heavenly harmonies may at times be in resonance with certain earthly harmonies.  Fans of Shakespeare's Merchant of Venice will also recognize these ideas seeping into the Elizabethan Renaissance...
"Here will we sit and let the sounds of music
Creep in our ears. Soft stillness and the night
Become the touches of sweet harmony.
Sit, Jessica. Look how the floor of heaven
Is thick inlaid with patens of bright gold.
There's not the smallest orb which thou behold'st
But in his motion like an angel sings,
Still choiring to the young-eyed cherubins.
Such harmony is in immortal souls,
But whilst this muddy vesture of decay
Doth grossly close it in, we cannot hear it."
I was thinking a bit more concretely about this, and I looked again at the numerical ratios that define notes and intervals.  Even in my muddy vesture of decay, I thought it would be fun to extend that particular idea to the planets.

In the last post I mentioned the difference between equal-tempered notes and those that you get from just intonation.  Equal temperament is just taking the octave (the distance between any given note and a note with twice as high a frequency) and splitting it up equally into 12 semitones.  Music nerds break up the octave into 1200 "cents," where each 100 cents is one equal-tempered semitone.  These are shown in the image below by the equal-sized blocks of color:


However, the notes that really sound the most harmonious don't fit exactly onto those 100-cent intervals.  Instead, they're defined by simple ratios of frequency.  The perfect fifth, for example, is an exact multiple of 3/2 times the frequency of the base note, or tonic.  If you compute the cents of that interval, you get 701.9549560547 or so.  That's pretty close to 700.  Many other harmonious ratios end up being close to even hundreds in cents, and that's what made equal temperament so popular and useful.  The little white lines in the image above show where many of them fall on this scale.  I gave only one example -- see 590 and 610 -- where music theory folks prefer to distinguish between two notes, but an equal-tempered instrument like the piano can only play one "average" note that has to serve for both (600).  You know the old joke... you can tuna piano, but you can't tune a diminished fifth!

Music blogger Gary Garrett has talked about some other bluesy notes that fall even further away from the equal-tempered boundaries...


It was an eye-opener for me to see all of these -- and to learn where in popular music they're used, too.  There are so many possibilities!

But back to the music of the spheres.  I realized that each planet has its own "frequency" (i.e., the rate at which it orbits the Sun), and one could make similar ratios.  I gave it a try, using the Earth's frequency as the "tonic" with which all of the others are compared.  Earth is the natural "home key," of course.  (I guess I could go all Shakespeare again with "Man is the measure of all things.")  :-)  I chose to ignore octaves, since in music it's seen as insignificant, harmonically, to go up or down an octave.  I also picked some interesting asteroids and one famous comet, since they're just as much fellow travelers around the Sun as the big planets.  Here's where their frequency ratios fall, musically...
Notice the big clump of planets right near the Earth at the top.  Far-away Pluto orbits the Sun once every 248 years, but that's close to 256, which would be exactly 8 octaves up from the Earth's orbit once every 1 year.  Mercury orbits once every 0.24 of a year, which is close to a quarter (2 octaves down).  All those near halves, doubles, halves of halves, doubles of doubles, and so on, fall very close to either the unison or the octave.  These were also noticed hundreds of years ago and codified into something called the Titius-Bode Law.  Modern astronomers don't quite know what to do with that "law," since it's not exact, and there seems to be no physical reason for the planets to be sitting at near factors-of-two separation like that.  "Coincidence" may be the best explanation, since the thousands of other extrasolar planets don't seem to follow such a law.

Notice also that Jupiter falls close to a perfect fourth, which is the inverse of a perfect fifth.  When I first computed these things, I used periods instead of frequencies, and Jupiter fell just about smack dab onto the perfect fifth.  (There's a reason for that, since periods are "inverses" to frequencies in just the same way as the musical inverses that I mentioned above.)  I almost posted the period-version of the chart, but the pedant in me knew that it's more honest an analogy to use frequencies like in music.  Anyway, in my last post, I quoted Gary Garrett comparing Jupiter's weak gravitational pull to a chord with a root on the perfect fifth!  More coincidence?

Who knows.  But I do know that these kinds of harmonious comparisons are just the ticket for thinking about the Glass Bead Game.  Hesse knew music was the key, as did Shakespeare...
"The man that hath no music in himself,
Nor is not moved with concord of sweet sounds,
Is fit for treasons, stratagems, and spoils;
The motions of his spirit are dull as night
And his affections dark as Erebus.
Let no such man be trusted. Mark the music."

Friday, July 12, 2013

Musical Gravity

I'm always on the lookout for interesting Glass Bead Game-ish analogies that link together far-flung ideas.  On the blog of musician Gary Garrett, I just found a doozy!  I've attempted to boil it down to a couple of eye-catching images, which I'll do my best to explain below.

First is the basic 12-semitone "chromatic" scale common to most Western music:

Melodic order
These 12 notes are also 12 intervals between notes, and I talked more in this old post about how human brains may be hard-wired into interpreting various intervals as happy, sad, angry, and so on.  Above, I assigned each note/interval to a color, and one can see how "close" any two of them are to one another by seeing how similar their colors are.

However, it turns out closeness isn't such a simple concept in music.  Melodies (the "foreground" tune) and harmonies (the "background" layers) work with different definitions, as Gary Garrett explained here:
Melodies “like” to move up and down on a linear scale. They want to go to a nearby note when they move — that is, near by in pitch. We hear, and sing, small movements in pitch better than we hear leaps.
Harmonies “like” to go to nearby notes too, but harmonic space is different than linear, melodic space. The 1 and the 5 are harmonic neighbors. In fact, they are as close together as notes can be, harmonically, without being the same note .... But they are far apart melodically — the 5 is almost at the midpoint of the scale.
There's been a long history of people trying to visualize "harmonic closeness" using graphical techniques.  Garrett summarized this history, and explained his own graphical "Lattice" technique, in this post.  Below is my own attempt to visualize his Lattice:

Harmonic order!


Note that the "color neighbors" here are spread out much more than in the melodic scale I showed above.  There's a method to this seeming madness:  the up/down axis follows the well-known circle of fifths, the upper-left/lower-right axis steps down in major thirds, and the lower-left/upper-right axis steps up in minor thirds.  These steps correspond to the natural harmonies that one would see, for example, by taking a stringed instrument and changing the length of the string by "simple" fractions like 3/2, 4/3, and so on.  Also, most chords (major and minor) can be formed by taking little triangular "clusters" of any three notes in this lattice.

I should make clear that my version of the lattice is much simpler than Garrett's in one notable way.  Mine uses the standard Western approximation of equal temperament.  It just shows the notes you can reach with the white and black keys of a piano.  Garrett is a fan of just intonation (which also intrigues me, as a wannabe Pythagorean), so there's much less repetition in his version of the Lattice than in mine.  In my version, say, C sharp is the same note as D flat.  In Garrett's, it's not!  :-)

But, you may ask, where's that Glass Bead Game-ish link between far-away ideas?  It comes in Garrett's recent post about "tonal gravity:"
I believe that the great driving force in tonal music, that creates the drama and story of the music itself (independently of any lyrics), is the longing for home. Home is the tonic. If a song is in the key of A, all the A’s in their various octaves will sound like home. 
...
It’s as though the tonic creates a sort of gravitational field around itself. It acts a lot like real gravity. The chords and notes move in this gravitational field, like planets and moons around a sun. The gravitational field follows a few basic rules:
  1. Movement away from the center creates tension; movement toward the center gives a sense of resolution.
  2. The closer you are to the center in your journey, the stronger the sensations of tension and resolution are. The field is stronger closer in, just like real gravity.
  3. The closer together two notes are, the more consonant, or harmonious, they will be when sounded together. The farther apart they are, the more dissonant they will be, the more they will clash.
Roots generate local gravitational fields. I think of them as Jupiter to the tonic’s Sun. When the root is on the 5, for example, it shifts the gravity field to the east on the lattice, and the 2 and 7 become harmonious, consonant notes, rather than dissonant ones. The tonic still has great influence, so the entire chord feels unresolved — a 5 chord pulls very strongly toward the 1 chord, a property that is heavily relied upon in Western music.
(Note: his phrase "east on the lattice," in my version, is "up.")

I love this analogy.  It falls right into place with my other thoughts about how tension and release must be core elements of the Glass Bead Game, since they're so universal across many different domains.  Now, what will I actually do with these beautiful ideas?  That, I'm not so sure about...  :-)

Thursday, April 4, 2013

D is for Donald Knuth

Donald Knuth describes himself as a professor of computer science, but he's known for many other things.  His biggest claim to fame is probably for creating the typesetting system TeX, which has been the lingua franca of academic writing in math and science for many decades.  He's made valuable contributions to both abstract mathematics and to Mad Magazine, and he's written books on philosophy and religion.


Knuth spent many years teaching, but he retired early with the intention to spend the next 20 years finishing his magnum opus, The Art of Computer Programming, a comprehensive multi-volume textbook of algorithms and their analysis.  I've only browsed through the early volumes (without digesting much), but I'm told they're utterly foundational to really knowing how to do programming right.

It's said that Knuth developed the TeX program, which allows one to do professional-level typesetting with equations and math symbols, just in order to be able to make his computer programming books as aesthetically pleasing as possible.  He also designed programs to create his own fonts to assist in this aim as well... his Computer Modern typeface is still used by thousands, including yours truly, on a daily basis.


Knuth has seemingly lived by William Blake's motto "I must Create a System, or be enslav'd by another Man's."  :-)

I've also been fascinated by Knuth's contributions to John Conway's idea of surreal numbers.  It's an alternate take on set theory and the mathematics of infinities that many describe as awe-inspiringly insightful.  When Conway introduced the basic idea to Knuth in the early 1970s, the latter went off and wrote a short novelette that presented the ideas in the form of a dialogue between two beach bums (Alice and Bill) who discovered the axioms of surreal number theory carved on a rock.  Of course, they go on to prove all manner of interesting theorems.  At the end, Alice rapturously falls into Bill's arms and says "Every discovery leads to more, and more!"  Bill glances at the sunset and says that "There are infinitely many things yet to do... and only a finite amount of time..."

Okay, Shakespeare he's not, but Knuth is really quite unique.  Let me just end with a couple of quotes from his philosophical book Things a Computer Scientist Rarely Talks About,
"Somehow the whole idea of art and aesthetics and beauty underlies all the scientific work I do. Whatever I do, I try to do it in a way that has some elegance; I try to create something that I think is beautiful. Instead of just getting a job done, I prefer to do my work in a way that pleases me in as many senses as possible."
and
"In any case, I think people who write programs do have at least a glimmer of extra insight into the nature of God... because creating a program often means that you have to create a small universe. [...]  I think it's fair to say that many of today's large computer programs rank among the most complex intellectual achievements of all time. They're absolutely trivial by comparison with any of the works of God, but they're still somehow closer to those works than anything else we know."
Long may Don Knuth program!

Wednesday, October 17, 2012

Am I a Pythagorean?

A few interesting threads have come together for me lately, and they all seem to have something to do with music.  I don't play an instrument, but I've made no secret of my love of the interesting aspects of musical harmonies (especially as related to the Glass Bead Game).  My long-time devotion to math-rock gods Rush is also on record.  :-)

I also have an on-again, off-again fascination with astrology and its metaphorical links both with psychology and with numbers and harmonies.

Then, just over the past few days, I've heard random songs on the radio that all seem to be telling me that music is Something Important...  There's been Frank Turner telling me that something as simple as rock and roll will save us all.  Then Triumph saying that music has the magic power to bring us closer to our dreams.  Then, my man, Stevie, cluing us in how music is a world within itself; a language we all understand.

Then!  Fellow blogger Suze chimes in, weaving a musical creation myth to explain the trichotomy of body, soul, and spirit.  (I couldn't resist commenting on the similarity to Tolkien's Music of the Ainur...)

There's definitely something in sound that strums us where we live.  Is it such a leap to connect it with spirituality?

Of course, music has always played a big part in communal worship.  True prog geeks (like ol' Johann Sebastian) have known how to make the most uplifting use of harmonies for a long time!  But for some reason I'm thinking further than just the "use" of music.  The actual worship OF music?  No, that's not quite it.  The deification of Harmony as an abstract concept?  Not really that, either.  I'm not actually sure where it's pointing me, but I will be reading more about the Pythagoreans, who seem to have trod this path before.

I thought for a while about whether or not to write this up on the blog.  I haven't made any concrete breakthroughs, nor had any truly NEW insights (yet?).  And, I worried, how relevant will it be to my true-blue D&D gamer readership out there?

Then I remembered that the Pythagoreans had quite the affinity for the Platonic solids...

These ARE the gods... of the player characters, anyway!
Relevant enough for me! 

And I still believe (I still believe) in the sound, 
That has the power to raise a temple and tear it down.
And I still believe (I still believe) in the need,
For guitars and drums and desperate poetry.
And I still believe (I still believe) that everyone,
Can find a song for every time they've lost and every time they've won.
So just remember folks we not just saving lives, we're saving souls,
And we're having fun.

Tuesday, April 10, 2012

I is for IDIC

[This is the 9th of my April A-Z Challenge series of posts on Symbols, Glyphs, and Sigils. Each day I'll try to include some material that old-school role-playing gamers will find useful, but I can't guarantee that there won't also just be a few posts filled with weirdness for the sake of weirdness....]

Known by the most unbridled denizens of geekdom such as myself, IDIC is an acronym from Star Trek that stands for "Infinite Diversity in Infinite Combinations."  It's a core principle of the logical philosophy of the Vulcans, and it also comes in nifty pendant form:


In reality, the IDIC pendants seem to have been a crass marketing ploy by Trek creator Gene Roddenberry... so crass that even Leonard Nimoy needed lots of convincing to wear it on the show.  But the idea of it really resonated for me back in the day, so I'll keep my fond memories of it anyway.  :-)

Many fans embraced "infinite diversity" because of its resonance with tolerance for alternate ways of living.  I always thought that trying to fold your mind around "infinite combinations" gets quite close to the sacramental core of the Glass Bead Game (see collected quotes here).  It's also reminiscent of the ideas in my letter E post of a few days ago.

One great way to stretch your mental muscles with IDIC is to think about the various degrees of infinity that mathematicians have come up with.  Georg Cantor got the ball rolling in the late 1800s with transfinite numbers, but that was only the start.  Want to take a ride?
  • First up is the idea of a "countable infinity."  You know:  1, 2, 3, 4, ...  The "dot dot dot" just means to keep on going forever.  Cantor proved that if you can write down an algorithm that accounts for all the members of a set by counting (even if it goes on forever), then that set has essentially the same number of members as any other set that satisfies this criterion.  This can be a bit counter-intuitive, since it means the set of all even (or odd) integers is the same size as the set of ALL integers.  The set of all rational numbers (integer divided by an integer) is also countable, and thus the same "size" as the set of all integers, too.  This degree of infinity is called Aleph-Zero.
  • Are there sets bigger than Aleph-Zero?  Yes!  The set of all real numbers (including all those pesky irrational numbers like pi and the square root of 2) contains an "uncountably" large number of members.  Unlike, say, the set of all integers, there is no way to say what the "next" real number is that follows any given real number. There are always infinitely more reals squeezed in between any two that you can write down.  This degree of infinity is called (by some) Aleph-One.
  • Are there sets bigger than Aleph-One?  You bet!  As big as it is, something even bigger is the set of all possible SUBSETS of Aleph-One.  In other words, the set of all possible "infinite combinations" of the members of Aleph-One.  There's Spock and his pendant again!  This degree of infinity is called Aleph-Two.
  • You can keep on going and going, with Aleph-(N+1) being the set of all possible combinations of the members of Aleph-N.  You can even substitute another "Aleph number" in for N.  But some mathematicians take the next leap to be the following: Consider an infinite set so big that it's the SAME size as the set of all of its possible subsets.  It's so expansive that it is its own subset.  Your mind has to really stretch to see how that could be possible.  Reading the mathematics literature starts to get hard to follow from here on, but I think these "Inaccessible Cardinal numbers" are often given the symbol theta.  (And there's the Ecology symbol again?)
  • The mathematicians go on, with hyper-inaccessible cardinals, indescribable cardinals, ineffable cardinals, and so on...  I can't keep them straight!
Anyway, I highly recommend Rudy Rucker's classic book Infinity and the Mind for those who want to dig deeper -- or climb higher up that infinitely tall mountain!

Tuesday, February 28, 2012

Math Rock: The Jacob's Ladder Code

I've got symbols and secret codes on the brain from preparing for the A-Z Challenge, and recently I've also been listening to songs by a band that's known for them: Canada's prog-rock power trio Rush!

The idea of encoding secret messages in music is not the newest idea in the world, of course, but I've always enjoyed the geeky ebullience of how it was done by progressive bands of the 1970s and 1980s.  (And there were sometimes messages hidden in not just the music, too!)  Rush famously used the Morse code call-sign of their hometown Toronto airport in their instrumental song YYZ.  They also played around with binary ASCII code in "The Body Electric" from the Grace under Pressure album.  Their tour book for the Roll the Bones tour contained the encoded phrase "Remember Death" in a pattern of skulls.

The one song that always seemed (to me!) like it contained some kind of complex code was "Jacob's Ladder" from the Permanent Waves album. Brimming with strange time signatures and rapid changes in mood, this song was kind of a tone poem that takes the listener through the changing moods of a thunderstorm... first the gathering gloom, then the dark rumbling, then finally the emergence of the Sun from the clouds as the storm dissipates. Neil Peart, the songwriter and drummer, was also no stranger to the multiple allusions of the phrase "Jacob's Ladder" -- the Biblical vision, the meteorological phenomenon, the high-voltage electrical arc, and so on.

The entire song is quite complicated, but it's the introduction to the ending verse that's always fascinated me.  It's just 6 bars long, but it merits special attention in this youtube drumming video where the narrator stops the song (at about 7:13 in the video) and discusses the complexity just as this "ending" part is about to begin.  In fact, that video is the only place I've found on the Internet that describes the ending in such detail.  It consists of several sections of F-sharp staccato rhythms in the following pattern:

5-4-4-1-2-3-7-1-1-2-3-12

In other words, a sequence of 5 beats, followed by a rest, then 4 beats, then a rest, then 4 more beats, and so on.  Pretty random looking -- but with JUST enough regularity to hint at hidden meaning!  One of the commenters on the youtube video calls it "mayhem" to learn and play.  Here's the section scanned from my copy of the Rush Complete score book...


I've long wondered if the random-looking sequence of numbers has any meaning, and I've never been able to find any.  One could translate the numbers into letters using their position in the alphabet (i.e., A=1, B=2, C=3, etc), and one would get: 

E-D-D-A-B-C-G-A-A-B-C-L

If you ignore the L, these could be musical notes, but I can't tell if there's anything significant there.  Just recently, I dug a little deeper into the score scanned above and realized that the beats and rests aren't all of the same length.  Most of the beats are either eighth notes or "triplets" (three notes crammed into the space of 2 eighth notes; they are essentially "twelfth notes"), and just a few are sixteenth notes.  Since my mind doesn't naturally think in terms of musical notes, I translated it into something that makes more sense to me.  In the following chart, the numbers are proportional to the lengths of the notes (in bold colors) and the surrounding rests (in unbolded black):

Click to enlarge

I chose these numbers as a sort of least common denominator.  If one wants to represent eighth notes, twelfth notes, and sixteenth notes as integers, one needs to break up a bar (containing one whole note) into 48 parts.  That way, the eighth note is "6", the twelfth note is a "4", and the sixteenth note is a "3".  Nothing smaller will do it.

I wish I could report that this activity yielded a solution to the elusive secret code.  But no dice!  If anyone sees any order crystallize out of the above chaos, please let me know.

Unfortunately, the only thing more annoying than not being able to solve a puzzle is not KNOWING whether there really is a puzzle there or not!

Wednesday, August 3, 2011

Lies, Damn Lies, and Chutes and Ladders

Okay, parents, you've all been there. Bedtime for the little one is 8:00, and at 7:50 comes "Just one more game!"  My son was really into Chutes and Ladders a few years ago, and for some reason this was the game of choice for sleep procrastination. But when the clock is ticking, the dice seem to conspire to make the game go on... and on... and on...

So, how many turns should one expect a game to last? Theoretically, this game could go on forever, but statistically one should expect a finite end nearly all of the time. Not surprisingly, people have thought about this problem... quite a bit in fact. (See also discussion of the mathematics of the game in the Wikipedia article linked above.)  My fellow geeks seem to agree with my own analysis that the mean number of turns that a player should expect is about 39.5, and the median is about 33.

But not so fast!  All of the calculations that I've seen assume (rightly) that a player of Chutes and Ladders doesn't affect the actions of the other players at all.  Thus, the computer programs and mathematical equations just tend to simulate a single player, from his or her start in space 1 to the end in space 100. But for two or more players, only ONE of them will follow this single-player simulation all the way to the bitter end.  The others will stop when the winning player wins, and this skews the distribution!  In other words, when you have more players, you have more chances of ending the game with a low number of turns!

So I fired up the old random number generators, and wrote some code in IDL to simulate a few hundred thousand games... Here are the histograms for different numbers of players:
The y-axis shows the relative probability of winning the game in the number of turns shown on the x-axis. The mean number of turns for a 1 player game is 39.7, for 2 players it's 26.5, for 3 players it's 21.8, and for 4 players it's 19.3. Another interesting change is the eating away of the one-player "long tail" to give multiple players a much more compact distribution. I'm sure that one could have modeled these Poisson-like distributions without crunching through millions of simulated moves, but computers just make doing the latter so easy! :-)

I also played around with a common house rule that we implemented when our son was very young: once you get into the final row (spaces 91 to 100), you're home free and the chutes don't count. For the one-player game, using this rule reduces the mean number of turns from 39.7 to 31.6, but the median goes down only from 33 to 28.  Not a huge time-saver, I suppose, but it may reduce player crankiness!

(Of course, adding more players isn't necessarily all peaches and cream!  More players may also mean more arguments about who gets which counter, who spins the spinner properly, who goes next, etc... so caveat emptor!)

Wow... when I started thinking about doing a post on Chutes and Ladders, I was intending to talk mainly about its origins as an ancient Indian teaching tool for the concepts of karma and reincarnation, and maybe about Deepak Chopra's recent morphing of the idea into a weird video game. As a kid, I think I may have encountered its Tibetan variety even before I'd ever played the Hasbro version!  :-)