It’s another weekend, isn’t it.
I’m out of deep things to say. I don’t usually have deep things to say. Sorry to anybody who subscribed hoping for more things like the last post. This is basically going to be a personal stream of consciousness post. But it’s a stream with a long ancestry, since I apparently wrote 400 words about it in a WordPress draft four years ago. This was way back before I even started writing post drafts in Markdown on my computer instead of directly in WordPress, so I guess it must be an interesting topic.
Four years ago, Brian2012 was suddenly struck by how many of the people he knew were such serious gamers. But let’s go back even earlier, shall we?
A long long time ago, when I was in elementary school or so, my parents had some sort of reward system where I had to do productive things, like study or do chores or write diary entries or practice the piano or something, to earn time on the computer for games. “Gaming time” was a currency. I enjoyed saving up lots of thirty-minute increments and knowing I had the freedom to using them slowly.
That much I remember; the details of how it worked are very fuzzy and I’m not sure what I played in those thirty-minute increments either. I think there was Neopets and Runescape and Club Penguin. (My Neopets account still sees sporadic activity, because I get really really bored sometimes…)
Did I say “fun”? That was short for function calls. Which are fun too, admittedly. Blah, I always go to such lengths to come up with snappy yet justified post titles and end up achieving neither.
One more complimentary breakfast later:
This is it.
Google Code Jam World Finals. Let me take a moment to reflect. Seriously. I do not know how I made it this far this year. I guess I might be a top-500-ish competitive programmer globally, maybe even top-150-ish, but definitely not top-25-ish. And Log Set, the hard problem that got me through Round 3, doesn’t seem like it plays to my forte particularly either. It’s a bit mathy, but the math bits aren’t the hard part; I think it’s largely implementation, with one psychological hurdle where you have to realize that, because of how few distinct integers there are in S′, you can efficiently solve the subset-sum instances you need to produce the lexicographically earliest answer. I’m actually kind of impressed I got that. It seems like the sort of hurdle I usually get stuck on. How did this happen?
Maybe randomness. Maybe I was just particularly clear-minded during the round and wrote less buggy code than usual, because I had no expectation of making it whatsoever and so could look at the contest detachedly (until midway through the contest I accidentally noticed that my rank was under 20, and even then I tried very very hard not to think about it, and it kind of worked).
But it happened, and now I’m here. Time to roll.
In some emails much earlier in the Code Jam logistical process, Google had asked for “requests for changes and/or additions” to the software that would be installed on our competition computers, and I had sent them a long list:
Here are some things I’d like if they were installed, in decreasing order of priority:
Of course, this is my first Code Jam and I don’t know how reasonable these requests are. Any nontrivial subset would be appreciated.
The Vim plugin syntastic ( https://github.com/scrooloose/syntastic )
a Haskell compiler (probably Haskell Platform 2014.2.0.0 https://www.haskell.org/platform/ even though it’s a year old)
the Haskell package hdevtools ( https://hackage.haskell.org/package/hdevtools ) so that the above two may be integrated
(I don’t have enough Linux experience to name a specific thing to install, but command-line utilities that are the equivalent of pbcopy and pbpaste on Mac OS X, which allow me to redirect text into or out of the clipboard from the command line easily)
(Frivolous blog content, posted as part of a daily posting streak I have openly committed to; standard disclaimers apply)
It is quite interesting that Wikipedia’s article on Ninety-nine (addition card game), plus many of the following search results (ignoring the identically-named trick-taking game that is guaranteed to show up), have the same basic idea but wildly differing assignment of special cards from the one I’m familiar with, which everybody I can recall having played with agrees on. (Admittedly I’ve only ever played this among Taiwanese friends.) The only special-card assignment method that came close was a certain person’s “stuff from my old blog” dumping post I bumped into very accidentally. (His 5 is our 4; our 5 skips to an arbitrary player. The post also clarifies that negative totals bounce back to zero, and includes a clause whereby players must state the running total after playing and lose if they’re wrong. Interesting.)
Anyway, yes, I am documenting the rules to a card game on this blog. I think this deserves to exist online.
These rules are not completely rigorous because I don’t know them completely rigorously. You can use common sense to reach a consensus in corner cases.
Use a normal deck of playing cards, or two or more identical decks if you want. Deal five cards to each player and set the rest aside to form a draw pile. Cards are played into a discard pile in the center. Players sit in an approximate circle and take turns along the circle, playing one card and then, usually, drawing one replacement card from the draw pile, so in normal 99, hands stay at five cards. When the draw pile runs out, shuffle the discard pile to become the new draw pile.
Shamelessly getting unfinished business out of the way. Yup, that’s me.
Excursion Day 1. We traveled down to Yilan on a bus. I played guess-it with Paul.
I was quite surprised at myself for remembering this game, but I think it’s simple and little-known enough to be worth mentioning. Guess-it is a remarkably pure game of luck and bluffing from one of Martin Gardner’s columns, played with a small odd number of cards, e.g. the 13 cards of one poker suit. The cards are dealt evenly to players (who can look at them) with one card left over, which is kept face down; players take turns choosing one of two actions:
Name a card and ask the other player if he or she has it. These questions must be answered honestly.
Guess the left-over card. The guesser wins if correct; the other player wins if not.
Guess-it is not trivial because sometimes you should ask the other player if he or she has a card that you already see in your hand; otherwise whenever you answered “no” to a query you’d immediately guess that the asked card is the hidden one. It is actually a solved game in the sense that the probabilities of the Nash equilibrium strategy for when to guess and when to bluff have been worked out already, but they’re not simple probabilities by any means and humans are terrible randomizers anyway. A few rounds of it sure beats rock-paper-scissors. I was very amused to lose almost all our games with 11 cards but win almost all of our games with 13.
Okay, no more gratuitous narrative excursions into game-theory. The first stop, National Center for Traditional Arts, was a very laid-back culture place with old-fashioned retro shops and streets.
We watched a 3D glove puppetry (布袋戲) video, in the same session as a lot of the leaders.
I did it!