Tag Archives: game

Note to self: turn off cell-phone data connection during class

In my large intro class I used Robozzle to talk about program control and introduce recursion. Robozzle does use a true call stack and to solve some puzzles (for example, learning stackrecursedlearning stack 2limit your stackcounting – green) you really need to understand both recursion and how the to use the call stack.  This is week one of computer science, so  I didn’t get into a huge amount of detail, but it did seem to get the “newbies” engaged and make the “hackers” realize that they do have something to learn.  Only a tiny handful of students could solve the aforementioned puzzle before being taught how the call stack can be used.  Overall, it was a success (I think), and I recommend it as a learning tool.

A colleague once mentioned “boy, this would be difficult to debug” and reminded me that the iPhone version of the game shows the call stack – or a version thereof – in the “step-through” mode.  I decided it would be a good idea to use the document camera to show this live (rather than hand-drawing the call-stack on the board).  It never even occurred to me that while my phone was exposed under the document camera, I could receive a call from <embarrassing pet name> or a text of <face-reddening material>.  And then “BING”.

Cue my nightmare.

Thankfully the text message was some automated one from AT&T.  However, in my “deer in headlights” teaching state, it didn’t occur to me to then turn off my phone’s data connection.  Nervously, I made it through the next 10 or so minutes of class without incident.

Donation price of anarchy

I recently went to a Christmas party where, instead of a gift exchange, there was a donation exchange.  Essentially, we each placed a cause’s name into a hat, people draw the names and are asked to donate to the cause.  You may donate any amount you wish (including nothing if you are particularly opposed to the cause you drew).  Given that this a group of people that have collectively decided to opt for altruism, the honour system should work.  As a result, I will be donating to the World Food Program and someone will be donating to Planned Parenthood on my behalf.

Someone at the party suggested that next year they hold a Yankee swap version where, rather than simply draw and donate, people may later “steal” causes by agreeing to donate more than the current donor.  However, I thought this might be unfair to those attending who happen to be unemployed or wracking up student debt.  I was wondering if there is an algorithmic-game-theory person out there who could come up with a way to deal with this that might meet the following conditions:

  • the total amount donated is maximized (or at least the price of anarchy is bounded)
  • each person ends up matched to a cause (that is not their own)
  • each person can cap their donation according to their means
  • one’s cap does not hinder the ability to steal a cause
  • the game doesn’t take forever and the rules are simple enough for a smart crowd to understand

I suppose one could hide everything and have causes bid on like Google AdWords, but I think a game of stealing in the spirit of Christmas would be more fun.