Version 1.0.2
============= Corrected a major but in move ordering and a major bug in the evaluation function.
This commit is contained in:
@ -25,9 +25,11 @@ class MoveCompare implements Comparator<Move> {
|
||||
public MoveCompare(Board bitboard) {
|
||||
this.bitboard = bitboard;
|
||||
if(this.bitboard.getCurrentPlayer()==Piece.BLACK) {
|
||||
sortOrder= +1;
|
||||
// low scores are considered "smaller" than high ones and thus will be first after ordering
|
||||
sortOrder= -1;
|
||||
} else {
|
||||
sortOrder= -1;
|
||||
// high scores are consideres "smaller" than low ones
|
||||
sortOrder= +1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,9 +44,9 @@ class MoveCompare implements Comparator<Move> {
|
||||
} catch (NotAValidSquare e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if(oneBoardCopy.getBoardValue()>anotherBoardCopy.getBoardValue()) {
|
||||
if(oneBoardCopy.getBoardValue()<anotherBoardCopy.getBoardValue()) {
|
||||
return sortOrder;
|
||||
} else if (oneBoardCopy.getBoardValue()>anotherBoardCopy.getBoardValue()) {
|
||||
} else if (oneBoardCopy.getBoardValue()==anotherBoardCopy.getBoardValue()) {
|
||||
return 0;
|
||||
}
|
||||
return -sortOrder;
|
||||
|
Reference in New Issue
Block a user