Friday, March 30, 2012

Car parking game strategy

See the original puzzle

The Car Parking Game isn't really a "puzzle" in the usual sense.  It's a game.  But it's one of those games which is simple enough that it is feasible to analyze who is winning at any given time.  Given any game-state, either the current player can force a win, or the other player can force a win.  I will denote these game-states as W and L respectively.

W and L states have a particular structure:
  1. If the current player cannot make a move, then it is a W state, since the rules say that the current player wins.
  2. If the game is in a W state, and the current player can make a move, then it is possible for the current player to make a move leading to an L state.
  3. If the game is in an L state, then the current player can only make moves which lead to W states.
If you know which game-states are W and which are L, then the strategy is simple: always make moves leading to L states.  The implied puzzle is: which game-states are W, and which are L?

There are several ways to figure it out.  One is to do it by hand.  Or you can do it with a computer.  I did it both ways.  But I'm not going to show you that.

I also solved the problem using the third method: research!

The most difficult part of researching this kind of problem is finding the right keyword.  The keyword is "Kayles".  Kayles is a game involving a row of bowling pins.  Each player can either knock down a single bowling pin, or knock down two adjacent bowling pins (if there is no gap between them).  Kayles is equivalent to the Car Parking Game, because you can either park your car efficiently, taking up one spot, or inefficiently, parking across two spots.

There are two versions of Kayles.  There is "normal play", where if the current player has no possible move, then the current player loses.  And then there is "misère play", where if the current player has no possible moves, then the current player wins.  In Normal Kayles, you can use a simple strategy, similar to that of the Coins on a Table Game.  From a mathematical standpoint, normal play is also easier to completely analyze than misère play, because we can apply the Sprague-Grundy theorem.

The Car Parking Game is equivalent to Misère Kayles.  I was pleased to find that Misère Kayles has been completely solved!  Unfortunately, the solution is very complicated, and will not fit in the margins of this blog.  If you are able to decrypt the paper, that's quite an accomplishment, and I welcome you to use it to beat me at the Car Parking Game.

Wednesday, March 28, 2012

Some statistics on sex

Yesterday, I talked about the question "How sexual are people?"  People seem to have overarching views on this question, despite the fact that it is so poorly defined and we have no solid knowledge about it.

Okay, but we do have some knowledge after all.  We have statistics.

When I first saw statistics on sexual behavior, I thought, "That's higher than I thought, all across the board!"  And then I sort of forgot, until I saw the statistics again.  Then I thought, "I remember it being higher than I thought, but it's still higher than I remember!"  So I know for a fact that my views and impressions were/are inaccurate.  People think that as an asexual, I must think everyone else is just crazy about sex.  But as it works out, I tend to persistently think everyone is like me.

I want to show you some statistics of some North American university students, mostly age 18-19.  My questions: Do you find them surprising?  In what direction?

"Mean Age" refers to the average age of people's first experience among those who had the experience.  "Mean Liking" refers to how students felt after their first experience.  The shading of the boxes has no meaning.

These statistics come from a free preview of Sex and Youth, chapter 2.  There are 252 women, and 191 men, and I believe people with same-sex experiences were excluded from the sample.  I did not "cherry pick" these statistics to support my conclusions, I picked them because I find Bob Altemeyer's writing entertaining, and he explains his methodology well.  One of these days I should buy the book and read the whole thing.

Note that the statistics neither support nor deny the thesis, "Humans are very sexual", because they do not solve the problem of defining "very sexual."