Detecting fortresses in chess