rchastain / eschecs

UCI chess GUI
GNU Lesser General Public License v2.1
36 stars 9 forks source link

Question regarding opening book and hash size #41

Open Sky1101 opened 2 years ago

Sky1101 commented 2 years ago

Hi, thank you for this awesome chess GUI!

1) Is it possible to use a different opening book with the engines?

2) What is the default hash size the engines use? Is there a way to set a different hash size?

Your work on this project is much appreciated, this is one of my favorite GUI to play chess, I love the simplicity.

rchastain commented 2 years ago

Hello! Thank you for your very kind message. I didn't imagine that someone used my GUI. :)

By the way, do you know that there is a new version here?

Currently the GUI doesn't use a book. It lets each engine use its own book. But it would be easy to add Polyglot book support, since I have some code ready to use. Would Polyglot format be good for you?

You will laugh, but I don't really know what is hash size. I could add an option for that, but I have to do some research before.

Best regards.

Roland

Sky1101 commented 2 years ago

Hi, sorry for the late reply. I absolutely love your GUI!! I've tried pretty much every chess GUI I could find on the internet, all the popular commercial ones and free ones and your GUI is one of my favorites because it's so clean and simple :)

Yes, I did check out the new version of your program but in the end decided to stick with the version on here. I like the more conservative look of the chess pieces in this version, I couldn't figure out how to change the chess pieces in the new version since it doesn't include a simple executable for the options, in this one, all I have to do is double click on the 'options' executable in the folder and I can change board size, chess pieces etc (I'm on Linux). There is also more engines included in version 5.0.6. Are there any notable improvements in the new version compared to 5.0.6? This one already feels very close to perfect to me and I haven't come across any bugs.

Yes, Polyglot format would be perfect :)

As for the hash table, it's not really a big deal, I myself don't fully understand the inner workings. It's a common option available in a lot of chess interfaces, I just know that you can change the hash size according to the amount of RAM you have and it should improve the performance of the engine.

Thanks again for your time and effort on this project,

Sandy

rchastain commented 2 years ago

Hi Sandy. Thank you very much for your feedback.

Since you find it useful, the application to change options will be back in the next release. ;)

(Otherwise you can choose the options with command line parameters.)

By the way, you can install new engines by editing (with a simple text editor) the configuration file. For version 5.0.6, the file is named eschecs-lin64.eng (in config directory).

No there is no important difference between version 5.0.6 and newest versions. If I remember correctly, I fixed some minor bugs, and added the possibility to load a new engine from the menu.

ASAP I will add the support for Polyglot books and publish a new version. I will tell you here when it is done.

Best regards.

Roland

rchastain commented 1 year ago

Hi Sandy. I (finally) found time to work on this project.

The support for Polyglot books is done. A book is included. If you wish to use another one, for now you have to edit with a text editor eschecs.ini (which is in config older).

The application to change options and launch Eschecs is back. It is named now Assistant.

eschecs512-assistant

If you have time for testing that new version, you can compile it as explained here. Since you are on Linux, it should be easy. You only have to install Free Pascal before.

But if you prefer, I can also make a beta release.

Best regards.

Roland

Sky1101 commented 1 year ago

Hi Roland, that's awesome, thanks so much for letting me know :) I'm a little embarrassed to say, even though I've been on Linux for around 9 years now, I still know only a few basic commands lol. I very rarely use the terminal and I almost never run into issues on Linux (I'm still using Ubuntu 16.04 from 2016 and it works flawlessly!!) I've attempted to compile software in the past but have been rarely successful, mostly I get a ton of errors I have no idea how to fix lol. In case you're wondering about my Github account, which might give the impression I know a bit about coding, unfortunately that's not the case, I only created it so I could upvote projects that I like and maybe comment from time to time :) It's fine though, I'll just wait for the release whenever it's ready and there is no hurry either, I'm already perfectly happy with my beloved version 5.0.6 (against which I have a few games every morning after breakfast :)

Hope you had a nice Christmas and wishing you an awesome new year! (just in case I'm not on here again this week).

Sandy

rchastain commented 1 year ago

Hi Sandy. Thank you for your message. Hope you had a nice Christmas too. I understand what you say about terminal (but I swear that it is very easy to build Eschecs from source). Glad to know that you still use my software! For your information, the version 5.1.2 is available. When you have time to try it, you can find it here. Best regards. Roland

Sky1101 commented 1 year ago

Hi Roland, thanks so much for providing an executable for the new version :) I downloaded it and did a little bit of testing.

The first time I launched it, I had some issues with the engines not making any moves. I gave full permission to the folder and it's working now.

The Assistant is a really nice tool, I like it, it makes every setting easily accessible :) It seems it currently does not remember board size. Every time I change the size from 40 to 70, next time I restart the application, it starts with default board size 40. This issue was fixed after I changed size to 70 in the eschecs.ini file.

There is just one little thing with the opening book. Right now, all the engines always respond with the same move every game. Like whenever I play 1 e4, the engines always play c5 and every time I play 1 d4, they will always play Knight f6. I think it could be they're just playing the best line from the opening book. Would be really cool if they could vary their play with random lines from the opening book even if some of the variations are not the absolute best.

Everything else seems to be working fine :)

Sandy

rchastain commented 1 year ago

Hi Sandy. Thank you very much for testing and for your feedback.

For the permission issue, it's good to know. I will investigate.

For the board size issue, I think that you used the window Close button to quit the program. In that case, the settings are not saved. For the settings to be saved, you have to use the Quit menu item, or Ctrl+Q. I appended a note about that in the README.

For the book, you are right. I made the modification that you suggested.

So I think I will make soon another release. Probably I will add some engines. If ever there are engines that you would like to be shipped with Eschecs, please tell me. (It must be UCI engines, since Eschecs doesn't know another protocol.)

Thank you very much again for your support.

Best regards.

Roland

Sky1101 commented 1 year ago

Hi Roland,

Indeed you're right, I was using the close window button to terminate the program. Board size is remembered just fine when I use the quit option from the menu instead :)

When it comes to new engines, I'd much rather it be a surprise. I always enjoy playing against engines I've never encountered before, so whatever new engines you decide to add will be perfect ;)

It seems I may have encountered a small bug. Normally I don't play chess 960 very often although I do enjoy it from time to time. Since I downloaded the new version, I've been playing a bit of chess 960 and I noticed that castling rule is not always enforced, at times the program will allow me to castle in any position, even at the start of the game and the pieces that were originally on the squares the King and Rook move to after castling simply disappear. The 2 engines I used to test this bug are Alouette and Fridolin.

Also, it seems the original issue I had with the engines not moving has nothing to do with permissions as I encountered the problem again today and it turns out 'Autoplay' was turned off. I must have somehow accidentally clicked it. The engines were moving just fine after I re-enabled it.

Thanks again for all the time and effort you invest in this project :)

Sandy

rchastain commented 1 year ago

Hi Sandy. Thank you for this very clear and detailed feedback.

I can reproduce the issue regarding chess 960 castling. It's a serious problem! Thank you for having pointed it. I will work on it.

The Autoplay item is disabled by the program when an illegal move from the engine has been detected. Often the engine is not responsible, but something wrong that happened somewhere before. I have to work on that too.

By the way, if you agree, I could add your name in the README, as beta tester.

See you!

Roland

rchastain commented 1 year ago

FRC castling fixed.

rchastain commented 1 year ago

Remade the management of engine messages. I was doing it in a wrong way. I think it's much better now.

Now, when an engine plays a (reputed) illegal move, there is a message in a window,

illegal-move-message

and an incident report is created (a file named yymmddhhnn.log):

MOVE hello
ENGINE the-guilty-engine
FEN rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1
CHESSBOARD
+   a b c d e f g h   +

8   r n b q k b n r   8
7   p p p p p p p p   7
6   . : . : . : . :   6
5   : . : . : . : .   5
4   . : . : P : . :   4
3   : . : . : . : .   3
2   P P P P . P P P   2
1   R N B Q K B N R   1

+   a b c d e f g h   +

  * Active color: b
  * Castling rights: 8 1 8 1
  * En passant: e3
  * Halfmoves clock: 0
  * Fullmove number: 1
rchastain commented 1 year ago

At any moment, if you press 'd', it will open the debug window:

debugform

rchastain commented 1 year ago

Many little things fixed. This version should be better than the previous. I made a release, so that everyone can try it. New engines included.

There are still from time to time engines that don't move. I don't know why.

rchastain commented 1 year ago

Version 5.1.4 uploaded on Sourceforge.

Sky1101 commented 1 year ago

Hi Roland, it would be an absolute honor to have my name immortalized alongside your awesome chess program!! :) Although I don't know if I truly deserve it as I don't feel I've contributed that much. Anyways if you do decide you would like to include me, my full name is Sandy Veerabadren.

I've played a few games using version 5.1.4.

First, before reading about my experience testing the program, I need to be clear that I'm using an outdated operating system (Ubuntu 16.04). Some engines that don't work for me, may well work for most other people. For instance the default engine Cheng 4.40 that the program is set to start with doesn't work on my system because it was compiled on a machine that uses a newer glibc version. Cheng 4.41 on the other hand works perfectly fine on my machine as it doesn't have the same glibc requirement.

The first time I unpacked and launched the program (without going through 'Assistant'), no engine would move even though 'Autoplay' was enabled by default. Selecting a different engine from the 'Moves' menu didn't help even though the name of the engine would change in the top bar. I shutdown the program using the 'close window' button and relaunched and the results were the same, no engine would move.

In order to get the program to work, I had to select a different engine from the 'Moves' menu and then quit the program using 'Quit' from the 'Eschecs' menu so that the newly selected engine is remembered as the default engine. The program worked fine after that.

However there are some engines that wouldn't work no matter what I tried, those are: CT800 1.42, Dumb 1.11, Galjoen 0.41.2, Grumble 4723fd2, Luciole 0.0.6, OpenTal 1.0, Senpai 2.0, Stash 3.0 and Stash 4.0.

I found that if I select one of the engines that don't work and then close the program using 'Quit' (so that it is remembered as default), upon relaunching the program, again no engine would work. The program needs to be launched with a default engine that is known to work.

Note - The following issue is easily resolved but may not be immediately obvious to new users so I thought I'd mention it - I found that when I use 'Assistant' to launch the program, Eschecs always starts with 'Autoplay' disabled by default which means engines will not automatically respond to moves. Simply re-enabling 'Autoplay' via the 'Moves' menu resolves this issue.

Finally, I've encountered a very small harmless bug while playing on the older 5.0.6, I don't know if it is present in the newer versions. In a drawn endgame where there are only 2 kings left on the board the program will keep moving the king instead of ending the game with a draw.

That's it! Thanks again Roland! BTW, the randomized opening book move is working great now :)

Sandy

rchastain commented 1 year ago

Hi Sandy. Thank you very much for that detailed report.

The Assistant has an Autoplay checkbox. Maybe you didn't see it. But, after I read your message, I noticed that the checkbox was unchecked by default. The value of the autoplay option from eschecs.ini was ignored. It is fixed now.

For the draw by insufficient material, indeed it is not implemented. I add it on my to-do list.

For the engines that don't work because of glibc version, I am afraid I cannot do anything (1). Good to know that Cheng 4.41 work on your machine, because it is now the default engine.

The program needs to be launched with a default engine that is known to work.

Good point. I will investigate and try to understand what happens.

Thank you for accepting to be mentioned in the README. Your contribution is very valuable.

(1) One thing that we could do. You could create a folder with your own engines, that work on your machine. And I could make a tool to import automatically in Eschecs all the engines found in this folder. Please when you have time let me know if you like that idea.

Anyway I have to give to the user the ability to install an engine without editing by hand the configuration file. I am going to think to that.

By the way, I don't know if you have seen the script createlauncher.sh. If you run it, it will create a launcher on your desktop. After that, you can drop any engine on the launcher and play against that engine (when it works).

Thanks again for your kind contribution. See you!

Roland

P.-S. With your permission I appended your name in the README.

rchastain commented 1 year ago

For the issue related to glibc, maybe I could try to build static versions of the engines. I will try.

rchastain commented 1 year ago

I manage to make working static builds of two engines (CT800 1.42 and Gumble). But it's too complicated and too much work to make static builds of all engines. For some engines, I believed I had managed to make a static build, and later I saw that it wasn't working properly, I don't know why.

I discovered that Gumble wasn't working at all. I could find the bug and fix it.

I hope that this commit will solve the issue of all engines not responding after a non working engine has been loaded. But it will work (if it works) only if the user starts a new game.

rchastain commented 1 year ago

Draw by insufficient material done.

It doesn't handle all the rules. I will remake it better later.

rchastain commented 1 year ago

Eschecs 5.1.5 for Linux available on SourceForge.