An auto-chess GUI coded in Python using PySimpleGUI and Python-Chess modules. Users can also load a chess engine and play with it. This program is based on the public Github repository Python Easy Chess GUI which is itself based on demo chess against ai from PySimpleGUI.
If you want to run from the python source the following are required or see the installation section below.
- Python 3.7 and up
- Python-chess v0.28.0 and up
- PySimpleGUI 4.4.1 and up
- Pyperclip
- Download this repo
Or you can just download the executable file along with other files such as book and images.
Configure engine via Engine->Manage->Edit, select engine and press modify.
- If you want to run from the source code
- Python Easy Chess GUI
Download the files including the Images, Engines and Book directories. You can use your favorite uci chess engine like stockfish by copying it into the engines dir. - Python 3
https://www.python.org/downloads/ - Python-Chess
https://github.com/niklasf/python-chess
pip install python-chess - PySimpleGUI
https://github.com/PySimpleGUI/PySimpleGUI
pip install pysimplegui - Pyperclip
https://github.com/asweigart/pyperclip
pip install pyperclip
- If you want to run from the exe
- Download the exe file from the release link
- Execute python_easy_chess_gui.py
Typical command line:
python python_easy_chess_gui.py
- Execute the exe when using exe file
- Mode->Play
- Move the piece you want to move
- Press the square you want the piece to move to
- If current mode is Neutral, Board->Flip, flip such that black pieces are at the bottom
- If current mode is Play, Mode->Neutral, then Board->Flip
- Mode->Play
- Engine->Go
- You should be in Play mode. If not, then Mode->Play
- FEN->Paste
- If you play as white, you can make your move
- If you play as black, Engine->Go
- If current mode is Neutral, Board->Flip
- If current mode is Play, Mode->Neutral, then Board->Flip
- Book->Set Book, only available in Neutral mode. This book is used by your opponent engine. This book is named pecg_book.bin and is located in Book folder. You can build a polyglot book name it pecg_book.bin and replace the default.
- Right-click on Opponent Search Info label an press Show. This would only work on Play mode.
- Right-click on BOOK 1 or BOOK 2 labels and press Show. This would only work on Play mode.
- Right-click on Adviser and press start. This would only work on Play mode.
- Engine->Set Engine Opponent, available only in Neutral mode.
- Time->Engine
- Time->User
- Engine->Manage->Install
This is only accessible in Neutral mode. After the uci engine is installed, you have to Edit it to modify its options, etc. Only uci engines are supported so far. - Engine->Manage->Edit
- Engine->Manage->Edit
- Engine->Manage->Delete
- PySimpleGUI
https://github.com/PySimpleGUI/PySimpleGUI - Python-Chess
https://github.com/niklasf/python-chess - Pyperclip
https://github.com/asweigart/pyperclip - The Week in Chess
https://theweekinchess.com/ - PyInstaller
https://github.com/pyinstaller/pyinstaller - pgn-extract
https://www.cs.kent.ac.uk/people/staff/djb/pgn-extract/