Bagatur

Java Chess Engine

View on GitHub

Overview

Bagatur chess engine is one of the strongest Java chess engines in the world.

It runs on Android as well as on “desktop” Computers (or even on virtual machine with many CPU cores into the Cloud):

If you like the project, please give it a star! :-)

Downloads for desktop computer

Running it

The program runs under all Operating Systems, which support Java platform:

UCI Options

Option available only for the SMP version of Bagatur. The SMP (multicore) version can be started by Bagatur_64_2+_cores.exe and Bagatur_mcore.bat for Windows and with Bagatur_mcore.sh under Linux. It is tested with up to 64 CPU cores and threads. There is known sclaing issues, caused by Java (more info here: https://github.com/bagaturchess/Bagatur/blob/master/Search/SMP.scaling.issue.txt).

All other options are available for both versions: single core and SMP.

Syzygy Endgame Tablebases

The download of Bagatur contains subset of syzygy tablebases placed under ./data/egtb/ directory. It contaiuns 22 of the most common endgames with up to 5 pieces. By default the option ‘SyzygyPath’ is set to this directory. You could change this UCI option if you have complete or bigger set of syzygy tablebases donwloaded on your computer.

Elo Rating

Chess strength and rating of a chess engine is measured in Elo. According to CCRL 40/15, the latest offical Elo ratings of all well tested version (with more than 300 games and time control 40/15), are available on this page: http://www.computerchess.org.uk/ccrl/4040/cgi/compare_engines.cgi?family=Bagatur

Special Thanks to Graham Banks, who put a huge efforts in testing Bagatur versions through the years!

Latest official Elo rating of Bagatur 2.2e is ~3000 Elo. To make it easy to check, here is a probably outdated screenshot of the computerchess.org web page above:

Machine Learning

There are some code examples of Artificial Intelligence / Machine Learning experiments with the Neuroph 2.94 Java framework. The starting point into the source code is located here and the documentation is here. Although the Elo strength of the experimential version is with 50 Elo less than the version with the manually tuned evaluation function’s parameters, the results are successful meaning that the neural network’s backpropagation algorithm works as expected for multi layer perceptron neural network. This makes the experiments a good showcase of Neuroph Java framework.

Additional resources:

More readings with technical details and explanations for each sub-component of Bagatur

Bagatur is powered by YourKit Java Profiler

YourKit Logo

This nice tool is used to find out and fix performance, scalability and memory allocation isses. In general YourKit supports open source projects with innovative and intelligent tools for monitoring and profiling.

When and how Bagatur Chess Engine project has started

The project has started as a bet between myself and one of my friends from my first 2 years in the University, who like to play chess. I was unable to win a single chess game against him! This made me nervous over the time and at the end I have promised him (we bet) that I will create a chess program, which will win a game against him! Fortunately the time frame was not mentioned during the bet and … years later I win it! :-) The whole story is captured in this youtube video “How was the idea of Bagatur Chess Engine application born?”: https://www.youtube.com/watch?v=_rNBxbUAbS0

The first public, open source version of Bagatur was available since 2011-02-27 here: https://sourceforge.net/projects/bagaturchess/files/BagaturEngine/older/ The project actually started ~10 years before this date. The actual start date was between 1999 and 2000. It had many proprietary non-public versions until 2011. I even don’t have history of them but they were quite weak in playing chess. First versions just succeeded to play 2-3 moves and then crashes. I have spend hours and days trying to fix the bugs and find out why it doesn’t work correctly. At this point in time, the internet was almost an empty space and I was not aware of softwares running chess engines like now CuteChess and Arena and I was not aware of the existence of the UCI protocol, so I also have created an own Graphical User Interface (GUI) based on Java AWT and Swing. Chess porgramming gives you diverse programming experiences … I have selected Java as a programming language, mainly because of my little (but existing) experience with it. I have to also admit that Java was quite modern and polular at this point in time. This was the time a few years after the first releases of the Java itself. The early ages of the Java language and Java technologies.

So, if you plan to work on a chess engine, better start earlier, you need time to achieve stable version which beats you! :-)

Contact the Author

In order to contact me, you could use LinkedIn Krasimir Topchiyski or email me at k_topchiyski@yahoo.com

Some personal toughts …

According to CCRL, there are below 500 chess engines in the world. This means that not many people are really interested in programming chess engines. Most probably the author of a chess engine is interested not only in programming but also in chess game. He/she must have enough willingness to invest spare time in chess programing, without any incentives, just for fun and driven by curiosity.

Because of this fact, I am always happy to see new engines and new authors!

I don’t know for the other chess engine authors, but I would add small and well balanced portion of craziness … it helps in chess programming, while you release version after version, targeting better Elo stregnth of each new release, which actually happens in very rear cases and you cannot release a version long time. If this continues months, normally I feel it like “to bang your head against the wall”. When I reach this state, I exit Bagatur project for a while, awaiting for new inspiration and the muse. Always remember, it should be for fun! :-)

Old Revision History before version 2.2e

Version 2.2e (16 August 2021), 2997 Elo

Version 2.2d (20 May 2021)

Version 2.2c (2 May 2021), 2962 Elo

Version 2.2b (30 April 2021)

Version 2.2a (21 February 2021), 2992 Elo

Version 2.2 (29 May 2020), 2995 Elo

Version 2.1a (21 May 2020)

Version 2.1 (1 May 2020)

Version 2.0 (13 March 2019), 2991 Elo

Version 1.9b (7 March 2020)

Version 1.9a (14 January 2020), 2964 Elo

Version 1.9 (19 December 2019), 2928 Elo

Version 1.8a (20 September 2019), 2821 Elo

Version 1.8 (30 July 2019), 2828 Elo

Version 1.7b (2 July 2019)

Version 1.7a (18 April 2019), 2710 Elo

Version 1.7 (29 March 2019), 2633 Elo

Version 1.6c (15 March 2019), 2524 Elo

Version 1.6b (21 February 2019)

Version 1.6a (11 February 2019)

Version 1.6 (17 January 2019)

Version 1.5g (14 January 2019), 2500 Elo

Version 1.5f (31 October 2018), 2526 Elo

Version 1.5e (20 July 2017), 2517 Elo

Version 1.5d (15 July 2017)

Version 1.5c (29 May 2017)

Version 1.5b (25 May 2017)

Version 1.5a (11 May 2017)

Version 1.5 (3 May 2017)

Version 1.4e (15 April 2017), 2455 Elo

Version 1.4d (31 August 2016), 2457 Elo

Version 1.4c (15 June 2016), 2337 Elo

Version 1.4b (31 May 2016), 2442 Elo

Version 1.4a (24 May 2016)

Version 1.4 (11 May 2016)

Version 1.3a (07 December 2012), 2327 Elo

Version 1.3 (05 July 2012)

Version 1.2g (5 June 2012)

Version 1.2f (26 May 2012)

Version 1.2e (12 May 2012)

Version 1.2d (9 December 2011), 2219 Elo

Version 1.2c (4 December 2011)

Version 1.2b (3 November 2011), 2157 Elo

Version 1.2a (30 October 2011)

Version 1.2 (10 September 2011)

Version 1.1.3 (27 August 2011)

Version 1.1.2 (23 August 2011)

Version 1.1.1 (17 August 2011)

Version 1.1.0 (2 August 2011)

Version 1.0.1 (22 July 2011)

Version 1.0.0 (27 Feb 2011)