Saturday, 25 October 2014

The Monty Hall "pick a door...should you switch" problem

Many of you will have heard of this classic problem - known as the Monty_Hall_problem.
Suppose you're on a game show, and you're given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what's behind the doors, opens another door, say No. 3, which has a goat. He then says to you, "Do you want to pick door No. 2?" Is it to your advantage to switch your choice?
There are two slightly different interpretations of this problem, with (unsurprisingly) different answers. (*Note: updated since my original post*)
  1. IF we assume that Monty always has to pick a goat when he shows you a door, then you will do best to switch (there is a 2/3 probability of winning if you switch, 1/3 probability of winning if you stay). Your overall chance of winning a car if you plan to switch in this scenario is 2/3. See more discussion below.
  2. IF Monty picks a door randomly, then switching and staying both give you the same result! He's either going to:
    1. show you the car (in which case you've lost)...this will occur 1/3 of the time
    2. show you a goat. You now have a 50/50 proposition, since Monty was not *required* to show you a goat. He randomly picked a door and now there is a 50/50 chance that the car is behind your door, and a 50/50 chance that it is behind the other not-yet-selected door. So whether you stay or switch you will get it right 1/2 of the time. If' you're the type of person who kicks themselves more if you switch and are then found to be wrong to switch, then by all means stay.
So in Case #2, your overall chance of winning a car is only 1/3! If you stay with your pick we already know that you have a 1/3 probability of winning. But if you were planning to switch (which would give you the 2/3 probability of #1) you get KO'd 1/2 the time when Monty actually reveals a car, so your net probability of wining is 1/2 * 2/3 = 1/3.
So why do so many people not believe the answer to #1? There are a couple of simple explanations to prove that it is true...maybe people don't have the attention span to actually go through the thinking. Two ways to bring yourself to a new understanding of probability:

a) Just try the combinations! (See also the simple table in the link I gave to wikipedia in the first sentence). If you do this, you will find that out of all possibilities (i.e. 3 possible initial guesses by you x 3 possible positions for the car) you will win 6 times out of 9 if you switch.
  • For any time that you chose correctly at first (3/9 of the possibilities above) you will lose when you switch
  • For any time that you chose incorrectly at first (6/9 of the possibilities above) you will win when you switch
b) What I have found compelling for many is to imagine a situation where there are many more doors, and Monty picks all but one of those doors and shows goats behind all of them. Now would you switch? Here it seems to be more reasonable to people that if there were, say, 100 doors and they pick 1 that they will have a 1/100 chance of winning (and that there is a 99/100 chance that the car is in one of the other 99 doors). So if Monty shows 98 of those doors have goats, you should switch. Only 1/100 of the time will you have selected the right door, but 99/100 of the time Monty will have found it for you out of all the other doors!

Here's a simple table (using the $ to indicate a good prize, and 0 to indicate a bad one). If the prize was originally behind door 1 you win by staying (in blue below). If the prize was originally behind ANY OTHER DOOR you win by switching (in green below).





Friday, 17 October 2014

Cat in your luggage?

Many years ago we visited England and Greece (and had a wonderful bus tour of the southern Peloponnese...perhaps more on that later).  While in London we had bought the following at Covent Garden:


A metal cat to place in the garden. It was pretty small (and thin) so we had put it into our checked luggage and pretty much forgotten about it. We went to Greece and on a cruise on the Mediterranean and were finally returning to Canada from Athens.

At the airport they X-Ray all your luggage. Suddenly the man doing that work looked up and asked me "Do you have a cat in your luggage?" He actually motioned me around to look at his screen...there was the 'cat' clear as day and the 'eyes' seemed to be glowing in the X-Ray. He then laughed and let us through...guess it wouldn't have made the same X-Ray picture unless it was...


...something he didn't want to distub.

Sunday, 12 October 2014

Raccoons

Not sure if there are more around now than in the past but they still do the same things...walk around mostly ignoring humans, and getting into garbage.

They scare Toronto's mayor of course (though that might just be when he's in a drunken stupor). But does this guy...

...really look like he would scare a municipal leader? Even if he was with friends?


Of course, they do:
  • sh*t in your yard
  • rip up anything stored outside
  • break into any 'raccoon-proof' container having any kind of food scraps in it
  • scare the local cats
And they have supernatural strength! Perhaps part-mayor Ford was right to be scared. Below is a raccoon paw print beside our house 'pounded' right into the concrete!


(one of about 100 paw prints around here...I imagine the last time they poured concrete - the owners of the house that is, not the raccoons - that the raccoons decided to make a statement)

We don't seem to openly declare war on feeding them though. Like Montreal:


No need for signs here...everyone knows that feeding them will just hasten the 'inevitable'...

(insert 'Raccoon' where necessary)

Finally, for the trivia lovers here's a list of fictional raccoons, to show how much they have added to our literature. Much beloved, all of them (though they didn't include my favourite 'Raccoon Tune' book).



Wednesday, 1 October 2014

Block'd (Part 1)

Where to start? After the recent amazing games at the worlds (plus the huge timing scandal for the Marathon players) it has probably become the number one talked about game on the web!

Or not.

I found this game on my now almost antique Nokia 2720 (which has v1.3.2 of Block'd). It's challenging to play and I'm going to try and give a short overview - then encourage you to buy my old phone so that you can play it!

My version came out in 2008 and was from EA. I see that they now disavow any knowledge of the game (their 'Answer HQ' here). But there does seem to be a site where you can download it (http://java.mob.org/game/blockd.html) though I have no idea if it's a safe/valid/etc site.

There are two 'modes' that you can play: Speed and Marathon. I'll talk about Marathon mode here and possibly (if there's a huge response) continue on to Speed mode later.

Here's a screen shot of a typical screen (though at a high level). You have blocks of different colours (the game starts with just 3 colours, and works up to 6). If you click on a block that is touching 1 or more other blocks with the same colour, then you remove all 'n' blocks and get a score of n**2. When you no longer have any cases of 2 or more blocks of the same colour touching you then lose a number of 'lives' equal to the number of blocks remaining. If you get rid of all blocks on a level you get a bonus of 1000*(level) points (i.e. 5000 points for level 5).


The last thing to talk about is the 'Wild' blocks. You start with 3 and can work up to 9 (like above) as you get one for each 10,000 points. When you place a 'wild' block it joins the block you place it on with the others around it and allows you to build a large connected area with different colours. This is important because if you clear 3 areas of 5 blocks each (for example) you will get 3*(5*5)=75 points. If you clear 1 area of 15 blocks though, you will get 1*(15*15)=225 points. So it pays to develop large areas and then clear them!

I will modestly claim the World Record Block'd Marathon score (for my particular version of course, and if necessary, restricted to areas not including others who have a higher score). And the key tactics?

  • In the first 5 levels, work up to getting 9 wild blocks. Specifically, on levels 4 and 5, use the 'lightning' and 'multiplier' blocks (oh yeah, I forgot to mention them...lightning extends the number of blocks by 1 in each direction around the base area of blocks, and the multiplier multiplies your score by whatever value it has).and wild blocks to get a big score. See also this totally unrelated video by IanStig.
  • You shouldn't use wild blocks on levels 1-3 unless you need one to, say, finish the level or avoid a big penalty. On the early levels it's usually more important to keep the wild blocks for use on levels 5, 10, 15, etc (the levels where you also get 3 lightning and 3 multipliers)
  • The most difficult part to get through is probably around levels 25-30. Once you get past that you are getting 30,000+ points per level completed, which gets you 3 new wild blocks
  • Work on those fundamentals! (stand with your feet just more than shoulder-width apart, knees slightly flexed, etc - though that may be other sports)
So much more detail I could give...ask me about my upcoming book. (And possibly see part 2 of this post)