It basically explores all possible moves and all possible countermoves and selects the best one. Of course it is extremely well engineered and optimized, but this is the main concept.
As a consequence, it does not to be "trained" on a dataset with odds to play without a piece.