Mar 18 2008

Cheat at Magic the Gathering

Tags: Tollie Williams @ 2:47 pm

I’ve just written and uploaded a very alpha version of a program that will calculate the odds of drawing a particular card (or its copy) in a deck of a given number of cards. In particular it’s designed for Magic the Gathering. I still have a number of things to do with it, including making it look decent and making the opening hand size variable.

Updated: I’ve fixed the code and it works nicely. You can use it and see the code both at: www.tollie.org/files/cardcount.php

Update 2: I’ve broken the math again. Any feedback is welcome. I’ll update it when I get time. Meanwhile, I believe the percentages are close.

In particular, and here’s where I’m asking for comments: my math is a little off in the way I’m accounting for things. Presently, the numbers are high for situations where the target card has copies (ie. cards > 1) due to double accounting for the multiple copies in the same deal. In other words, if you draw two of the target cards in the opening hand, it essentially treats that as two cases of "in opening hand = yes", but only one iteration. Likewise, the numbers are more skewed as the number of cards increases. This explains the > 100% figures.

There are ways to account for this, but I’d like suggestions on ways to do it cleverly without making the code much more complex. For now, the percentages are based on 30,000 "deals."

Thanks for your comments and suggestions. I hope this helps you construct your Magic the Gathering decks mathematically.

Find it (working) and the code here: www.tollie.org/files/cardcount.php


Mar 11 2008

Digg Easter Egg Revisits old “Konami Code”

Tags: Tollie Williams @ 11:50 am

With a tip from Leo Laporte that Kevin Rose, founder of Digg, was over at techcabconfessions.com telling Digg secrets, I hopped on over into the chat room to see what I could catch. I picked up enough bits and pieces here and there to discover what the easter egg was.

If you enter the Konami Code first thing when visiting a Digg page, Digg’s comment system will fetch and display all comments. Yes, you do in fact use the arrow keys, and instead of a start button, follow it up with the Enter key at the end.

Now, this will surely be old news to some - a google blog search seems to point at June ‘07 as the earliest mention (which may be when the new comment system was implemented), but it was new to me.