Weird. This was also the subject of my final year project at University. My AI creation was written in ‘C’ on Unix and used the curses package.
However, my effort wasn’t so accomplished, had severe problems when a piece was crowned and didn’t implement the ‘huffing’ rule correctly.
Having said that, it did beat me on four occasions.