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 »

giovanni wrote: Thu Jun 20, 2019 11:39 am
Ferdy wrote: Thu Jun 20, 2019 10:04 am
giovanni wrote: Thu Jun 20, 2019 9: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: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: Python Easy Chess GUI

Post by Ovyron »

Ferdy wrote: Thu Jun 20, 2019 9:26 amI 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: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Python Easy Chess GUI

Post by Ferdy »

Ovyron wrote: Fri Jun 21, 2019 1:03 am 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: 626
Joined: Sun May 13, 2007 9:55 pm
Location: Bay Area, CA USA
Full name: Mike Adams

Re: Python Easy Chess GUI

Post by adams161 »

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: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Python Easy Chess GUI

Post by Ferdy »

adams161 wrote: Sun Jun 23, 2019 2: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: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: Python Easy Chess GUI

Post by Ovyron »

Ferdy wrote: Sat Jun 22, 2019 11: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.
Your beliefs create your reality, so be careful what you wish for.
User avatar
Thomas Lagershausen
Posts: 328
Joined: Mon Jun 11, 2007 6:59 pm

Re: Python Easy Chess GUI

Post by Thomas Lagershausen »

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: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Python Easy Chess GUI

Post by Ferdy »

Right analysis mode is not yet implemented.
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Python Easy Chess GUI

Post by Ferdy »

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: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Python Easy Chess GUI

Post by Ferdy »

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.