Giter Site home page Giter Site logo

sauce-code / cuckoo Goto Github PK

View Code? Open in Web Editor NEW
16.0 6.0 16.0 390 KB

This is an adaption of Peter Österlund's CuckooChess 1.12. The source code provided is a Java Maven project in UTF-8. The program, except for the chess font, is copyrighted by Peter Österlund, and is available as open source under the GNU GPL v3 license.

Home Page: https://sauce-code.github.io/cuckoo/

License: GNU General Public License v3.0

Java 100.00%
chess-engine chess-ai chess maven java uci gui tui utf-8 utf8

cuckoo's Introduction

License: GPL v3 Java Version 1.8 Source Encoding

Java CI with Maven

ChuckooChess 1.12

This is an adaptation of Peter Österlund's CuckooChess 1.12, see official page.

The source code provided is a Java Maven project in UTF-8.

The program, except for the chess font, is copyrighted by Peter Österlund, and is available as open source under the GNU GPL v3 license.

About the program

Most of the ideas in the program are from the Chess Programming Wiki or from the TalkChess.com forum.

The program implements many of the standard methods for computer chess programs, such as iterative deepening, negascout, aspiration windows, quiescence search with SEE pruning and MVV/LVA move ordering, hash table, history heuristic, recursive null moves, futility pruning, late move reductions, opening book and magic bitboards.

The program is rather slow compared to state of the art chess programs. However, it is still quite good at tactics and scores 299 of 300 on the win at chess tactical test suite, at 10 seconds thinking time per position, using an Intel Core i7 870 CPU. The only position not solved is the extremely complicated position 230, which according to current analysis, seems like a draw and therefore an invalid test position.

Note that the author does not consider Java the best language for implementing a chess engine. He wrote this program mostly to get some hands-on experience with Java and Eclipse.

The program uses the Chess Cases chess font, created by Matthieu Leschemelle.

The author picked the name CuckooChess because the transposition table is based on Cuckoo hashing.

Downloads

You can also run the applet as a standalone program. Download the cuckoo-app-1.12-jar-with-dependencies.jar file and run it like this (graphical mode):

java -jar cuckoo-app-1.12-jar-with-dependencies.jar gui

GUI Preview

Or like this (text mode):

java -jar cuckoo-app-1.12-jar-with-dependencies.jar txt

GUI Preview

More commands are available in text mode than in graphical mode. Try the help command for a list of available commands.

Build instructions

Compile the project using:

mvn install

You can find the compiled standalone JAR here:

cuckoo-app/target/cuckoo-app-1.12-jar-with-dependencies.jar

To run it, see description above.

You can also find GUI only, TUI only and UCI only versions here:

cuckoo-gui/target/cuckoo-gui-1.12-jar-with-dependencies.jar
cuckoo-tui/target/cuckoo-tui-1.12-jar-with-dependencies.jar
cuckoo-uci/target/cuckoo-uci-1.12-jar-with-dependencies.jar

For those, you don't need to add any parameters to run them.

UCI mode

It is also possible to use the program as a UCI engine, which means that you can use it with many graphical chess programs. For example, to use it with XBoard/WinBoard + polyglot, set EngineCommand like this in the polyglot ini file:

EngineCommand = java -jar path/to/jar/cuckoo-app-1.12-jar-with-dependencies.jar uci

To use the program with the Arena GUI, create a one-line bat-file containing:

javaw -Xmx256m -jar cuckoo-app-1.12-jar-with-dependencies.jar uci

Note that you must set the maximum heap size using -Xmx to a value larger than the hash size you set in the Arena program (the author doesn't know exactly how much larger).

If you are using Windows, you may also be interested in a compiled version available from Jim Ablett's chess projects page.

Speed

The program runs fastest when run in a 64-bit OS using a 64-bit Java implementation (JVM). Here is a speed comparison using CuckooChess 1.11 in 64-bit Windows 7 on an Intel core i7 870, when analyzing from the initial position to depth 17:

Version Speed (N/s)
64-bit JVM (1.6.0_29) 1,130,275
32-bit JVM (1.6.0_29) 584,194

On this computer, the 64-bit version is more than 90% faster.

Changelog

You can find the changelog here.

cuckoo's People

Contributors

ddugovic avatar dependabot-preview[bot] avatar dependabot[bot] avatar sauce-code avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.