Python 3, 18 bytes
Try it online!
This brilliant AI will always force a tie, and sometimes win if you let it.
The grid is numbered in a spiral, like so:
1 2 3
8 9 4
7 6 5
and the computer always goes first. For the first move, input "10". This is a little redundant because it always goes in the same place, but it's already ...
Python 3: 341 bytes
So, my first attempt of code golfing, nice challenge! I thought of something similar myself with a complete game in mind though. Here is the AI code:
def e(b,t):return any([b[i]==b[i+d]==b[i+2*d]==t for i,d in((0,1),(3,1),(6,1),(0,3),(1,3),(2,3),(0,4),(2,2))])
if e(b,t):return 0,1
if e(b,-t):return 0,-1