Minimax algorithm with alpha-beta pruning on tic-tac-toe