Version 1.0.4

=============
Improved move ordering
Changed default values
This commit is contained in:
2006-07-18 23:14:35 +00:00
parent f9ff33b2b3
commit f1e8cd0784
3 changed files with 21 additions and 17 deletions

View File

@ -282,20 +282,20 @@ public class ConfigFile {
10, 10, 10, 10, 10, 10, 10, 10 10, 10, 10, 10, 10, 10, 10, 10
}; };
squareWeightEndgame = new int[]{ squareWeightEndgame = new int[]{
0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10,
0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10,
0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10,
0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10,
0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10,
0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10,
0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10,
0, 0, 0, 0, 0, 0, 0, 0 10, 10, 10, 10, 10, 10, 10, 10
}; };
primaryMobilityValueMidgame = 40; primaryMobilityValueMidgame = 0;
primaryMobilityValueEndgame = 40; primaryMobilityValueEndgame = 0;
secondaryMobilityValueMidgame = 40; //5; secondaryMobilityValueMidgame = 0; //5;
secondaryMobilityValueEndgame = 40; secondaryMobilityValueEndgame = 0;
endGamePawns = 3; endGamePawns = 4;
endGamePieces = 8; endGamePieces = 8;
} }

View File

@ -44,11 +44,15 @@ class MoveCompare implements Comparator<Move> {
} catch (NotAValidSquare e) { } catch (NotAValidSquare e) {
e.printStackTrace(); e.printStackTrace();
} }
/*
if(oneBoardCopy.getBoardValue()<anotherBoardCopy.getBoardValue()) { if(oneBoardCopy.getBoardValue()<anotherBoardCopy.getBoardValue()) {
return sortOrder; return sortOrder;
} else if (oneBoardCopy.getBoardValue()==anotherBoardCopy.getBoardValue()) { } else if (oneBoardCopy.getBoardValue()==anotherBoardCopy.getBoardValue()) {
return 0; return 0;
} }
return -sortOrder; return -sortOrder;
*/
return sortOrder*(anotherBoardCopy.getBoardValue()-oneBoardCopy.getBoardValue());
} }
} }

View File

@ -37,7 +37,7 @@ public class SuicideChess {
/** /**
* Use mobility in evaluation function (slows the program down a lot) * Use mobility in evaluation function (slows the program down a lot)
*/ */
public static final boolean USE_MOBILITY = false; public static final boolean USE_MOBILITY = true;
/** /**
* do move ordering in Alpha-Beta pruning ? * do move ordering in Alpha-Beta pruning ?
@ -99,7 +99,7 @@ public class SuicideChess {
/** /**
* The name to be displayed * The name to be displayed
*/ */
public static final String NAME = "djib's SuShi v1.0.3"; public static final String NAME = "djib's SuShi v1.0.4";
/** /**
* Displays informations in the console. * Displays informations in the console.
@ -498,8 +498,8 @@ public class SuicideChess {
bitboard.display(); bitboard.display();
displayPlayer(bitboard); displayPlayer(bitboard);
} }
computerMove.display(); //computerMove.display();
bitboard.debug(); //bitboard.debug();
} }
if (testAndDisplayIfWinningOrDrawPosition(bitboard)) { if (testAndDisplayIfWinningOrDrawPosition(bitboard)) {