Eschecs, a simple GUI written in Pascal

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
Roland Chastain
Posts: 23
Joined: Sat Jun 08, 2013 8:07 am
Location: Dakar (Senegal)
Full name: Roland Chastain
Contact:

Re: Eschecs, a simple GUI written in Pascal

Post by Roland Chastain » Fri Nov 02, 2018 8:27 pm

Hello Daniel! Thank you for your message. I would like to make my engine better, but I spend too much time on the GUI. :)
Best regards.
Roland
Qui trop embrasse mal étreint.

User avatar
Guenther
Posts: 2522
Joined: Wed Oct 01, 2008 4:33 am
Location: Regensburg, Germany
Full name: Guenther Simon
Contact:

Re: Eschecs, a simple GUI written in Pascal

Post by Guenther » Sat Nov 03, 2018 9:13 am

Roland Chastain wrote:
Sun Oct 28, 2018 1: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.

...
Thanks for the info. I have added it to the XB/UCI chronology. BTW I have realized it was already released once in April
under the name Mosquito. (the old name is mentioned in the according column now)

I did a quick test, also because I wanted to see the progress of Mainsworthys' fight with the xboard protocol specs ;-)

In this test I noticed that there might be a problem with enpassant?
I played more games with it, but only the two below crashed both with a possible enpassant move in the end.
For the second one I have even a polyglot log with more infos on the cause
(I changed from UCI2WB to Polyglot for the next match to outrule a incompatibility with it)

Code: Select all

1541235064.125 POLYGLOT FEN r3r3/1b1k4/p1n1p1q1/1pnp3p/4PRp1/2P3P1/P6P/1K1R4 b - - 0 26
1541235064.125 Adapter->Engine: position startpos moves d2d4 e7e6 c1f4 f8b4 c2c3 g7g5 f4e5 f7f6 e5c7 b4c3 b2c3 d8c7 d1b3 d7d5 b3b5 b8c6 e2e3 h7h5 b1d2 a7a6 b5c5 b7b5 e1c1 g8h6 f1d3 h6g4 d3g6 e8d7 g1f3 g4f2 f3e5 f6e5 g6e8 h8e8 d4e5 f2d3 c1b1 d3c5 d2f3 g5g4 f3g5 c7e5 g5f7 e5f5 e3e4 f5f7 h1f1 f7g6 f1f4 c8b7 g2g3
1541235064.125 Adapter->Engine: go wtime 137200 btime 356200 movestogo 15
1541235064.395 Engine->Adapter: bestmove e8g8
1541235064.395 Adapter->GUI: move e8g8
1541235064.395 POLYGLOT MOVE Rg8
1541235064.395 POLYGLOT THINK -> WAIT
1541235068.695 GUI->Adapter: time 35591
1541235068.695 GUI->Adapter: otim 13291
1541235068.695 GUI->Adapter: usermove h2h4
1541235068.695 POLYGLOT MOVE h4
1541235068.695 POLYGLOT WAIT -> THINK
1541235068.695 POLYGLOT START SEARCH
1541235068.695 POLYGLOT FEN r5r1/1b1k4/p1n1p1q1/1pnp3p/4PRpP/2P3P1/P7/1K1R4 b - h3 0 27
1541235068.695 Adapter->Engine: position startpos moves d2d4 e7e6 c1f4 f8b4 c2c3 g7g5 f4e5 f7f6 e5c7 b4c3 b2c3 d8c7 d1b3 d7d5 b3b5 b8c6 e2e3 h7h5 b1d2 a7a6 b5c5 b7b5 e1c1 g8h6 f1d3 h6g4 d3g6 e8d7 g1f3 g4f2 f3e5 f6e5 g6e8 h8e8 d4e5 f2d3 c1b1 d3c5 d2f3 g5g4 f3g5 c7e5 g5f7 e5f5 e3e4 f5f7 h1f1 f7g6 f1f4 c8b7 g2g3 e8g8 h2h4
1541235068.695 Adapter->Engine: go wtime 132910 btime 355910 movestogo 14
1541235068.835 Engine->Adapter: An unhandled exception occurred at $004092CD:
1541235068.835 Engine->Adapter: EAccessViolation: Access violation
1541235068.835 Engine->Adapter:   $004092CD
1541235068.835 Engine->Adapter:   $00426441  TCHESSGAME__THINK,  line 93 of ./source/chess/chessgame.pas
1541235068.845 Engine->Adapter:   $00426757  TCHESSGAME__PLAYMOVE,  line 151 of ./source/chess/chessgame.pas
1541235068.845 Engine->Adapter:   $00401BB3  main,  line 99 of source/moustique.pas
1541235068.845 Engine->Adapter: 
1541235068.845 POLYGLOT *** Mainloop has ended ***
1541235068.845 POLYGLOT Closing engine.
1541235068.845 Adapter->Engine: EOF
1541235068.845 POLYGLOT Waiting for child process to exit.
1541235068.845 POLYGLOT pipex_exit(): Moustique01.exe: child exited unexpectedly.
1541235068.845 POLYGLOT *** QUIT ***
1541235069.045 POLYGLOT Calling exit
[Event "Test"]
[Site "CAPPUCCINO"]
[Date "2018.11.03"]
[Round "1"]
[White "Mainsworthy_New52"]
[Black "Moustique 0.1 (UCI2WB)"]
[Result "1-0"]
[TimeControl "40/360"]
[Number "1"]

1. d4 e6 2. Bf4 Bb4+ 3. c3 g5 4. Be5 f6 5. Bxc7 Bxc3+ 6. bxc3 Qxc7 7. Qb3
d5 8. Nd2 h5 9. O-O-O Nc6 10. Qb5 a6 11. Qc5 b6 12. Qa3 Nxd4 13. Qa4+ Nb5
14. c4 Nh6 15. g3 Bb7 16. Bh3 g4 17. Bf1 Nf5 18. f4
{Error: second chess program (UCI2WB Moustique_01 C:\Engines\UCI\Moustique_01) exited unexpectedly} 1-0

[Event "Test"]
[Site "CAPPUCCINO"]
[Date "2018.11.03"]
[Round "1"]
[White "Mainsworthy_New52"]
[Black "Moustique_01"]
[Result "1-0"]
[TimeControl "40/360"]
[Number "1"]

1. d4 e6 2. Bf4 Bb4+ 3. c3 g5 4. Be5 f6 5. Bxc7 Bxc3+ 6. bxc3 Qxc7 7. Qb3
d5 8. Qb5+ Nc6 9. e3 h5 10. Nd2 a6 11. Qc5 b5 12. O-O-O Nh6 13. Bd3 Ng4 14.
Bg6+ Kd7 15. Ngf3 Nxf2 16. Ne5+ fxe5 17. Be8+ Rxe8 18. dxe5 Nd3+ 19. Kb1
Nxc5 20. Nf3 g4 21. Ng5 Qxe5 22. Nf7 Qf5+ 23. e4 Qxf7 24. Rhf1 Qg6 25. Rf4
Bb7 26. g3 Rg8 27. h4
{Error: second chess program (Moustique_01) exited unexpectedly} 1-0

User avatar
Roland Chastain
Posts: 23
Joined: Sat Jun 08, 2013 8:07 am
Location: Dakar (Senegal)
Full name: Roland Chastain
Contact:

Re: Eschecs, a simple GUI written in Pascal

Post by Roland Chastain » Sat Nov 03, 2018 7:40 pm

Hello Guenther!

Thank you very much for testing and reporting here the result. I will study your data and try to find and fix the bug.
Guenther wrote:
Sat Nov 03, 2018 9:13 am
Thanks for the info. I have added it to the XB/UCI chronology. BTW I have realized it was already released once in April under the name Mosquito.
Mosquito is the FreeBASIC version of the program. (There is also a FB version of the GUI. Engine included in the same ZIP file.) I have no intention to update it. I decided to continue only the Pascal project.

Thank you again for your contribution.

Best regards.

Roland
Qui trop embrasse mal étreint.

User avatar
Roland Chastain
Posts: 23
Joined: Sat Jun 08, 2013 8:07 am
Location: Dakar (Senegal)
Full name: Roland Chastain
Contact:

Moustique 0.1

Post by Roland Chastain » Sun Nov 04, 2018 10:48 am

Hello! The bug is fixed. Please download the new files on Moustique home page.

Moustique

Thank you Guenther.
Qui trop embrasse mal étreint.

tpoppins
Posts: 773
Joined: Tue Nov 24, 2015 8:11 pm
Location: upstate

Re: Eschecs, a simple GUI written in Pascal

Post by tpoppins » Sun Nov 04, 2018 6:09 pm

Roland Chastain wrote:
Fri Nov 02, 2018 8:27 pm
I would like to make my engine better, but I spend too much time on the GUI. :)
Hundreds of engines around but only a few GUIs. And with a lovely, distinctly retro-flavored GUI like Eschecs who could blame you for focusing on it?
Guenther wrote:
Sat Nov 03, 2018 9:13 am
I did a quick test, also because I wanted to see the progress of Mainsworthys' fight with the xboard protocol specs ;-)
:mrgreen:
Günther, you just made my day! This is a candidate for the best CCC line since DC's "And you! ..." thread.
Tirsa Poppins
CCRL

User avatar
Roland Chastain
Posts: 23
Joined: Sat Jun 08, 2013 8:07 am
Location: Dakar (Senegal)
Full name: Roland Chastain
Contact:

Re: Eschecs, a simple GUI written in Pascal

Post by Roland Chastain » Sun Nov 04, 2018 9:34 pm

tpoppins wrote:
Sun Nov 04, 2018 6:09 pm
Hundreds of engines around but only a few GUIs. And with a lovely, distinctly retro-flavored GUI like Eschecs who could blame you for focusing on it?
Thank you for the compliment. Here is a new release. It was needed because the buggy code detected with Guenther help was also used by the GUI.

By the way, the marble color has changed.
eschecs314.png
eschecs314.png (68.58 KiB) Viewed 605 times
Eschecs 3.1.4
Qui trop embrasse mal étreint.

Aldus
Posts: 15
Joined: Mon Sep 03, 2018 10:59 am
Location: Romania
Full name: Cristi Marian

Re: Eschecs, a simple GUI written in Pascal

Post by Aldus » Mon Nov 05, 2018 4:49 pm

Roland Chastain wrote:
Sun Nov 04, 2018 9:34 pm
By the way, the marble color has changed.
I liked the old one more, so perhaps adding more styles instead of just replacing the old ones? So that ppl can chose their favorite.

In any case, it is of no use for me that small. Not to mention that I don't know how to tell the engine to only think for only 10 seconds per move, or set up a time control.

I think a bigger (configurable) board and time controls would allow more ppl to actually use and test your GUI. Then, you could receive more feedback and improve upon it later.

User avatar
Roland Chastain
Posts: 23
Joined: Sat Jun 08, 2013 8:07 am
Location: Dakar (Senegal)
Full name: Roland Chastain
Contact:

Re: Eschecs, a simple GUI written in Pascal

Post by Roland Chastain » Mon Nov 05, 2018 7:48 pm

Aldus wrote:
Mon Nov 05, 2018 4:49 pm
I liked the old one more, so perhaps adding more styles instead of just replacing the old ones? So that ppl can chose their favorite.
Thank you for your message. OK, in the next release there will be both styles.
Aldus wrote:
Mon Nov 05, 2018 4:49 pm
In any case, it is of no use for me that small. Not to mention that I don't know how to tell the engine to only think for only 10 seconds per move, or set up a time control.
OK for the configurable board. For the time control, what would be, according to you, the expectations of the standard user?

I ask that question because currently only one form of the "go" command is implemented:

Code: Select all

go movetime <time>
And the time for the user move isn't controled.
Qui trop embrasse mal étreint.

User avatar
Roland Chastain
Posts: 23
Joined: Sat Jun 08, 2013 8:07 am
Location: Dakar (Senegal)
Full name: Roland Chastain
Contact:

Re: Eschecs, a simple GUI written in Pascal

Post by Roland Chastain » Mon Nov 05, 2018 11:21 pm

Here is a build of Eschecs with 60 x 60 pieces. The ability for the user to choose size and other options should come soon. :)
eschecs314condal60.png
eschecs314condal60.png (152.5 KiB) Viewed 520 times
Download
Qui trop embrasse mal étreint.

User avatar
Roland Chastain
Posts: 23
Joined: Sat Jun 08, 2013 8:07 am
Location: Dakar (Senegal)
Full name: Roland Chastain
Contact:

Re: Eschecs, a simple GUI written in Pascal

Post by Roland Chastain » Tue Nov 06, 2018 12:39 am

It looks like the program is buggy. It's too late to remove my message. Sorry, I should have more tested the thing. :oops:
I will try to fix the bug tomorrow.
Qui trop embrasse mal étreint.

Post Reply