Version 1.0.2
============= Corrected a major but in move ordering and a major bug in the evaluation function.
This commit is contained in:
@ -34,6 +34,11 @@ public class SuicideChess {
|
||||
*/
|
||||
public static final boolean SQUARE_CHECK_INVALID = true;
|
||||
|
||||
/**
|
||||
* Use mobility in evaluation function (slows the program down a lot)
|
||||
*/
|
||||
public static final boolean USE_MOBILITY = true;
|
||||
|
||||
/**
|
||||
* do move ordering in Alpha-Beta pruning ?
|
||||
*/
|
||||
@ -74,7 +79,7 @@ public class SuicideChess {
|
||||
/**
|
||||
* Adaptative depth -> ie: when only one possible move, don't search. When very few moves, add one to depth.
|
||||
*/
|
||||
public static final boolean ADAPTATIVE_DEPTH = true;
|
||||
public static final boolean ADAPTATIVE_DEPTH = false;
|
||||
|
||||
/**
|
||||
* Adaptative branchin limit
|
||||
@ -89,12 +94,12 @@ public class SuicideChess {
|
||||
/**
|
||||
* Try the primary variation from the earliest iteration first
|
||||
*/
|
||||
public static final boolean PRINCIPAL_VARIATION_FIRST = true;
|
||||
public static final boolean PRINCIPAL_VARIATION_FIRST = false;
|
||||
|
||||
/**
|
||||
* The name to be displayed
|
||||
*/
|
||||
public static final String NAME = "djib's SuShi v1.0.0";
|
||||
public static final String NAME = "djib's SuShi v1.0.2";
|
||||
|
||||
/**
|
||||
* Displays informations in the console.
|
||||
@ -232,6 +237,7 @@ public class SuicideChess {
|
||||
System.out.println("force\t\t\tthe computer will check moves but not play");
|
||||
System.out.println();
|
||||
System.out.println("board\t\t\tdisplays the current status of the board");
|
||||
System.out.println("eval\t\t\tevaluates the current board position");
|
||||
System.out.println("setboard FEN\t\tsets the board according to the FEN position");
|
||||
System.out.println("sd N\t\t\tsets the search depth to n");
|
||||
System.out.println("bk\t\t\tdisplays available openbook moves for current position");
|
||||
@ -258,8 +264,11 @@ public class SuicideChess {
|
||||
try {
|
||||
int problemNb = Integer.parseInt(whatMove.substring(8));
|
||||
bitboard=new Board(SuicideProblems.getProblemNumber(problemNb));
|
||||
if(asciiGame)
|
||||
if(asciiGame) {
|
||||
bitboard.display();
|
||||
displayPlayer(bitboard);
|
||||
}
|
||||
addPlayedPosition(bitboard);
|
||||
} catch (NumberFormatException e) {
|
||||
System.out.println("Not a valid number: "+ whatMove.substring(8));
|
||||
}
|
||||
@ -277,8 +286,10 @@ public class SuicideChess {
|
||||
} else if (whatMove.startsWith("asciiplay")) {
|
||||
asciiGame=false;
|
||||
} else if ((whatMove.startsWith("board"))) {
|
||||
bitboard.display();
|
||||
} else {
|
||||
bitboard.display();
|
||||
} else if ((whatMove.startsWith("eval"))) {
|
||||
System.out.println(bitboard.getBoardValue());
|
||||
}else {
|
||||
int xBoardCommand = XBoardProtocol.getCommand(whatMove);
|
||||
|
||||
switch (xBoardCommand) {
|
||||
@ -314,8 +325,10 @@ public class SuicideChess {
|
||||
OpeningBook.reset();
|
||||
computerPlaying = true; //the computer does not play in foce mode.
|
||||
|
||||
if(playInACSII())
|
||||
if(playInACSII()) {
|
||||
bitboard.display();
|
||||
displayPlayer(bitboard);
|
||||
}
|
||||
//System.out.println("variant suicide");
|
||||
break;
|
||||
case XBoardProtocol.HINT:
|
||||
@ -334,6 +347,7 @@ public class SuicideChess {
|
||||
bitboard=new Board(removePlayedPosition());
|
||||
if (asciiGame) {
|
||||
bitboard.display();
|
||||
displayPlayer(bitboard);
|
||||
}
|
||||
openingPhase = false; //due to the way I implemented the opening book
|
||||
break;
|
||||
@ -345,9 +359,11 @@ public class SuicideChess {
|
||||
break;
|
||||
case XBoardProtocol.SETBOARD:
|
||||
bitboard=new Board(whatMove.substring(9));
|
||||
addPlayedPosition(bitboard);
|
||||
openingPhase = false;
|
||||
if(asciiGame)
|
||||
bitboard.display();
|
||||
displayPlayer(bitboard);
|
||||
break;
|
||||
case XBoardProtocol.SETPLY:
|
||||
try{
|
||||
|
Reference in New Issue
Block a user