AI chess player

I’m trying to make an AI chess player.

It would be like Puzzle #5: Tic Tac Toe. (Doc gallery) On the solution page, There is an ‘Auto Move’ button that triggers an AI to make a move. Click here to see the page.

Is there any way to make that but Chess instead of Tic Tac Toe?