Version 0.8.0
============= Just before creating the external config file
This commit is contained in:
@ -157,6 +157,13 @@ public class ComputerPlayer {
|
||||
"\t"+((int)(thinkingEndTime.getTime()-thinkingBeginingTime.getTime())/10)+ //search time in centiseconds
|
||||
"\t"+nodesSearched+"\t"+bestScore.getPrincipalVariation());
|
||||
}
|
||||
|
||||
if((bitboard.getCurrentPlayer()==Piece.BLACK
|
||||
&& bestScore.getBranchValue()==Board.BLACK_WINS)
|
||||
|| (bitboard.getCurrentPlayer()==Piece.WHITE
|
||||
&& bestScore.getBranchValue()==Board.WHITE_WINS)) {
|
||||
break; //no need to continue iterative deepening.
|
||||
}
|
||||
|
||||
}
|
||||
if(SuicideChess.playInACSII()) {
|
||||
@ -249,6 +256,11 @@ public class ComputerPlayer {
|
||||
"\t"+nodesSearched+"\t"+bestVariationSoFar);
|
||||
}
|
||||
//System.out.println("*** Clear ");
|
||||
if(bestScoreSoFar==Board.BLACK_WINS) { //found a win, no need to go further
|
||||
if(SuicideChess.playInACSII()) System.out.println("Found a win !");
|
||||
bestMoves.add(allLegalMoves.get(i));
|
||||
return new ReturnWrapper(beta,bestScoreSoFar,bestVariationSoFar);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(currentDepth==0) {
|
||||
@ -294,6 +306,11 @@ public class ComputerPlayer {
|
||||
"\t"+((int)((new Date()).getTime()-thinkingBeginingTime.getTime())/10)+ //search time in centiseconds
|
||||
"\t"+nodesSearched+"\t"+bestVariationSoFar);
|
||||
}
|
||||
if(bestScoreSoFar==Board.WHITE_WINS) { //found a win, no need to go further
|
||||
if(SuicideChess.playInACSII()) System.out.println("Found a win !");
|
||||
bestMoves.add(allLegalMoves.get(i));
|
||||
return new ReturnWrapper(alpha,bestScoreSoFar,bestVariationSoFar);
|
||||
}
|
||||
//System.out.println("*** Clear ");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user