Python Easy Chess GUI

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Python Easy Chess GUI

Post by Ferdy »

dannyb
Posts: 78
Joined: Mon Jul 09, 2018 6:08 pm
Full name: Daniel Bennett

Re: Python Easy Chess GUI

Post by dannyb »

thank you Ferdinand for this release. I used it a bit in june when you first released it and really liked it. Looking forward to see what are the changes in this new version.
User avatar
Ovyron
Posts: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: Python Easy Chess GUI

Post by Ovyron »

I was wondering if it'd be possible to make Python Easy Chess GUI accessible from a web page? chessdb.cn/queryc_en/ has shown that you don't need to download or install anything, you go there and it works, and works well.

ChessDB looks to me like "the future" and I dream of a day where people don't need to install Chess GUIs or engines in their system anymore, they go to a webpage like that and they can use the engines directly from their browser (maybe even from other people's computers?! :shock: Imagine someone from their mobile accessing someone's 40cores machine), and if this is going to happen I wonder who will do it first.
Your beliefs create your reality, so be careful what you wish for.
JohnWoe
Posts: 491
Joined: Sat Mar 02, 2013 11:31 pm

Re: Python Easy Chess GUI

Post by JohnWoe »

Great work!
I tried to play on it Sapeli. After installing tons of stuff I got into this.
Image
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Python Easy Chess GUI

Post by Ferdy »

JohnWoe wrote: Mon Oct 14, 2019 12:34 am Great work!
I tried to play on it Sapeli. After installing tons of stuff I got into this.
Image
What OS do you use? This GUI is powered by python-chess to run the engine. Could you post the relevant log?


On windows 7 using gui exe file, it worked just fine.

Image
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Python Easy Chess GUI

Post by Ferdy »

Ovyron wrote: Sun Oct 13, 2019 8:05 pm I was wondering if it'd be possible to make Python Easy Chess GUI accessible from a web page? chessdb.cn/queryc_en/ has shown that you don't need to download or install anything, you go there and it works, and works well.
PECG is based from PySimpleGUI and there is PySimpleGUIWeb, perhaps it is possible to make it run in a web page. But have not researched it deeply yet. But I can query ChessDB and show it in the GUI. I did try it before and it worked. After v1.0, its GUI design will be revised as analysis mode and other stuff will be added.
ChessDB looks to me like "the future" and I dream of a day where people don't need to install Chess GUIs or engines in their system anymore, they go to a webpage like that and they can use the engines directly from their browser (maybe even from other people's computers?! :shock: Imagine someone from their mobile accessing someone's 40cores machine), and if this is going to happen I wonder who will do it first.
A user on mobile accessing more powerful remote computer was already done by chess for android, droidfish and chess repertoire manager, perhaps there are others.
JohnWoe
Posts: 491
Joined: Sat Mar 02, 2013 11:31 pm

Re: Python Easy Chess GUI

Post by JohnWoe »

OS on this comp:

Code: Select all

NAME="Ubuntu"
VERSION="18.04.3 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.3 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
I needed to install tons of python stuff w/ pip3.
Then run python3 that GUI.

Code: Select all

python3 python_easy_chess_gui.py
It barely runs on Linux.
This experience reminds why I abandoned my GUI project for Sapeli :lol:

This is the error log:

Code: Select all

2019-10-14 08:41:15,635 :: play_game :: line: 2126 :: WARNING :: GUI book is missing.
2019-10-14 08:41:15,636 :: run :: line: 450 :: ERROR :: Failed to start sapeli.
Traceback (most recent call last):
  File "python_easy_chess_gui.py", line 443, in run
    creationflags=subprocess.CREATE_NO_WINDOW)
AttributeError: module 'subprocess' has no attribute 'CREATE_NO_WINDOW'
2019-10-14 08:41:15,740 :: update_text_box :: line: 1249 :: ERROR :: Engine sent None.
Traceback (most recent call last):
  File "python_easy_chess_gui.py", line 1247, in update_text_box
    best_move = chess.Move.from_uci(msg.split()[1])
  File "/home/comp/.local/lib/python3.6/site-packages/chess/__init__.py", line 512, in from_uci
    from_square = SQUARE_NAMES.index(uci[0:2])
ValueError: 'No' is not in list
2019-10-14 08:41:23,070 :: play_game :: line: 2235 :: INFO :: engine msg: bestmove None
2019-10-14 08:41:23,071 :: quit_engine :: line: 597 :: INFO :: quit engine
2019-10-14 08:41:23,071 :: quit_engine :: line: 601 :: INFO :: AttributeError, self.engine is already None
2019-10-14 08:41:23,071 :: play_game :: line: 2322 :: INFO :: Saving game automatically
2019-10-14 08:41:27,097 :: main_loop :: line: 2566 :: INFO :: Quit app from main loop, X is pressed.
I tried Sapeli on Pychess.

PyChess vs Sapeli 1.53. Normal chess.
Image

PyChess vs Sapeli 1.53. Chess960.
Image

Sapeli also supports KOTH but PyChess doesn't recognize it. Can't play matches etc.
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Python Easy Chess GUI

Post by Ferdy »

JohnWoe wrote: Mon Oct 14, 2019 8:22 am OS on this comp:

Code: Select all

NAME="Ubuntu"
VERSION="18.04.3 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.3 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
I needed to install tons of python stuff w/ pip3.
Then run python3 that GUI.

Code: Select all

python3 python_easy_chess_gui.py
It barely runs on Linux.
This experience reminds why I abandoned my GUI project for Sapeli :lol:

This is the error log:

Code: Select all

2019-10-14 08:41:15,635 :: play_game :: line: 2126 :: WARNING :: GUI book is missing.
2019-10-14 08:41:15,636 :: run :: line: 450 :: ERROR :: Failed to start sapeli.
Traceback (most recent call last):
  File "python_easy_chess_gui.py", line 443, in run
    creationflags=subprocess.CREATE_NO_WINDOW)
AttributeError: module 'subprocess' has no attribute 'CREATE_NO_WINDOW'
2019-10-14 08:41:15,740 :: update_text_box :: line: 1249 :: ERROR :: Engine sent None.
Traceback (most recent call last):
  File "python_easy_chess_gui.py", line 1247, in update_text_box
    best_move = chess.Move.from_uci(msg.split()[1])
  File "/home/comp/.local/lib/python3.6/site-packages/chess/__init__.py", line 512, in from_uci
    from_square = SQUARE_NAMES.index(uci[0:2])
ValueError: 'No' is not in list
2019-10-14 08:41:23,070 :: play_game :: line: 2235 :: INFO :: engine msg: bestmove None
2019-10-14 08:41:23,071 :: quit_engine :: line: 597 :: INFO :: quit engine
2019-10-14 08:41:23,071 :: quit_engine :: line: 601 :: INFO :: AttributeError, self.engine is already None
2019-10-14 08:41:23,071 :: play_game :: line: 2322 :: INFO :: Saving game automatically
2019-10-14 08:41:27,097 :: main_loop :: line: 2566 :: INFO :: Quit app from main loop, X is pressed.
One issue is this.
Traceback (most recent call last):
File "python_easy_chess_gui.py", line 443, in run
creationflags=subprocess.CREATE_NO_WINDOW)
AttributeError: module 'subprocess' has no attribute 'CREATE_NO_WINDOW'
It seems like your python is below 3.7.

PECG is designed for Python 3.7 and up, see other requirements at https://github.com/fsmosca/Python-Easy-Chess-GUI.
User avatar
PeterO
Posts: 215
Joined: Sun Jul 31, 2016 6:35 pm

Re: Python Easy Chess GUI

Post by PeterO »

Hi Ferdy,

Can you PLEAAAAAAAAASE add THIS to your GUI :?:

https://github.com/domschl/python-mchess

If you implement this, we can play the UCI engines on a beautiful wooden chessboard! :lol: :lol: :lol:

https://computerchess.com/chesslink/

No other GUI can do this! :shock:

Peter
gotzmann
Posts: 2
Joined: Wed Apr 07, 2021 11:52 am
Full name: Serge Gotsuliak

Re: Python Easy Chess GUI

Post by gotzmann »

I've downloaded PEC GUI this evening and just have played the very first game with my pet engine. Fantastic! It took me less than hour to learn the interface and how to connect to it with thin UCI layer. Really glad I've found this piece of beauty :) Really love it's minimalistic design.