Jan 13, 2012

tic-tac-toe AI with two-ply minmax in scheme

Today, while I am reorganizing my old programming source code files, I stumbled upon this old gem —  an implementation of tic-tac-toe AI using two-ply min-max in scheme — which is my project for AI course in university.

Although it was only a half and a year ago, I have already forgot how it works. Besides at that time, I wrote it using plt-scheme, which has become racket now. So, I decided to find out whether the program still works under racket and went through this unbearable pang of downloading racket — a familiar emotion for Internet users inside Myanmar. After waiting for a few hours, I was ready to animate my old friend.



Yeah, it still works, and as far as I tested, the AI is unbeatable. Since this kind of projects are common in university AI courses, I decided to post it online to help some pour souls trying to meet his assignment deadline — that I was once.

Please, note that the evaluation function is too complex and poorly written that I even myself had a hard time understanding. So, you might want to rework that one.

To try out this program, just install racket & run.
sudo apt-get install racket
racket ttc.scm

Jan 11, 2012

nautilus-renamer 3.0 released

Highlights
The main change is that now nautilus-renamer uses PyGobject, instead of static pygtk bindings. In other words, it uses gtk3 now. The other big change is radio buttons in previous versions are replaced with buttons, so that patterns, substitutions and case can be applied simultaneously. Nautilus extension is also added by Amr Osman. Debian packages are also available now.

Download

Downloads are available here. If you want to install as a nautilus script for a single user, download source package, extract and type "make localinstall" in terminal to install. Download the deb package to install as nautilus extension. After installation, "Mass Rename" will appear in nautilus context menu, if you have selected more than 2 files.

Screenshots