Tag Archives: Experiments


One of the suggestions my C programming professor gave us was to try to use a command line editor to do as many assignments as possible if we weren’t already familiar with one. Given that I fall in the “never used one” category, I decided to take it a bit further and do a sort of “c program a day” using Vim via the OS X terminal. The purpose is actually two-fold; I’m also using it to learn new algorithms as each program deals with an algorithm I’ve never tried writing before.

I started on the 16th by implementing Newton’s Method for finding the roots of the function x^2 = 916; in other words, the square root of 916. Yesterday I wrote a prime number sieve, and today I wrote a MergeSort implementation. I’m getting to know Vim pretty well too, and although I still prefer using an IDE I could probably survive with command line if I had to.

With regards to Ion Engine, I’ve done a bit of work on some small items over the last few days. I haven’t had time to sit down and work for a solid block of time so progress has been rather limited. Hopefully during this week I’ll be able to work on some other larger features on my list (terrain engine in particular).



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.


Coke + Rust = Results!

The results of this little experiment were actually not bad. Upon opening the container of Coke today I saw two small patches of gunk floating on the surface. These turned out to be directly above the screws, as expected. The bubble plumes mentioned in the previous post were also still present, though they were much smaller.

Once the coke was drained, I realized one mistake I’d made during the experiment. Both of the screws had been placed with the flat side of the head facing downwards, against the bottom of the container. I think this the reason for why the heads are still very rusty, as seen in the photos that follow. In both images the one on the right was the untreated screw.

The things coming out of the Coke weren’t brand new and shiny, but there was a bit of improvement. It’s also possible that leaving them in longer would clean off more rust.


Coke + Rust = ??

This is a bit of a deviation from what I normally blog about, but we have a ton of extra Coke cans at home and I nobody drinks it. I’ve heard a few times that Coke (well, the chemicals in Coke) are excellent at doing things like dissolving calcium, removing rust, etc. I figured I’d give the rust a try.

The hardest part by far was finding enough identical rusty objects. I wanted at least 2; one control and one to actually soak in the Coke. I ended up having to use these:

The container was just an empty yogurt container, which happened to be the perfect size:

I ended up tossing 2 of the rusty screws into the Coke, keeping the third out for comparisons. As soon as the screws hit the liquid sizable plumes of bubbles started forming around them, and continue even as they settled on the bottom of the container. I’m not sure if this was just CO2 escaping due to nucleation or some sort of reaction between the rust and the Coke. I also put the lid on the container, which had some interesting implications. Within the first minute or two the lid was bulging and pressure was seeping out from the rim of the lid. Again, I’m not sure if this is entirely regular Coke behavior or not. Either way, I added air holes in the lid.

I’m going to check back in a couple of hours to see what’s happened, and then again tomorrow morning and afternoon. I’ll post the results then.


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: