ai is implemented using minimax and alpha-beta pruning