If the AI just selects a random square, it's not going to be very competitive :p
After putting up the code to make a random move, the only way to defeat the computer will be to create a fork.
I decided to improve the computer player in steps. Firstly, I just made it a random blocker, and made it check for any row that can cause a victory or defeat.
What is the need for recursion here?
I find recursion the most straight forward method of doing something that has conditional checking, and then beginning again, with different values.