Monthly Archives: May 2007

Minimum Sudoku

As I worked on my checkers program, I’ve gone to a number of bookstores looking for books on checkers. Unfortunately, checkers has gone the way of the dodo: you might find a copy of Pike’s book of Checkers problems, or maybe Hopper’s book, but literally nothing else is in print. It’s kind of sad, when you consider that at my local borders there is an entire rack, eight separate rows, of books on Sudoku puzzles, something I consider to be of very minimal interest. In fact, whenever I try a sudoku, I can’t help but think that the only reason these things exist is to motivate the writing of an automatic solver in the language of your choice.

Still, the puzzles themselves (as a class) have some interesting properties. One might ask “what is the minimum number of non-blank entries that a Sudoku puzzle can have, and still have only a unique solution?” Currently, it appears there are a number of 17 number puzzles, but no known instances of a puzzle with only 16 numbers. You can download 36,000+ puzzles that have only 17 numbers at the link below, and use them to test either your own abilities, or the abilities of the program you write.

Minimum Sudoku

Boredom, 10% of your Brain, and The Awesome Power of Spare Cycles

I spend what I think is a very substantial part of my life thinking. Not the usual kinds of thinking, like what am I having for dinner, how much money is left in my checking account, or whether the people I work with like and respect me. Don’t get me wrong: I do spend time thinking about those things. But I seem to spend a lot more time thinking about some different kinds of things. Like how to write a checkers program that can beat master level players. Like whether podcasting is actually effecting a change in the nature of communication in society. Like whether I could create a PVR that was simple to install and use on my Linux box. Or even whether I can create an Enigma machine simulator on an Atari 2600.

These things are pretty eclectic, but I really can’t imagine my life without these kinds of thoughts. I think the biggest problem would be that without these (admittedly obscure) topics to keep my mind busy, I’d simply be bored. Bored out of my mind. It’s not that any of these things are really important, they are just colorful billboards along the at times boring straight patches of the highway that is human life. I suspect that we owe much of the Web and the open source movement to feelings of boredom.

A more erudite exposition can be found here:
The Long Tail: The Awesome Power of Spare Cycles

Checker Endgames with only Kings

I haven’t had any time to work on my checkers program with any degree of concentration. I was trying to work out some of the details in creating an endgame database, and thought that maybe I could prototype an example fairly quickly. The particular endgame I was most interested in was the 3 kings versus 2 king database, which is a bit complicated for beginners like myself to master, but key to understanding the game (amateurs can often not find the winning combinations even when playing with the 3 king side). Anywhoo, if you have only kings, the math of calculating how many positions there are for each combination is pretty straightforward, and I coded up a Python script that computed these numbers in a few minutes:

1 0              32
1 1             992
2 0             496
2 1          14,880
2 2         215,760
3 0           4,960
3 1         143,840
3 2       2,013,760
3 3      18,123,840
4 0          35,960
4 1       1,006,880
4 2      13,592,880
4 3     117,804,960
4 4     736,281,000
5 0         201,376
5 1       5,437,152
5 2      70,682,976
5 3     589,024,800
5 4   3,534,148,800
5 5  16,257,084,480

It seems that generating a 3×2 database with Python would certainly be in the realm of feasibility.

[tags]Checkers,Programming[/tags]

A few notes..

  1. I’m on what is scheduled to be my last week of production on Ratatouille. If my blog isn’t fascinating in the degree that you have come to expect, that’s probably one of the reasons. I haven’t had much time for extra-curriculars. I’ve had a blast on Ratatouille, and hope you all enjoy it when it hits theaters on June 29.
  2. Congratulations to the Golden State Warriors. They made history by being the first team in NBA history to defeat the #1 seed as a #8 seed. I must admit that I have enjoyed watching their games down the stretch. While I believe basketball to be inferior to baseball in every respect (heh) I find their style of basketball to be more entertaining and more in sync with the fast-breaking style that I liked as a kid.
  3. l’m trying to decide whether I should by a new motherboard for my son’s computer, or just avoid the headache and buy him a new computer. It is basically a question that is decided on the “how much is my time and aggravation worth”? This week, I’m leaning towards “quite a bit”.

Have a good weekend all.

Jonathan Coulton made me laugh today…

My wife has been trying to get me to listen to a song called “Code Monkey” from someone named Jonathan Coulton. I didn’t have any idea who he was, but somehow today I ended up at his website listening to a song called Chiron Beta Prime. It’s a free download from his website, and it cracked me up. Nothing like a Christmas song with robots. Anyway, check out his site, and buy his music.

Addendum: Code Monkey is pretty awesome too. As is this video: