Skip to content

About

EPIC CHESS ENGINE!!!!

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

74 Commits

Folders and files

Repository files navigation

Chess Engine

Engines plus a small local web UI. The C++ engine in engines/cpp is the active one. Python and Java engines are in engines/python and engines/java.

Layout

  • engines/python — Python engines
  • engines/java — Java engines (Maven)
  • engines/cpp — C++ engine
  • web — browser UI and local API
  • experiments — early sketches

The Python code uses the chess library. The Java project uses chesslib.

Cross-play

Python, Java, and the C++ binary all speak UCI. python -m crossplay is the referee: it owns the clock and the result, and either color can be any engine in engines/catalog.json. MidGameBotV5 and Bot_V5 are the Python and Java engines that spend the same think time as the C++ engine, remaining / 75 milliseconds. The other bots keep their own search. Increment is awarded by the referee.

python -m pip install -r requirements.txt
mvn -f engines/java/pom.xml -q compile
python -m crossplay list
python -m crossplay conform
python -m crossplay match python_midgame_v5 java_bot_v5 --time 10000 --inc 100

--time and --inc are milliseconds. roundrobin alternates colors for each pair. fastchess prints a command for the runner in tools/fastchess. That directory is a git submodule. After git submodule update --init tools/fastchess, build it with make -j in tools/fastchess.

The C++ binary is engines/cpp/build/chess_engine. Release means native codegen plus link-time optimization. The chess library headers come from the engines/cpp/chess-library submodule. The catalog uses that binary as-is. How to freeze a version is in engines/cpp/README.md.

git submodule update --init engines/cpp/chess-library
cmake -S engines/cpp -B engines/cpp/build -DCMAKE_BUILD_TYPE=Release
cmake --build engines/cpp/build

The web UI uses the same catalog. From the repo root:

python -m uvicorn web.backend.main:app --host 127.0.0.1 --port 8000

In web/frontend, run npm run dev and open the page. Each color can be Human or any available engine.

About

EPIC CHESS ENGINE!!!!

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages