We do not know for sure because current computers cannot be sure play is “perfect”. To assure perfection, it is necessary to evaluate all possible moves. The number of possible games is approximately 10 followed by 100 zeros.
The good news is that after about 10 moves, the number of possible games is greatly reduced. Computer players like “Deep Blue” are able to evaluate every possible move to the end of the game after a certain number of moves. Until then, the computer needs to use pattern recognition and encyclopedic knowledge of every chess game ever documented. However, if there is a brilliant move that is not in a documented game and beyond the depth of moves the computer can evaluate, the computer will not “see” the move and will therefore play imperfectly. This is fundamentally why humans can still sometimes defeat computers.
If you are interested, checkout Wikipedia’s “Minimax Algorithm” and “Alpha Beta Pruning”.
Latest Answers