Skip to content

Commit

Permalink
1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Senders authored and Senders committed Apr 26, 2017
1 parent 713d029 commit d6a8be6
Show file tree
Hide file tree
Showing 42 changed files with 1,414 additions and 1,296 deletions.
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
# chess22k

A chessengine build in Java that uses the UCI protocol to communicate with graphical interfaces.
Should be used with a 64 bit JRE. Score is about 2400 elo.
Uses Ed Schroder's king safety idea but this has been disabled for the moment.
Should be used with a 64 bit JRE. Score is about 2500 elo.

Features
###Features
- (magic) bitboards
- transposition tables
- (internal) iterative-deepening
- killer-moves and history-heuristics for move ordering
- principal variation search
- null-move pruning
- (static) null move pruning
- razoring
- late move reductions
- static exchange evaluation
- aspiration window
- no openingbook or endgame tablebases
- no pondering

Future
- NEVER loses on time
###Future
- fix certain node-explosions in endgames
- futility pruning
- improve evaluation function (king-safety, ...)
- tapered eval
- tweak values
- ...



"Simplicity is the soul of efficiency"
- Austin Freeman
_"Simplicity is the soul of efficiency"_ - Austin Freeman -

5 changes: 3 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@

<!-- so we can simply build other (experimental) artifacts -->
<!-- artifactId>${engineName}</artifactId -->

<artifactId>chess22k</artifactId>
<version>1.2</version>
<version>1.3</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -38,7 +39,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<version>3.6.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
Expand Down
15 changes: 13 additions & 2 deletions release-notes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
1.3 - 26-04-2017 - 2500 elo
- enabled king-safety (based on Ed Schröders idea)
- implemented razoring
- implemented static nullmove pruning
- recognition of bishop and rook underpromotions (so it doesn't crash anymore)
- changed pawn-shield and pawn-storm implementation
- updated LMR
- fixed running out of time
- fixed some engine crashes


1.2 - 19-03-2017 - 2400 elo, this time for real? :P
- improved passed-pawn scoring in endgames
- added time to UCI output
Expand All @@ -8,15 +19,15 @@
- bugs, again ;)


1.1 09-02-2017 (2400 elo)
1.1 - 09-02-2017 - 2400 elo
- re-enabled mobility evaluation
- knight outposts
- implemented king safety (using Ed Schroders idea), but disabled for the moment
- check-aware quiescence-search
- bug fixes, of course


1.0 13-01-2017 (2300 elo)
1.0 - 13-01-2017 - 2300 elo
- (magic) bitboards
- transposition table
- (internal) iterative-deepening
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/nl/s22k/chess/CastlingUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public static void castleRookUpdateKeyAndPsqt(final ChessBoard cb, final int kin
cb.friendlyPieces[cb.colorToMove] ^= 5;
cb.pieceIndexes[0] = EMPTY;
cb.pieceIndexes[2] = ROOK;
cb.zobristKey ^= cb.zkPieceValues[0][WHITE][ROOK] ^ cb.zkPieceValues[2][WHITE][ROOK];
cb.zobristKey ^= ChessBoard.zkPieceValues[0][WHITE][ROOK] ^ ChessBoard.zkPieceValues[2][WHITE][ROOK];
cb.psqtScore += EvalConstants.ROOK_POSITION_SCORES[cb.colorToMove][2] - EvalConstants.ROOK_POSITION_SCORES[cb.colorToMove][0];
return;
case 57:
Expand All @@ -166,7 +166,7 @@ public static void castleRookUpdateKeyAndPsqt(final ChessBoard cb, final int kin
cb.friendlyPieces[cb.colorToMove] ^= 0x500000000000000L;
cb.pieceIndexes[56] = EMPTY;
cb.pieceIndexes[58] = ROOK;
cb.zobristKey ^= cb.zkPieceValues[56][BLACK][ROOK] ^ cb.zkPieceValues[58][BLACK][ROOK];
cb.zobristKey ^= ChessBoard.zkPieceValues[56][BLACK][ROOK] ^ ChessBoard.zkPieceValues[58][BLACK][ROOK];
cb.psqtScore -= EvalConstants.ROOK_POSITION_SCORES[cb.colorToMove][58] - EvalConstants.ROOK_POSITION_SCORES[cb.colorToMove][56];
return;
case 5:
Expand All @@ -175,7 +175,7 @@ public static void castleRookUpdateKeyAndPsqt(final ChessBoard cb, final int kin
cb.friendlyPieces[cb.colorToMove] ^= 0x90;
cb.pieceIndexes[7] = EMPTY;
cb.pieceIndexes[4] = ROOK;
cb.zobristKey ^= cb.zkPieceValues[7][WHITE][ROOK] ^ cb.zkPieceValues[4][WHITE][ROOK];
cb.zobristKey ^= ChessBoard.zkPieceValues[7][WHITE][ROOK] ^ ChessBoard.zkPieceValues[4][WHITE][ROOK];
cb.psqtScore += EvalConstants.ROOK_POSITION_SCORES[cb.colorToMove][4] - EvalConstants.ROOK_POSITION_SCORES[cb.colorToMove][7];
return;
case 61:
Expand All @@ -184,7 +184,7 @@ public static void castleRookUpdateKeyAndPsqt(final ChessBoard cb, final int kin
cb.friendlyPieces[cb.colorToMove] ^= 0x9000000000000000L;
cb.pieceIndexes[63] = EMPTY;
cb.pieceIndexes[60] = ROOK;
cb.zobristKey ^= cb.zkPieceValues[63][BLACK][ROOK] ^ cb.zkPieceValues[60][BLACK][ROOK];
cb.zobristKey ^= ChessBoard.zkPieceValues[63][BLACK][ROOK] ^ ChessBoard.zkPieceValues[60][BLACK][ROOK];
cb.psqtScore -= EvalConstants.ROOK_POSITION_SCORES[cb.colorToMove][60] - EvalConstants.ROOK_POSITION_SCORES[cb.colorToMove][63];
return;
}
Expand Down
Loading

0 comments on commit d6a8be6

Please sign in to comment.