use minimax and alpha-beta pruning