Minimax lets the computer brute-force all the possible moves to find the optimal ones. Given below are 2 examples