Great ways to approach "tic tac toe" a.i

I’m trying to figure ways to approach a “smart” enemy. Maybe someone could give me a boot in the correct direction.

Thank you!