Pergunta de entrevista da empresa Booz Allen Hamilton

How would you design an AI that plays tic-tac-toe against a human using JavaScript?