Version 0.9.4
============= Corrected undo bug Added iterative deepening
This commit is contained in:
@ -47,7 +47,7 @@ public class SuicideChess {
|
||||
/**
|
||||
* Quiescence search -> don't evaluate if captures are possible.
|
||||
*/
|
||||
public static final boolean QUIESCENCE_SEARCH = false;
|
||||
public static final boolean QUIESCENCE_SEARCH = true;
|
||||
|
||||
/**
|
||||
* The name to be displayed
|
||||
@ -82,6 +82,10 @@ public class SuicideChess {
|
||||
* Maximum number of Plies the computer will ever go to
|
||||
*/
|
||||
public static final int MAX_PLY_DEPTH = 8;
|
||||
/**
|
||||
* Quiescence limit (ie. if more than that many possibilities of capturing, don't analyse further.
|
||||
*/
|
||||
public static final int QUIESCENCE_LIMIT = 5;
|
||||
|
||||
/**
|
||||
* Test and display if the board is in a winning state.
|
||||
@ -127,7 +131,8 @@ public class SuicideChess {
|
||||
* This function is used to undo the last position played
|
||||
*/
|
||||
private static Board removePlayedPosition () {
|
||||
allPlayedPositions.remove(0);
|
||||
if(allPlayedPositions.size()>1)
|
||||
allPlayedPositions.remove(0);
|
||||
return allPlayedPositions.get(0);
|
||||
}
|
||||
|
||||
@ -204,6 +209,7 @@ public class SuicideChess {
|
||||
System.out.println("remove\t\t\tundoes a full move");
|
||||
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("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");
|
||||
@ -396,6 +402,7 @@ public class SuicideChess {
|
||||
//allLegalMoves.get(foundMoveIndex).display();
|
||||
//System.out.println("Board value: "+bitboard.getBoardValue());
|
||||
bitboard.display();
|
||||
displayPlayer(bitboard);
|
||||
}
|
||||
playedALegalMove=true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user