Geek Smithology

February 28, 2009

It’s ALIIIIIVE!!1!

Filed under: Announce,Craft of Dev,Ruby by Nathan @ 11:34 pm

chess Shortly after I left Service Intelligence all those years ago, a small panel convened at a Tim Horton’s to discuss the future. Well, actually, it was me, The Ront and Foo and since we seemed to like working together we figured we’d write a game of some kind. After not a whole lot of thought we figured we’d go ahead and write a chess game in Java. We didn’t really get anywhere with that, though. Then it happened.

I remember it like it was yesterday. But really, it was right after No Fluff Just Stuff 2005. My eyes were opened and it was decided right then and there that the chess game would written in Ruby. Sure it’s not the most “performant” language for chess calculations, but I wanted to learn Ruby and it’s always better to have a real project to work toward.

We decided to call it “pawnzilla”, for all the reasons you can imagine someone might want to call a chess engine pawnzilla. It’s been a bit of a roller coaster – we went through a horrible OO implementation, transition to 64-bit love and bitboards, and a fairly recent switch from sourceforge to GitHub, but after three and a half years (maybe a couple person months total effort – it’s tough to get time to work on this stuff!) I finally realized a dream, and played a game against my own chess engine.

It was pretty anticlimactic. All of the time so far has been spent working on a complete rules engine (this turns out to be quite a difficult proposition!), so the AI is pretty stupid. So stupid that the game lasted only 7 moves. But still, after all this time, it was great to watch pawnzilla make moves and actually “understand” that the game was over.

I think that we’ve implemented some pretty cool ideas in pawnzilla (including our domain specific approach to testing) and now that there is finally something to see, I hope to start blogging about some of those ideas. The next big goal is to develop the AI into something that doesn’t suck and hook it up to the free internet chess server so that it can get rated. So far it’s been a hell of a ride, and even though it took so long, it’s nice to get to such a significant milestone in my own labour of love.

If you’d like to see it, pawnzilla is licensed under the Apache 2.0 license and you can check it out over on github. And if anyone out there wants to play with a pure-ruby chess engine (should be a lot of fun just to work on different AI strategies now that the rules engine is in place) drop me a line and I’ll be happy to talk about it.

So cheers to pawnzilla.

February 1, 2009

This is your project on Git…

Filed under: Craft of Dev,Ruby by Nathan @ 3:36 pm

There’s been a lot of noise ’bout distributed source control the last year or two, especially with regard to Linus’ other baby, Git. Even I’ve bit – moving pawnzilla from sourceforge to GitHub last year, with serious thought to going with gitsvn in my professional life.

Stuart over at Relevence even went so far as to say that If you run a significant open source project that is not on a distributed SCM, it is a clear warning sign that you are a dinosaur.

He points to a pretty brilliant data visualization of commits to the rails project over the years. Take a look around April 2008, when they moved to Git. Make sure to watch the HD version fullscreen, it’s truly something to behold.

As always, our friends the pragmatic programmers have a book about Git to get you started on the road to enlightenment. (Or distributed SCM, as if they aren’t the same thing…)

February 27, 2008

Domain Specific Adventures in Real Life

Filed under: Craft of Dev,Ruby by Nathan @ 6:49 pm

Fatal error: Call to private method CodeColorer::performHighlightCodeBlock() from context '' in /data/5/0/134/72/297561/user/302314/htdocs/blog/wp-content/plugins/codecolorer/codecolorer-core.php on line 55