Common Lisp implementation of some data compression algorithms — Run-Length, Huffman, and Shannon–Fano Encodings — that I have written during my graduate course "Data Compression".
Showing posts with label lisp. Show all posts
Showing posts with label lisp. Show all posts
Jun 20, 2013
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.
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.
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
racket ttc.scm
Subscribe to:
Posts (Atom)
