Eschecs, a simple GUI written in Pascal

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

lauriet
Posts: 199
Joined: Sun Nov 03, 2013 9:32 am

Re: Eschecs, a simple GUI written in Pascal

Post by lauriet »

Hey, why not link to ltchess for an engine in pascal.
User avatar
Roland Chastain
Posts: 640
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Re: Eschecs, a simple GUI written in Pascal

Post by Roland Chastain »

lauriet wrote: Tue Dec 17, 2019 10:55 pm Hey, why not link to ltchess for an engine in pascal.
Hello! Thank you for your message. I know LTChess. I believe that it has only a custom text interface: it doesn't use a standard protocol. Am I wrong?

So I would be glad to include LTChess, but it would need an UCI interface. (The current version of Eschecs only supports UCI protocol.)

It's true that, since LTChess is a Pascal program, I would be possible to link it directly (as a Pascal unit) to the graphical interface. This is how I started, but this is no longer the philosophy of the project. If you are interested in such a solution, I could provide you an old version of Eschecs, where one of my programs is included directly, as a Pascal unit, into the main program. You could even use the current version of Eschecs to do that. There would be only some little modifications to do. If you like, feel free to do so.

I could also try to help you to add an UCI interface to LTChess. Up to you. :wink:
Qui trop embrasse mal étreint.
lauriet
Posts: 199
Joined: Sun Nov 03, 2013 9:32 am

Re: Eschecs, a simple GUI written in Pascal

Post by lauriet »

Yes, I would like you to help to provide the interface.

Regards
Laurie
User avatar
Roland Chastain
Posts: 640
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Re: Eschecs, a simple GUI written in Pascal

Post by Roland Chastain »

lauriet wrote: Wed Dec 18, 2019 11:33 pm Yes, I would like you to help to provide the interface.
OK. Before I start, please keep in mind that I am not an expert. I just explain to you a way to make an UCI interface for your engine, so it can work with the current version of Eschecs.

The main program will be something like this:

Code: Select all

var
  LCommand: string;
  
begin
  while not EOF do
  begin
    ReadLn(LCommand);
    
  end;
end.
That is, you read the commands sent by the GUI, and you do something for each command.

The first command that the engine receives is "uci". The engine should answer something like:
id name LTChess 1.0
id author Your Name
uciok
Pascal code:

Code: Select all

var
  LCommand: string;
  
begin
  while not EOF do
  begin
    ReadLn(LCommand);
    if LCommand = 'uci' then
    begin
      WriteLn('id name LTChess 1.0');
      WriteLn('id author Your Name'));
      WriteLn('uciok');
    end else
    ...
  end;
end.
The other commands that the engine must know are "position ..." (to set the position), "go ..." (to search for the best move) and of course "quit".

I think this is enough to give you a first idea of the thing. To see the syntax expected by Eschecs for each command, please take a look at this file.

Feel free to ask a question if something is not clear.

The full UCI protocol specification is available here.

Good luck!

Regards.

Roland

P.-S. I forgot the commands "ucinewgame", "isready" and "stop".
Qui trop embrasse mal étreint.
User avatar
Roland Chastain
Posts: 640
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Eschecs 5.0.2 released

Post by Roland Chastain »

Hello! Eschecs 5.0.2 is available.

It's the second attempt to fix the bug reported by Martin (application freezing when a piece was dropped out of the chessboard). Now, when the user drags a piece out of the chessboard, the move is aborted.

There are only binaries for Windows, since the Linux version (unless I am mistaken) was not affected by this bug. Linux users, if they exist, can continue to use the 5.0.0 version. :wink:

Two new engines are included: Moustique 0.3 and Pharaon 3.5.1.

Regards.

Roland
mar wrote: Thu Dec 12, 2019 3:15 pm
Roland Chastain wrote: Sat Nov 30, 2019 6:38 am Fixed bug of application crashing when a piece was dropped out of the window.
Hmm, I got another access violation when I mistakenly dropped a piece at the border of the chessboard while capturing
Qui trop embrasse mal étreint.
User avatar
Roland Chastain
Posts: 640
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Eschecs 5.0.5

Post by Roland Chastain »

Hello! Eschecs 5.0.5 is available.

Here's what's new, compared to the previously announced version.
  • Italian translation. Thanks to Marcello Basso.
  • ECO opening names (english only). The data have been extracted from the file ECO.TXT, that I have downloaded on the Lokasoft website. Thanks to Ed Schröder.
  • New engines: CT800 1.34, Little Wing 0.6.0, N.E.G. 1.2 (Windows only).
Hope you will like it.

Regards.

Roland
Qui trop embrasse mal étreint.
User avatar
Roland Chastain
Posts: 640
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Re: Eschecs, a simple GUI written in Pascal

Post by Roland Chastain »

Hello!

A new version of Eschecs is on the fire.

https://github.com/rchastain/eschecs

The main novelty is the usage of command line options. I removed the engines menu and the engines configuration files. I was tired to maintain a configuration file for each platform, for a software that probably nobody uses (not even me :)).

I would like that anybody can simply paste the executable somewhere (why not include it in his engine package) without worrying about configuration issues. So, from now, Eschecs will be shipped with only one engine, and if you wish to use another engine, you send the engine path as first command line parameter. The path will be saved and reloaded the next time.

There are optional parameters to customize the appearance and the settings of the application.

There will be probably new bugs resulting of that organization. For example if the last game was played in FRC mode, and if you load an engine not able to play FRC, (Eschecs saves and reload automatically the current game.) I need time (and your help, if you wish) to find and fix them.

I would like to know if the meaning of the different command line options is clear enough. English native speakers (and other), please help. :)

Regards.

Roland
Qui trop embrasse mal étreint.
User avatar
Roland Chastain
Posts: 640
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Re: Eschecs, a simple GUI written in Pascal

Post by Roland Chastain »

Roland Chastain wrote: Mon Apr 19, 2021 10:10 pm There are optional parameters to customize the appearance and the settings of the application.
Here is an example.

Code: Select all

./eschecs \
/home/roland/chessengines/CT800_V1.42 \
--position='rnbqk1nr/1ppp1ppp/p3p3/8/1bB1P3/2N5/PPPP1PPP/R1BQK1NR w HAha - 2 4' \
--autoplay=true \
--chessboard=marblecustom \
--marblecolors=FFFFFFFF,0080B3FF,0066FFFF,0047B3FF \
--time=500 \
--font=montreal \
--language=french \
--size=60
The marble texture is generated at runtime from he colors provided by the user. 8-)

Image
Qui trop embrasse mal étreint.
User avatar
Roland Chastain
Posts: 640
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Re: Eschecs, a simple GUI written in Pascal

Post by Roland Chastain »

Hello !

I compiled Eschecs 5.1.0 for Linux 64. The project has been moved to GitLab.

https://gitlab.com/rchastain/eschecs/-/tags/5.1.0

If someone wished to build the Windows version, it is easy. You need Free Pascal. Instructions here.

Regards.

Roland
Qui trop embrasse mal étreint.
User avatar
algerbrex
Posts: 596
Joined: Sun May 30, 2021 5:03 am
Location: United States
Full name: Christian Dean

Re: Eschecs, a simple GUI written in Pascal

Post by algerbrex »

Roland Chastain wrote: Sun Oct 28, 2018 2:08 pm Hello! Here is a little better version.

Eschecs 3.1.3

I forgot to say that Eschecs includes an experimental UCI chess engine with its Pascal source code. The name of the engine is Moustique. Moustique is based upon Schach, a Turbo Pascal program by Jürgen Schlottke that I had rewritten in Pascal Object, and upon Mater by Valentin Albillo, that I also retouched to make of it a Pascal unit. Moustique uses the ProDeo book by Jeroen Noomen and Ed Schröder.

I say experimental because Moustique only understands a part of the UCI protocol. He ignores the parameters of the "go" command and plays always as he likes (very fast and not very strong). But it is functional. I tried it in several chess GUI without problem.

The other thing I forgot to say is relative to the installation of a new engine. To do that, you have to edit engines.json, or create another JSON file and start Eschecs with the file name as first parameter. The file could look like this:

Code: Select all

[
  {
    "command" : "myengine1.exe",
    "name" : "Engine 1",
    "protocol" : "uci",
    "workingDirectory" : "\\extra\\engines\\engine1\\"
  },
  {
    "command" : "myengine2.exe",
    "name" : "Engine 2",
    "protocol" : "uci",
    "workingDirectory" : "C:\\MyUciEngines\\engine2\\"
  }
]
Please don't hesitate to include Eschecs in the package of your engine if you like. You don't have to ask permission.

If there are features that you particularly miss, please let me know. I will try to make it, if it isn't too complicated for me. :)

I only included two engines in the distribution, so the package isn't too heavy.

Best regards.

Roland
Hi Roland, very nice work! I like the layout and minimalistic look of the GUI. The link you posted seems to be down however?

Edit: nevermind, I'll download the latest version from the link you lasted provided. Apologies for not reading the thread carefully!