Algorithm to find best move in tic-tac-toe.

What is the algorithm to find the best move in tic-tac-toe game using recursion? I tried a lot but don’t seem to figure it out. Thank You!