I'm writing a simple chess program from scratch on a hobbyist basis. I think there is something fundamental I'm overlooking or don't understand.
I read the following http://chessprogramming.wikispaces.com/Alpha-Beta, as well as other articles, e.g. the Wikipedia one. I've also implemented alpha-beta blindly before just by following pseudo-code. I believe I understand how alpha-beta can guarantee no unsafe pruning takes place on a complete search tree, i.e. if you have the whole search tree, and there are no unexplored nodes beyond the horizon.
What I don't understand is how alpha-beta can guarantee no unsafe pruning takes place on an incomplete search tree which does contain such unexplored nodes beyond the horizon, which chess always results in, unless evaluating endgames with a small enough tree.
Consider the following explanation from: http://chessprogramming.wikispaces.com/Alpha-Beta
Say it is White's turn to move, and we are searching to a depth of 2 (that is, we are consider all of White's moves, and all of Black's responses to each of those moves.) First we pick one of White's possible moves - let's call this Possible Move #1. We consider this move and every possible response to this move by black. After this analysis, we determine that the result of making Possible Move #1 is an even position. Then, we move on and consider another of White's possible moves (Possible Move #2.) When we consider the first possible counter-move by black, we discover that playing this results in black winning a Rook! In this situation, we can safely ignore all of Black's other possible responses to Possible Move #2 because we already know that Possible Move #1 is better.
This seems to be false to me, exploring further nodes on the branch of "Possible Move" #2, e.g. a couple more ply, could result in black being guaranteed checkmate?
Hence pruning away this as a possible move is not safe.
What am I missing?
I know this ties in with the horizon effect and quiescence search, however I don't understand how alpha-beta alone, when used in this way on an incomplete search tree can be considered "safe". But I'm sure there is something I'm overlooking and it would be great with some pointers.