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:

A game's conclusion

A game's conclusion

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.

Tagged with:
 

This is our first assignment (due this coming Wednesday), and seems relatively appropriate. I’ll let Wikipedia give you background.

I pounded it out in about 10-20 minutes in Ruby, and seems like a good chance for me to refresh my Dr. Scheme (it’s been about a year, except for a pop quiz from Matt Matteson). Although it’s really not a difficult problem to solve nor that much of a feat to code for it, I really enjoy the simplicity of the solution. It reminded me a lot of a really elegant solution to the Tower Of Hanoi problem that Prof. Rader showed us in Data Structures.

Additionally, it’s always fun to take first steps in a buzz-word-titled class: Artificial Intelligence.

Tagged with:
 

It’s that time of year again – overly zealous and naive freshmen and buying books.

One of the biggest things to help me pay for my books has been softcover international editions. Some of my friends in inferior disciplines (not engineering) say that they can’t find international editions of their books – it might just be a technical book thing. At any rate, I recently ordered three of my textbooks from Abebooks, and spent a total of $137 (shipping included) for three books that the campus book store would have charged me $400+ for. All this for getting softcover international editions as opposed to U.S. hardcover editions.

The prize of this collection is my Artificial Intelligence book ($90 at the book store) for which I paid the mere pittance of $16 U.S. (including $8 of shipping).

I’ve done this in the past, and the books are identical, page for page, and word for word. They even come adorned with a warning that they are not for sale in the United States:

This edition is manufactured in India and is authorized for sale only in India, Bangladesh, Bhutan, Pakistan, Nepal, Sri Lanka and the Maldives. Circulation of this edition outside of these territories is UNAUTHORIZED.

Or the more specific:

RESTRICTED! Not For Sale In The United States.

I can only hope that this is not to squeeze more money out of us.

Oh. And I suppose I should mention that these books that I bought are all brand-spanking-new.