Tag Archives: Statistics

Rubik’s Cupe Map – Part 2

Earlier in the week I mentioned that I was working on “cube mapping” one of the may ways to solve a Rubik’s Cube. I’ve finished rendering out the final video of the process, starting with a scrambled cube and ending at a solved Rubik’s Cube. The movement in the cube is admittedly a bit harder to follow than I expected it to be, but the results were still quite interesting.

I’ve uploaded two versions of the video. One’s rendered at 24 fps and the other at 8 fps:

Rubik’s Cube Map Fast (24 fps)

Rubik’s Cube Map Slow (8 fps)


Rubik’s Cube Map – Part 1

As mentioned in my Chapters post, I’ve recently picked up a new classic 3x3x3 Rubik’s Cube. I’ve relearned a fairly simple solving method that only requires 6 unique move types to complete the entire cube, although it does take a lot longer than more advanced methods. Out of curiosity, I decided to try mapping the entire solving process into a series of images. The most logical way to do this was with a cube map, i.e “unfolding” the cube into 6 connected squares. A solved cube would look something like this:

There were only really two options to go about doing this. Solve it step by step and take 6 photos after each turn, or make a digital model in Blender3D. I chose the latter option, and built a digital Rubik’s cube from 27 unique cube objects. Animating the cube was simple; all I had to do was move the cubes I needed and insert them into new keyframes. I didn’t want any sort of rotational movement in the cube, just changing colors, so the keyframes are all one frame apart.

The first step was to “mess up” the digital cube. I rendered out an animation of this process, which is uploaded here:


I realized quickly that moving the cube around digitally wasn’t going to be as easy as using the physical cube. To make the process easier, I decided to solve the physical cube simultaneously and make sure the digital model matched. This worked very well, until I messed up on the physical cube and couldn’t undo the error without bringing the two models out of sync. I ended up solving the physical cube completely and then following the steps from the digital cube’s animation to get back to where I needed to be. This was also around the same time when I began to wonder how good of an idea this whole project was. 😛

Eventually I got all 167 frames keyed in, including the scrambling process and a small delay after it. It was already pretty late, so I decided to leave things for the night and do the rendering and compositing today instead.

I ran the rendering process this morning, and I’ve now got a nice stack of 1,002 images that need to be merged into cube maps. Unfortunately I have no idea how to do this, aside from manually making each cube map. The Photoshop batch job system should be able to handle the task, I think, but I don’t know enough about it yet to make it do what I need. I’m looking into this now.


Monopoly Math Theory

Like I said in the last post, I spent some time working on the actual probabilities for each square in Monopoly. First thing first: Chance/Chest cards suck.

About half of the Chance/Chest cards can be classified as “move cards”, as they instruct the player to move to a square. Lets say you draw the “Go to jail” card from Chance and move to jail. That card now goes to the bottom of the stack, so the probability of anyone getting that card is now 0 for the next 16 Chance draws(there are 17 Chance cards), and 1 on the 17th draw. Therefore the probability of the squares is affected by the initial order of the C/C cards, since its common for not all the cards to be drawn during shorter games.

The number of players also affects things; obviously more players will go through the C/C cards faster, but it also complicates the “get out of jail” cards. I never pay the $50 to leave jail, therefore I either need a “get of jail” card or a doubles roll. If two other players already have the freedom cards, that means when I leave the jail it’ll be on a doubles roll. This means that I can’t land on squares 3,5,7,9, or 11 on a jail exit move. Though the effects are probably negligible in the grand scheme of things, they’re definitely present.

The only other factor, aside from standard two-dice probabilities, is that rolling three doubles in a row immediately moves the player to jail.

With all these factors considered, solving things gets pretty complex. Example: You’re on Water Works, and roll double 4s. You’re now on Chance. This Chance turns out to be a “Go Back 3 Spaces” card, putting you on Community Chest. The Community Chest card is an “Advance to Go” card. Since you had double 4s, you get to roll again; doing so gives you get double 1s, putting you on Community Chest. Go To Jail! At the end of it, you’ve visited four different squares on a single turn. On the other hand the same outcome could have occurred if double 1s were rolled from Water Works, as this would have put the player on the “Go To Jail” square.

Such complex move sequences are very rare, but are certainly possible. Therefore instead of trying to come up with an equation, I decided to calculate the potential pathways to each square and the probability of said pathways. I also took some liberties with C/C cards and simply treated them as a random draw. I’ve attached the final Excel sheet as usual:monopoly_final_paths

And, a screenshot of the final ordering and game board composition:

There are definitely some differences between the theory and the experimental results, but the general trends are fairly similar. Railways and orange still appear as the most popular properties. There’s a lot more “smoothness” in the theory though, especially in the middle range properties. The one last thing to do with this data would be to factor in costs of buying and rent, to see which are the best price wise. I’m sick of this game and data though, so maybe another day. 🙂


Monopoly Math

So it was family game night tonight, and we decided to play Monopoly. Because the game can take a while, we generally set a time limit, something between 1.5 to 3 hours depending on how late we start the game. My strategy for playing is pretty straight forward: collect as many railways and utilities as possible, and go for orange, yellow, and dark blue property groups. It tends to work pretty well for me, so I decided to do some data recording this game. I tallied up every squared landed on in Excel, including Chance/Chest cards like “Go directly to jail”, “Advance to boardwalk”, “Go to go”, and so on. We don’t play with any custom rules that affect moving, so the data reflects standard Monopoly procedures.

Unfortunately the game only lasted around 1 hour 20 minutes (I had a lucky start & early win), so the dataset isn’t very big. I wasn’t about to ask for a rematch though and we probably won’t play Monopoly again for a week or two, so I decided to work with what I had. Here’s the full organized data and analysis; click for full-size of course:

Haha, go Orange and Railways! I knew I was backing the right horse. 🙂 I think the reasoning behind the high frequency of orange landings has to do with the fact that it’s outside of the jail. Some of the most probable rolls on two dice (6,8,9) will land you on orange. There are also Chance/Chest cards that take the player to the pink squares right before orange, and the railway right before orange. Railways/corners are obviously going to be popular because of the aforementioned cards, and because they’re well spread around the board. Same goes for Chance/Chest, which combined make up 6/40 or 15% of the game board. Also, I find it funny that Tax squares received the least hits.

There’s a lot more I could do with this as far as comparison to theory goes, but the problem is calculating theoretical probabilities for each square. Since there are a lot of different routes to get to squares, with the possibility of going to jail, getting a Chance/Chest card that moves the player, etc things get complicated. I do intend to sit down and work through the math later tonight/tomorrow, so I’ll post again with an update at that point. And, as always, if anyone wants the data to play with: Monopoly.xlsx. The first Sheet is the raw data, and the second is the analysis page shown above.


A Penny for Your Thoughts?

I’ve been saving all my cent coins in a jar for the last few months, with the purpose of counting up the years on them to see what sort of distribution there is. Today I counted my jar of 185 pennies, and the results were not entirely what I expected. I should mention that these are Canadian coins, as I am Canadian after all.

I’d gone into this assuming that 2010 would have the most, then 2009, then 2008, and so on. Some sort of exponential function would make sense. I wasn’t sure about 2011 because I don’t know when the mints make coins, or if they’re consistently minted throughout the year or if there’s one day/week/month where the penny machines get cranked up to the 11 setting.

To start with, here’s the raw data in case anyone else wants to take a look: raw_penny_data. In addition to the year:count data it also includes a cumulative count column and a weighted average column. Feel free to do whatever you want with it, citing it if you use it somewhere else of course.

And here’s the resulting graph from Excel. I’ve add in some labels with Photoshop on some of the relative peaks:

I knew 2010 would be high, but holy shit that’s a big peak. And what’s up with 1994? I’ve heard before that after 5 years 50% of pennies from a year have dropped out of circulation. 1994 has held in there pretty well, and 1995 is right up there too. I wonder if there was a surge in penny production over that timeframe? Also, 1987 looks relatively large when compared with the other counts around it. The overall trend looks exponential though, as predicted.

After seeing the results, I think I’m going to continue saving my pennies and add the new data at the end of the year, to see what a larger sample size will produce. I’m curious if the 1994 spike will become absorbed with a larger sample size, or if there’s actually some reason for there to be more pennies from that area.

Also, not relating to the data, I found a single penny that completely lacked a date. I’ve never seen that before. It looked like a 1995-2005ish penny based on the level of wear and tear, and with the exception of the lack of a date it’s identical to all the other pennies. I couldn’t find any information on these type of pennies either, maybe it’s some sort of defect? At any rate, it’s not a common feature on Canadian coins so it might be worth something. I intend to hang onto this dateless penny.

Here’s a photo of the full penny pile:

And the dateless penny. The date is normally right about the CA in Canada, but is nowhere to be found on this coin:

That’s all for now.


%d bloggers like this: