matthiaslang / jackychess

another opensource uci chess engine written in java
GNU General Public License v3.0
4 stars 1 forks source link

Jacky Chess

A simple UCI chess engine written in Java named after my dog "Jacky"!

The engine is written from scratch as an educational project to learn chess programming. It started as a simple proof of concept experiment within a weekend, but is now derived to a stable playing UCI engine.

I got a lot of inspiration from other resources in the web, mainly the great https://www.chessprogramming.org/ wiki and several open source engines, just to name a few of them: cpw, stockfish, fruit, chess22k.

Features

Goals of the engine

Requirements

Building

At least Java 11 & maven to compile the engine. However, it should run under any newer Java version. It is mainly tested with Java 11 under Linux.

Usage

Simply add the engine to your preferred UCI Gui Client, and then you should be ready to use it. Most clients should be fine to select the jar file directly. You should have a few UCI options able to set in the UI then.

CCRL Rating

Many thanks to the CCRL team for rating my engine. You can find the details on http://ccrl.chessdom.com/ccrl/404/:

Here is a quick overview of my estimated rating and the results from the CCRL team (the numbers maybe outdated):

Version Estimated Rating CCRL Blitz 40/15 40/2 FRC
24.06 2840
24.04 2800 2794 2781 2764
23.12 2760 2695 2731
23.06 2680 2688 2675
0.14.3 2580 2595 2601
0.13.1 2330 -- 2397
0.13.0 2330 2388 --
0.12.0 2180 2284 --
0.10.0 2000 2119 --
0.9.14 -- 1453 --

Copyright

            Jacky Chess 
Copyright (C) 2024  Matthias Lang

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see https://www.gnu.org/licenses/.

Implementation

The chess engine uses following technics/algorithms

UCI Parameter

The engine has some UCI parameter which can be set either by the user interface or via configuration.

Find more information under UCI Parameter

Internal Parameters

The engine has a lot of parameters which are mainly for developing and testing purpose and should not be changed by a regular user.

Parameter Documentation

Versions

see Version History

Build and Development

Building the project

mvn clean package

This will build the project and execute all fast unit tests

mvn clean package -PallTests

this will build and execute all tests including slow ones and will take several minutes to run.

run integration tests

mvn verify

Generate test reports

after building and running tests, call:

mvn surefire-report:report-only

or just

mvn site

Generate a test version with assertions:

mvn clean package -P tests

Generate a release version without assertions:

mvn clean package

Optional Assertion code

The project uses the templating-maven-pluginto change some constant values in the source code during build. It is used in the project to include/exclude some additional test/validation code in the build (just like C Preprocessors).

The class BuildConstants is generated by a template and holds the templated variables. The default profile sets the values to exclude all additional code to generate the fastest code. Other profiles use the additionally generated code. It is possible to set those variables during maven build to override the values, e.g.

mvn clean package -DactivateAssertions=true -DactivateStatistics=true

This is used to add assertions to test versions, but to exclude the complete assertion code from release versions.

todo