Python Easy Chess GUI

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

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Ferdy
Posts: 4111
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Python Easy Chess GUI

Post by Ferdy » Thu Jun 20, 2019 11:58 am

giovanni wrote:
Thu Jun 20, 2019 9:39 am
Ferdy wrote:
Thu Jun 20, 2019 8:04 am
giovanni wrote:
Thu Jun 20, 2019 7:18 am
Terrific work. Would it be possible to save engine analysis as a tree or in polyglot format a la IDEA in chess aquarium?
Could you describe what is this engine analysis that will be saved in a tree?
Thanks for your answer, Ferdy. IDEA is probably the state-of-the-art tool for interactive position analysis. Respect to
infinite anaysis, its GUI allows the user to interact with the engine, driving the search along the most promising paths. The mini-maximized search tree is then saved to disk for later use, without losing what has been already calculated when the GUI is restarted.
Its description can be fund here:
https://chessok.com/?p=24457

Please note that there has been already a very interesting attempt to develop a free alternative IDEA version, but its use is so far limited to a web interface and just to a few engines. Also communication with the engine can be a little tricky to setup. The work is by Mike Rohleder and can be found here:

https://www.rohleder.de/~mike/schach/freeaquarium/
I am familiar with idea in aquarium. But this freeaquarium is new to me and it looks like a very good software.

It seemed like every position with analysis up to a certain depth is saved. These positions can then be used to build a tree. While user is doing infinite analysis positions with deeper analysis are saved and can be updated if there is postion that have deeper depth. Minimax only requires the leaf node evaluation it is just a matter of back propagation and showing it to gui. I think l can do it but this certainly takes a lot of time and effort. I have to implement simple features first.

User avatar
Ovyron
Posts: 2728
Joined: Tue Jul 03, 2007 2:30 am

Re: Python Easy Chess GUI

Post by Ovyron » Thu Jun 20, 2019 11:03 pm

Ferdy wrote:
Thu Jun 20, 2019 7:26 am
I may add your feature requests in the issue and add the issue in the project.
Haha! The features I was going to request are the same as giovanni's (storing analysis in a tree), I guess people have been craving for a good implementation of this for years. Aquarium is a really heavy and complex program I never got used to, and I couldn't get behind Mike Rohleder's efforts. Chess Openings Wizard perfected the art, but one saves a single score for tree, and it's impossible to know what other trees have data in current position.

In 2010 I created this mockup of how a chess GUI that "does it all" would look:

Image

The relevant part is below "LongBook2010", where backsolved scores from engines appear in the columns after "Per" (Elo performance). I used engine nicks to save space (R4 is Rybka 4, etc.)

Two things I'd like to see that I have never seen anyone implement, and that can't be done anywhere is:

1. Manually editing of scores. Sometimes you KNOW a position is bad for one side, or a position is drawn. Anyhow, it's very hard to make an engine show this score so it can be used in a tree leaf, letting the user edit it manually solves it all.

2. Backsolving different scores for White and for Black. Specially in the age of contempt, there can be positions where analyzing from the white side shows 0.12 score, and analyzing for the black side shows -0.12. All current solutions would backsolve a score to the root that arbitrarily depends on the last side analyzed in the leaf nodes. A correct implementation would show the 0.12 score backsolved for white, and the -0.12 score for black (asymmetric scoring of positions.)

Anyway, that's my wish, though I do understand this is something quite complex and effort taking, and that simple things are more useful and efficient, thanks for considering it.

Ferdy
Posts: 4111
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Python Easy Chess GUI

Post by Ferdy » Sat Jun 22, 2019 9:29 am

Ovyron wrote:
Thu Jun 20, 2019 11:03 pm
Two things I'd like to see that I have never seen anyone implement, and that can't be done anywhere is:

1. Manually editing of scores. Sometimes you KNOW a position is bad for one side, or a position is drawn. Anyhow, it's very hard to make an engine show this score so it can be used in a tree leaf, letting the user edit it manually solves it all.
Chess Position Trainer allows manual edit of position evaluation. It is then used in mini-max.

adams161
Posts: 521
Joined: Sun May 13, 2007 7:55 pm
Location: Tacoma, WA USA

Re: Python Easy Chess GUI

Post by adams161 » Sun Jun 23, 2019 12:57 am

I don't really compile programs on here or the winboard forum to run. Is there a mac version ready to run by clicking or right click open with or a simple command line to start it in terminal?

Ferdy
Posts: 4111
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Python Easy Chess GUI

Post by Ferdy » Sun Jun 23, 2019 3:13 am

adams161 wrote:
Sun Jun 23, 2019 12:57 am
I don't really compile programs on here or the winboard forum to run. Is there a mac version ready to run by clicking or right click open with or a simple command line to start it in terminal?
There is no mac version that is ready to run.

If I have to run it in mac, I would try.
1. Install python v3.7
2. Intall dependent modules of python easy chess gui
a. pysimplegui
b. python-chess
c. pyperclip

Comment on mac from the author of pysimplegui. https://github.com/PySimpleGUI/PySimpleGUI

Image

I have not yet tried porting this gui (currently tkinter) to QT.

User avatar
Ovyron
Posts: 2728
Joined: Tue Jul 03, 2007 2:30 am

Re: Python Easy Chess GUI

Post by Ovyron » Mon Jun 24, 2019 9:14 am

Ferdy wrote:
Sat Jun 22, 2019 9:29 am
Chess Position Trainer allows manual edit of position evaluation. It is then used in mini-max.
Chess Openings Wizard does as well. What I mean is a full-featured tree that shows the evaluation of several engines and allows user editing like that, I've only seen a single evaluation per file. Once this is implemented, automatic analysis by the GUI that extends, and looks for alternative moves on leaf nodes so that all engines with scores in a tree agree on a mainline would be a breeze.
Great spirits have always encountered violent opposition from mediocre minds.

User avatar
Thomas Lagershausen
Posts: 238
Joined: Mon Jun 11, 2007 4:59 pm

Re: Python Easy Chess GUI

Post by Thomas Lagershausen » Tue Jun 25, 2019 9:20 am

Thx for this nice GUI.

Is it right that right now i am not able to active the mode analysis?

Keep the fire burning.
TL

Ferdy
Posts: 4111
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Python Easy Chess GUI

Post by Ferdy » Tue Jun 25, 2019 12:53 pm

Right analysis mode is not yet implemented.

Ferdy
Posts: 4111
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Python Easy Chess GUI

Post by Ferdy » Tue Jun 25, 2019 6:19 pm

Almost done on implementing basic engine configuration saved in json file, just doing some tests to find bugs.

Now I get side-tracked by the idea of allowing the user to comment on the game while playing and then save this comment in pgn.

Something like this.

Image

"White nimzo-indian is struggling, lets try it", was my first comment and after I played Nc3 the comment was saved in the game. Now I have a new comment, if I will play any move that comment will be saved as well.

After pressing the green-colored Adviser text if runs and analyzes the position on the board, once done the variation color turns to blue and the Adviser text color turned red. Adviser engine can only be set at Neutral mode, but engine opponent can be set in Neutral and Play modes.

If you have suggestions something that is useful to the user, you may post it.

I have other ideas that I am going to add in the issue at github later.
1. Add a button Save to White Repertoire
2. Add a button Save to Black Reperotire
So when user likes the white or black opening, just press those buttons. Later those accumulated games in the WhiteRepertoire.pgn and BlackRepertoire.pgn can be used to build repertoire either in CPT or COW softwares.

I also do like to implement tactics training. Probably my next goal.

Ferdy
Posts: 4111
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Python Easy Chess GUI

Post by Ferdy » Sun Aug 18, 2019 1:43 pm

Released pecg v1.0 rc1 at https://github.com/fsmosca/Python-Easy- ... g/v1.0.rc1

Image

Check the How to section at https://github.com/fsmosca/Python-Easy-Chess-GUI on how to get started.

Post Reply