Thursday, August 17, 2006

Someone write this Firefox plugin

I browse with a lot of Firefox windows open and each with many tabs.
I probably never have fewer than a dozen tabs open across three or
more windows. Often, I'll have 50+ tabbs open, and usually Firefox
does alright. Some web sites, however, behave poorly. Whether Flash,
animated images or most often, JavaScript, they use up CPU when I'm
not looking at them. In some cases, this is legitimate and
reasonable. I like the fact that Gmail checks for new mail and is
always reasonably up to date. However, several sites use CPU for no
good reason. For example, the old BGG menu system (which Scott has
thankfully replaced) called setInterval with a timeout of
30ms. For a menu system. Other web sites are worse.
Unfortunately, isolating this sort of problem is hard when you have 30
tabs open. I can see Firefox using 50% CPU, but why?

So, someone needs to write a Firefox "process monitor". It's not
exactly a standard process monitor, in that JavaScript lacks typical
processes, but it would provide a few things. First, it would provide
a list of current setInterval and setTimeout calls
by origin, original scheduled time and remaining time. Second, it
would provide some ability to pause (or even auto-pause, when not in
the foreground) tabs from using CPU resources. This would make fault
isolation easier and would be useful to say, pause everything other
than Gmail. Finally, if possible, it would provide some estimate of
CPU usage on a per-open-page basis, like a traditional process
monitor. Right now, Firefox pops up the "unresponsive script" warning
at some threshhold, so I'm hoping there's some ability to measure the
usage in a more granular way. I don't know enought about SpiderMonkey
to know how feasible any of this is, but I really need it, especially
as more and more nice JavaScript heavy "Web 2.0" apps appear.

For now, Venkman, the JavaScript debugger is of some assistance, but
not nearly as much as I'd like. Is there some other tool out there
I'm not finding that offers some of this capability? Anyone care to write one?

Saturday, August 5, 2006

I am again a father!

My son, Bryce Heitman Gray was born last week, on 7/26/2006.

Tuesday, July 18, 2006

2006 SdJ Virtual Stock Market Results

Once again, the market correctly predicted the outcome of the SdJ jury selection.

Thurn und Taxis, which was consistently the highest priced game in the virtual market, in fact won. Here are the final prices.


Final Market Conditions
GameOfferLastAsk
Aqua Romana9.79.712.0
Blue Moon City21.525.025.0
Just 4 Fun3.33.24.0
Seerauber6.916.011.1
Thurn und Taxis53.053.054.9


But of course, the real question is, who won the market? This year, five users managed to more than double their starting value (each player started with $10,000 and 100 shares of each stock, guaranteed to be worth exactly $10,000 as well). They are:


  • Winner: huber: $54,723
  • Arby: $53,459
  • beckerc: $45,648
  • Automatix: $42,762
  • Ludes: $40,736


All ended the game with no cash, and many shares of T+T. Joe Huber, the winner, also was in the top 6 for total number of transactions at 186. Ludes wasn't far behind at 170 transactions. Arby managed to get 2nd place with only 59 transactions. User "mit" also gets an honorable mention for being the only player who ended with more cash than their starting net worth, at $20,936.

We had roughly the same number of active participants this year, at 126, with 100 people engaging in 10 or more transactions. In various alternate universes, here's who would have won:


  • If Blue Moon City had won, Ninjabob would have won, with over $100,000
  • If Aqua Romana had won, Scurra would have won, with over $200,000
  • If Seerauber had won, aseoghenrik would have won, with over $270,000
  • If Just 4 Fun had won, aldie would have won, with over $370,000

Sunday, June 4, 2006

Game Clusters

A while ago, I href=http://www.mkgray.com:8000/blog/Games/General/BoardGameGeek-Correlations.html>wrote about
game correlations on BGG. I recently thought it would be
interesting to apply a hierarchical clustering algorithm to those
correlations. So I did. What this yields is a
big nested tree of games, not based on shared attributes such as
"Knizia games" or "auction games", but based on correlations among people's preferences.

It produces a lot of interesting results, many very natural, a few
surprising. For example, the GIPF series ends up clustered along with
Go, Crokinole, Ingenious, Abalone, and Quarto. Of course, it also
ends up near Tongiaki and Oasis, which is a little surprising.

Pretty much all of the mass-market games get clustered together, with
Baloon Cup and Street Soccer being slightly surprising "visitors" to
that cluster. Then, there's the "traditional games" cluster which
ends up with a handful of Kosmos 2-players in the same parent cluster.
Those form a super-cluster with the mass-market games, with Tichu and
Sleuth thrown in.

Another surprising grouping was that the "chaotic game" cluster
(Democrazy, Fluxx, Castle, etc) ended up as a sub-cluster of a larger
cluster dominated by heavy and involved games and a bunch of Steve
Jackson games. I would not hae expected Civilization and "Devil Bunny
Needs a Ham" to end up so close.

I was slightly surprised that there was no single "party games"
cluster. Some, like Apples to Apples, ended up in an abstract games
super-cluster. Others, like Pictionary and Balderdash ended up in a
mini party-games cluster along with a bunch of slightly older Euro
games. Still others like Catchphrase end up in the residual outer
cluster of games that aren't especially strongly linked at all.

Perhaps the greatest trend is the extent to which games that came out
around the same time end up clustered. Perhaps Java, Torres and Ta Yu
have some other commonality other than all coming out 1999-2000, but
that seems an obvious shared attribute.

Are there any clusters that havve an obvious theme/category for 100%
of the games in them other than the ones I've already labeled?

Saturday, June 3, 2006

Charts for the SdJ Virtual Stock Market

You can now see charts for the SdJ market. The charts are updated every 30 seconds.

Tuesday, May 30, 2006

SdJ 2006 Virtual Stock Market Game

As we are about to enter the season of speculating over who will win
the Spiele des Jahres this year, I thought it would be nice if people
could put their (fake) money where their mouth is and participate in a
virtual stock market. I implemented a virtual stock market for this last year, a good time was had by all, and then I lost the system in a disk crash. I rewrote it.

The basic idea is that you buy "shares" in the various games and only
the eventual SdJ winner pays out in the end ($100 per share). So, go
put your prognostication skills to the test in the href=http://www.mkgray.com:8000/sdj-market>2006 Spiele des Jahres Virtual Stock Market Game.
I'll post the top few "winners" when the award is given.

You can also see the results from last year.

Sunday, May 28, 2006

The "Gentle Seduction", faster than I guessed

In 1989, I read "The Gentle Seduction" by Marc Stiegler, in Analog magazine. It was a wonderfully optimistic tale of gradual but powerful adoption of technology by a skeptical woman. It stands out as one of a small number of stories that I still remember in vivid detail. One of the compelling images from the story to me was a scene in which the woman was hiking on a mountain wearing a "headband", essentially a neural-interface PDA:

For a moment she wished she could see it from above as well--and her heart skipped a beat as the wish came true. Suddenly she was looking down from a great height. She saw the long curves of shadows across the snow from high above, and she saw the shorter but distinctive shadow of a woman with a pack standing on the snow field. She threw the headband to the ground even as she realized what she had just seen: a view of the Mountain from a satellite passing by.


At the time I read this, this seemed a wonderfully amazing and futuristic notion. I was enamored by the idea of this kind of casual and seamless integration of technology. While the story wasn't explicit about dates, the above passage supposedly occured sometime around 2080.

Yesterday, we went out to dinner. We were going a little early and the weather was very nice, so we wondered if there was a playground nearby we could take our daughter to. Most maps don't depict playgrounds, but I brought up Google Maps sattelite view and scanned the area until I found this playground barely a block from where we usually park. After dinner, we walked over to the park and my daughter swung on the swings and had a great time.

Google Maps isn't "live", I wasn't accessing it from a mobile device (though I could have), and the interface was far from "neural", but the features that made the story so striking to me 17 years ago were all true. I had casually thought, "I bet there's a playground in thatarea. Let me look." Moments later, I had a high-resolution satellite map of the area, enough to pick out the shadow of a swingset. Pointing out that technology has advanced at a remarkable rate and we
live in an age of technological wonders is beyond passe, but the parallel between that scene from "The Gentle Seduction" and my life yesterday compelled me to write about it.

To cap it off that "the future is now" feeling, as I was writing this, I thought, "Wouldn't it be nice if I could find the text of the story online, rather than digging through old boxes of magazines to find the relevant quote?" That thought, a few words into Google and here we go: The Gentle Seduction by Marc Stiegler. I highly recommend it.

Sunday, May 21, 2006

A bound for game collection size

One common discussion that comes up among avid acquirers of boardgames
is "How many is too many?", or to put it another way "How many games
can I justify owning?" I decided to take a look at this
mathematically, by defining some assumptions and analyzing some data.

Let me state my assumptions. First, I assume the vast majority of a
game collection is to be played. I don't acquire games to "collect",
I acquire them to play them. Sure, some fraction of my games may be
kept for nostalgia or other purposes, but it's probably about 10%. We
can tack that on at the end. Second, I assume I don't actually care
about whose copy of a game I play. If a game is worth playing, it is
worth owning, even if I may end up occasionally or frequently playing
someone else's copy. Third, I assume I want to have the reasonable
expectation of playing the bulk of the games in my collection every
several years. The exact value of "several" affects the collection
maximum, but not by an overwhelming amount. The exact value of "the
bulk" has a more linear impact, but it's a good number to use to
characterize how willing one is to have games you may not play in the
name of having greater selection. Finally, I assume some fraction of
titles played I will have no interest in owning.

Next, I looked at the data. The number of different games played in a
particular interval fits an impressively reliable curve. Based on the
past 6.5 years of data, I can say with high confidence that in any
given month, I will play about 32 titles. In 6 months, 145 titles,
with obviously some overlap from month to month. In a year, 250
titles. Looking at a full range of time periods I was able to fit a
curve that fits very well. Now, for any period I can give a
reasonably confident estimate of how many different game titles I
would likely play in that time period.

Next, I had to pick out the various threshholds. How many years
should I allow to play the whole collection? Well, I think 5 years is
about reasonable, but will also calculate for 50 years (the remainder
of my life, roughly) to get an absolute upper bound. Next, what
fraction of games I play am I interested in owning? The number seems
to be about 50% of those I play. Finally, what fraction of games I
own do I want to play in that period? I'd say about 70%. Having 30%
provide a buffer of selection seems reasonable. Finally, I'll add the
10% nostalgia number on the end.

So, let's do the math: In 5 years, the curve says I will play about
740 distinct titles. In 50 years, I will play about 2000 distinct
titles. Cut those in half, to eliminate the 50% I don't need to own
and you get 370 and 1000. Add in the "selection buffer" for variety
and the numbers become 528 and 1428. Finally, add in some for
nostalgia and the occasional "collectible" and you get 580 and 1571.
The good news is, in either case, I can keep buying new games.

So, in an effort to help others justify their own game collections,
I've created a tool that does all the math for
you.
Naturally, it's a bit of an approximation, since I can't do
the full curve fit and your curve may even be different form mine, but
it's reasonable to guess that it may not be tha far off. Enjoy.

Monday, May 8, 2006

Two BGG things

I've done a couple of new BoardGameGeek-related things lately as well as some expansion and documentation of the XML API I wrote about before. Specifically, I created a Greasemonkey fix to the buggy BGG menus, a stripped down "BGG mobile" and some minor schema changes and improved features in the BGG XML API.

Over the past several months, I've been noticing some annoying slowness in Firefox. It seemed intermittent, and I finally got around to tracking it down. It turns out the culprit was the BGG dropdown menus. For whatever reason (a bug I assume) they do a little callback every 55ms. This is insane, for a dropdown menu, especially since it's always running. Scott is aware of the problem, has contacted the provider of the menus and will hopefully eventually roll out a fix. In the meantime, I didn't want every open BGG tab using up a chunk of CPU. When you've got 15 tabs open, it really adds up. So, using a combination of AdBlock to block the /udm-resources/* URLs from the geek and a greasemonkey menu replacement script, it is fixed. Rather than do something slick like replace the menu system with something better in every way, I just replaced it with a big pop-up accessible via a "menu" link at the top of the page. I use the menus rarely enough that this is more than good enough for my purposes. The CPU issues are gone. If you don't know what Greasemonkey is, read my post on Greasemonkey.

I finally got a web browser for my Blackberry. It's slow, but
functional. While it actually manages to render BGG, it is almost
unusable as an interface, simply because BGG tends to assume a
reasonably large screen. So, using the XML API, I wrote my own href=http://www.mkgray.com:8000/cgi/bgg>BGG Mobile. It's purely an interface to game
information, and only the basics at that. The idea is, if I'm in a
game store, thrift store or whatever, I can find out if a particular
game is any good. It shows me it's rating, basic information, and
user comments. It's got two additional things worthy of note. First,
it translates the rating into a number of stars that is entirely
arbitrary, but matches my gut feeling for significant cutoffs. That
is, the difference on BGG between a 6.0 game and a 7.0 game is much
more significant than the difference beween a 4.0 and a 5.0, and even
more than the difference between a 7.0 and an 8.0. A 6.0 game isn't
very good. A 7.0 game is. Additionally, it shows "consensus comments"
for games with a lot of comments. These are generated via textual
analysis of the existing user comments on a game, and it automatically
picks the 5 most representative comments. Both of these features (the
"BGG mobile" interface and the consensus comments, not the stars) will
probably eventually make it to BGG proper, but in the meantime, enjoy
them on my site.

Finally, I've made various bug fixes and feature improvements to the
BGG XML API. Most usefully, check out the href=http://www.boardgamegeek.com/xmlapi/>BGG XML API
Documentation.

Sunday, May 7, 2006

Letterboxing

I saw a listing for a class about another interesting hobby called href=http://www.letterboxing.org/index.php>Letterboxing. It
sounds a lot like GeoCaching, but without a GPS. Using a "clue",
which may be straightforward directions, obscure directions or an
involved puzzle, one locates a "letterbox". Neat.