This project is a fork of the PyGone chess engine version 1.6.5. PyGone is a chess engine written in Python, known for its compact code size.
The primary goal of this fork is to create a Python-dependency-free version of PyGone that can be directly used with chess GUI interfaces on the Windows operating system for gameplay.
- Obtain the
pygone_combined.exefile from the release or from thedistfolder. - Add this engine in a UCI-compatible chess GUI (such as Arena Chess GUI, SCID, ChessBase, etc.).
- Configure engine parameters and start playing.
- Ensure Python and necessary dependencies are installed (python_minifier, pyinstaller).
- Run
python windows_build.pyto generate the merged Python file. - Run
pyinstaller pygone_combined.specto generate a new executable.
-
Feature Restoration: To improve stability and functionality for practical use, we have restored some features that were commented out in the original project due to size constraints.
-
FEN Code Parsing Fix: Modified the engine's handling of FEN positions followed by move sequences. The engine can now correctly process commands in the format:
position fen rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 moves e2e4 e7e5. -
File Size Changes: To achieve the above goals, we have sacrificed the original project's small size feature (the original project aimed for a Unix executable ≤4KB). This version is packaged with PyInstaller, resulting in an executable file size of approximately 8MB, but ensures direct execution on Windows systems without Python dependencies.
Please note that this version has the following limitations for gameplay:
-
Recommended Control Methods: Only time control (e.g., 3 minutes + 2 seconds increment) or depth-limited search methods are recommended. Using other methods may cause the engine to function incorrectly.
-
Missing STOP Command Support: The engine does not implement the UCI protocol's stop command response mechanism.
-
Limited Analysis Capability: Due to the lack of stop command support, continuous analysis functionality is not available as in common engines - only single-move analysis is possible.
-
Primary Use Limitation: This executable is currently primarily limited to basic gameplay and is not suitable for advanced analysis or other complex scenarios.
-
windows_build.py: Windows-specific build script responsible for merging and minimizing multiple Python files in preparation for packaging.
-
pygone_combined.spec: PyInstaller packaging configuration file that specifies how to package the Python code into a standalone executable.
-
src/pygone_combined.py: Merged Python file generated by windows_build.py, containing all necessary modules.
-
build folder: Intermediate files and build outputs generated during the PyInstaller packaging process.
-
dist folder: Contains the final executable file
pygone_combined.exe, which is the directly usable chess engine for Windows.
This project is based on the original PyGone engine and follows the GNU General Public License v3.0.
- This version is optimized for the Windows environment and may not be compatible with other operating systems.
- Due to PyInstaller packaging, the executable file may trigger false positives in some security software. In such cases, please add the file to your security software's trust list.
- While sacrificing the original project's small size feature, we have maintained the core functionality and characteristics of the PyGone engine.
- Please be aware of the functional limitations mentioned above and use primarily for basic gameplay scenarios.