 This evaluation continues until a certain maximum search depth or the program determines that a final "leaf" position has been reached (e.g.checkmate).At each ply the "best" move by the player is selected; one player is trying to maximize the score, the other to minimize it.