My Octopress Blog

A blogging framework for hackers.

Chess

For Artificial Intelligence, in order to satisfy the final project requirement, I wrote a small chess-playing agent. It’s not horrible, but it’s not going to win any awards. Still, despite its simplicity, I’ve noticed that in games against itself, it exhibits some seemingly second-order behaviors, like forks, pins, skewers and so on. I found that interesting.

I did write a text-based interface for playing against it, but it’s tedious to actually use, and so, having done well in graphics, I decided to write a simple GUI in OpenGL. You can click-and-drag your pieces to where you want them, and then wait for the computer to play. Here’s a screenshot of a game’s conclusion: [caption id=”attachment_213” align=”aligncenter” width=”300” caption=”A game’s conclusion”]A game's conclusion[/caption]

I’d like to give the piece icons transparency on the border so that you can see the underlying square, but that will be a job for tomorrow. Even as it is, I’m pleased with it.