perplexity-cli
🧠 A simple command-line client for the Perplexity API. Ask questions and receive answers directly from the terminal! 🚀🚀🚀
Java Chess Engine (UCI compatible)
git clone https://github.com/bagaturchess/Bagatur.gitbagaturchess/BagaturBagatur is one of the strongest Java chess engines in the world.
It runs both on Android and on desktop computers (including virtual machines with many CPU cores in the cloud):
If you like the project, please give it a star! :-)
/Downloads/Engine/.Bagatur runs on every operating system with a Java platform:
.exe launchers. Steps:
.exe launcher requires the runtime). Get it from java.com.engines/ subfolder that works well)..sh launchers; just make sure Java 17 (or later) is on your PATH.These apply only to the SMP (multi-core) version. On Windows it is started by Bagatur_64_2+_cores.exe or Bagatur_mcore.bat; on Linux by Bagatur_mcore.sh. SMP has been tested with up to 64 CPU cores / threads. There is a known JVM-related scaling limitation — more details in Search/SMP.scaling.issue.txt.
spin, default logical_processors/2, min 1, max logical_processors/2): number of search threads.spin, default 1, min 1, max SQRT(logical_processors/2)): number of transposition tables used by the SMP version. The default of 1 is best in most cases; raise it only for experiments. See Search/SMP.scaling.issue.txt.combo, default single file, values: single file / multiple files / none): whether Bagatur writes log files describing its actions.check, default true): whether to use the bundled opening book under ./data/w.ob and ./data/b.ob. The book is built from a few million PGN games played by grandmasters and engines over the past 20 years, filtered down to the most frequently played continuations. Opening-name detection is not yet supported but is on the backlog (and is already available in the Android version).check, default true): whether to keep thinking on the opponent's time.spin, default 1, min 1, max 100): how many best lines to report — 1 shows only the best line, higher values report the top N.string, default ./data/egtb): path to the Syzygy tablebase files. The full resolved path is printed in response to the uci command.true, if a local tablebase probe fails (e.g. you only have 5-piece files but the position needs 7), the engine falls back to the lichess online tablebase at http://tablebase.lichess.ovh/standard?fen=....combo, default most played first, values: most played first / random intermediate / random full): effective only when OwnBook is true. most played first picks the statistically most popular book move for the current position. random full picks uniformly at random from all stored book moves for the position. random intermediate is the compromise: a random choice among the top 3 candidates. (The option label preserves the historical spelling.)check, default false): false = classic chess; true = Fischer Random Chess (both FRC and DFRC modes are supported).spin, default 73, min 50, max 90): a fine-tuning knob — leave it alone unless you know what you are doing. It controls how much of the available heap the engine targets, which keeps the JVM from spending too much time in Garbage Collection.check, default true): whether to use the Transposition Table.check, default true): whether to cache evaluation results. In the SMP build this cache is per thread.check, default true): whether to cache Syzygy DTZ probe results. Per-thread in the SMP build.The Bagatur distribution bundles a subset of Syzygy tablebases under ./data/egtb/ — 22 of the most common endgames with up to 5 pieces. The SyzygyPath UCI option points there by default. Change it if you have a fuller or larger Syzygy set installed elsewhere.
Since version 5.0, Bagatur uses NNUE as its evaluation function. The Java port lives in its own subproject — see NNUE/.
A chess engine's strength is measured in Elo.
According to CCRL 40/15, the latest official Elo ratings of every well-tested version (with more than 300 games at 40/15 time control) are listed on this page: CCRL — Bagatur family.
Special thanks to Graham Banks, who has put tremendous effort into testing Bagatur versions over the years!
The latest official Elo rating of Bagatur is ~3400 Elo.
The project started as a bet between me and one of my friends from my first two years at university — he liked to play chess, and I could not win a single game against him. Over time this made me restless, and eventually I promised him (we shook on it) that I would write a chess program that would beat him.
Luckily for me, no time frame was agreed on, and... years later, I won the bet! :-) The whole story is captured in this YouTube video: "How was the idea of Bagatur Chess Engine application born?".
The first public, open-source version of Bagatur was released on 2011-02-27 and is still available here. The project itself, however, started about 10 years earlier — somewhere between 1999 and 2000. It went through many private, non-public versions until 2011 (I do not even have their history any more). The early versions were very weak: they would make 2-3 moves and then crash. I spent hours and days hunting bugs and trying to understand why things did not work.
At that time the internet was almost empty, and I had no idea that software like CuteChess or Arena even existed, nor that there was a UCI protocol — so I also wrote my own graphical user interface, in Java AWT and Swing. Chess programming exposes you to a wide range of programming disciplines.
I picked Java mostly because of my (limited) experience with it. It also helps that Java was rather modern and popular at the time — only a few years after its first release, the early days of the Java language and the Java ecosystem.
So, if you are planning to write a chess engine: better start early — it takes time to reach a stable version that can beat you. :-)
You can reach me on LinkedIn: Krasimir Topchiyski — or by email at k_topchiyski@yahoo.com.
According to CCRL, there are fewer than ~500 chess engines in the world. That means there are not that many people genuinely interested in chess-engine programming. The author of a chess engine has typically to be interested not only in programming but also in chess itself — and willing to invest a lot of spare time without any incentive, just for fun and curiosity. For that reason, I am always happy to see new engines and new authors appear!
I cannot speak for other authors, but I would also recommend a small, well-measured dose of craziness. It helps. As you release version after version, each release aiming for a higher Elo, sometimes you get stuck — sometimes for months — and it starts to feel like banging your head against a wall. When I reach that state, I step away from Bagatur for a while and wait for inspiration to come back. Always remember: it should be for fun! :-)
This excellent tool is used to find and fix performance, scalability, and memory-allocation issues. YourKit supports open-source projects with innovative and intelligent tools for monitoring and profiling.
The chess engine JFish uses Bagatur as its base and plugs in the Stockfish NNUE as its evaluation function. The goal is to have the strongest Java chess engine as a reference.
The full release history is collected here.
Fortunately, I am not alone on this project — without the ideas, support, and help from many people and websites, Bagatur would not be what it is today. Many thanks to:
.exe launcher).more like this
🧠 A simple command-line client for the Perplexity API. Ask questions and receive answers directly from the terminal! 🚀🚀🚀
🎥🤟 8 minimalistic templates for tfjs mediapipe handpose and facemesh
search projects, people, and tags