Clericus/Hopeless ported to Lazarus

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

Moderators: Harvey Williamson, bob, hgm

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

Clericus/Hopeless ported to Lazarus

Post by Roland Chastain » Sat Aug 01, 2020 10:43 pm

Hello!

I ported to from Delphi to Lazarus the Clericus/Hopeless project by Pawel Koziol. Here is the GitLab repository, where you can download the source code and a Linux binary of the engine.

https://gitlab.com/rchastain/hopeless-lazarus

The program has two build modes. It can be built as a GUI, or as an XBoard/WinBoard engine. Clericus is the name for the GUI, Hopeless the name or the engine.

The engine is not very strong, so it can be an interesting opponent for average players (like me). :)

Regards.

Roland
Last edited by Roland Chastain on Sat Aug 01, 2020 11:03 pm, edited 1 time in total.
Qui trop embrasse mal étreint.

User avatar
Roland Chastain
Posts: 415
Joined: Sat Jun 08, 2013 8:07 am
Location: France
Full name: Roland Chastain
Contact:

Re: Clericus/Hopeless ported to Lazarus

Post by Roland Chastain » Sat Aug 01, 2020 10:59 pm

adnoh wrote:
Sat Aug 01, 2020 10:26 pm
Roland Chastain wrote:
Sat Aug 01, 2020 6:44 pm
Roland Chastain wrote:
Mon Jan 27, 2020 10:47 pm
I created a git repository with the source code of Clericus/Hopeless by Pawel Koziol. I made some modifications for compatibility with the current version of the Delphi compiler, tried to refresh the graphical interface, added a french translation and made some other little modifications. The repository is here:

https://gitlab.com/rchastain/hopeless
Hello! I ported Clericus/Hopeless from Delphi to Lazarus. So Hopeless is now available for Linux. You can find the source code of the Lazarus project and a Linux 64 binary here:

https://gitlab.com/rchastain/hopeless-l ... -/releases

I can't provide a Windows binary because I no longer have a Windows system. If there is a Lazarus and Windows user who would want to build the engine for Windows, he would be welcome. (Please choose the "XBoard_Release" build mode.)

Regards.

Roland
I did make an attempt to create a Windows build using Lazarus 2.0.10 and the GUI build seems to work but the xboard build crashes as soon as I try to start a game in Arena.

https://ibb.co/5W8cv6v

I have made no attempt to debug that. If you want to pursue this I do not mind spending some time on this.
Thank for your answer, and for your interest in that project.

Here is a thing that you could try. The project has a "XBoard_Debug" build mode. It will produce an executable named hopeless-debug.exe. If you have time, it would be interesting to make a test with it. There should be two *.log files. And of course, it would be good to see the Arena debug file. Maybe we will see where the bug is. If it isn't enough, I will try to borrow a Windows computer to do some other investigations.

I forgot to say that I tested the Linux executable with XBoard, with the option "protocol version 1".

Best regards.

Roland
Qui trop embrasse mal étreint.

adnoh
Posts: 22
Joined: Tue Jun 26, 2007 4:31 am
Full name: Charles Wong

Re: Clericus/Hopeless ported to Lazarus

Post by adnoh » Sun Aug 02, 2020 12:22 am

Here is a Windows build and I packaged it like your Linux one.

https://1drv.ms/u/s!Aqe2-2i2H5hetEWTv45 ... V?e=K4wNmb

Thanks for the tip on the debug build. As soon as I ran that and I looked at the wbunit.log file I could see the problem. I had set the time control in Arena to Blitz with base of 0 minutes and 5 seconds and bonus of 1 seconds and that was the source of the error. When I changed it to something more traditional like 2 minutes + 6 seconds it played fine. Perhaps something to fix in the code?

Code: Select all

SENDING feature done=0
BEGIN Execute
RECEIVING xboard
SENDING feature sigint=0 sigterm=0 myname="Hopeless 0.49.0.3" done=1
RECEIVING new
RECEIVING random
RECEIVING level 0 0:5 1

User avatar
Roland Chastain
Posts: 415
Joined: Sat Jun 08, 2013 8:07 am
Location: France
Full name: Roland Chastain
Contact:

Re: Clericus/Hopeless ported to Lazarus

Post by Roland Chastain » Sun Aug 02, 2020 4:07 am

Good! Glad that you already found the cause of the problem. Yes, I will look how it could be fixed.

Thank you for Windows package. I add it to the project page. :wink:
Qui trop embrasse mal étreint.

User avatar
Roland Chastain
Posts: 415
Joined: Sat Jun 08, 2013 8:07 am
Location: France
Full name: Roland Chastain
Contact:

Re: Clericus/Hopeless ported to Lazarus

Post by Roland Chastain » Sun Aug 02, 2020 8:37 am

adnoh wrote:
Sun Aug 02, 2020 12:22 am
Perhaps something to fix in the code?
Done. :)

Code: Select all

SENDING feature done=0
SENDING feature sigint=0 sigterm=0 myname="Hopeless 0.49.0.3" done=1
RECEIVING level 0 0:5 1
RECEIVING level 40 0:30 0
RECEIVING quit

Code: Select all

2-8-20 10:22:13 Incremental time control
2-8-20 10:22:13 Base=0:5 minutes
2-8-20 10:22:13 Inc=1 seconds
2-8-20 10:22:13 Base=5 seconds
2-8-20 10:22:34 Conventional time control
2-8-20 10:22:34 Moves=40
2-8-20 10:22:34 Time=0:30 minutes
2-8-20 10:22:34 Time=30 seconds
It was a good occasion for me to read the protocol documentation. So thank you very much for giving to me the occasion to improve the program and to learn something. :wink:

The GitLab repository has been updated.

P. S. FYI, I renamed wbunit.pas to dialog.pas and wbunit.log to dialog.log.
Qui trop embrasse mal étreint.

adnoh
Posts: 22
Joined: Tue Jun 26, 2007 4:31 am
Full name: Charles Wong

Re: Clericus/Hopeless ported to Lazarus

Post by adnoh » Sun Aug 02, 2020 3:32 pm

Please let me know if you want me to do another build with the changes for time control. Should I also post a Clericus build while I am at it?

I also have Lazarus installed on a MacOS laptop here so I will also try to make a Mac build but I will need to install a chess GUI to test it before I post it for you.

Thanks for porting this over to Lazarus.

User avatar
Roland Chastain
Posts: 415
Joined: Sat Jun 08, 2013 8:07 am
Location: France
Full name: Roland Chastain
Contact:

Re: Clericus/Hopeless ported to Lazarus

Post by Roland Chastain » Mon Aug 03, 2020 5:37 am

adnoh wrote:
Sun Aug 02, 2020 3:32 pm
Please let me know if you want me to do another build with the changes for time control. Should I also post a Clericus build while I am at it?

I also have Lazarus installed on a MacOS laptop here so I will also try to make a Mac build but I will need to install a chess GUI to test it before I post it for you.

Thanks for porting this over to Lazarus.
Yes, indeed, we could make a new release. And we could include a binary of Clericus in each package. I have just changed the version number and created a "Release" build mode for the GUI.

Yes, it would be good to have a Mac build.

Thank you for your interest in that project. :wink:
Qui trop embrasse mal étreint.

User avatar
Dr.Wael Deeb
Posts: 9772
Joined: Wed Mar 08, 2006 7:44 pm
Location: Amman,Jordan

Re: Clericus/Hopeless ported to Lazarus

Post by Dr.Wael Deeb » Mon Aug 03, 2020 8:42 am

Roland Chastain wrote:
Mon Aug 03, 2020 5:37 am
adnoh wrote:
Sun Aug 02, 2020 3:32 pm
Please let me know if you want me to do another build with the changes for time control. Should I also post a Clericus build while I am at it?

I also have Lazarus installed on a MacOS laptop here so I will also try to make a Mac build but I will need to install a chess GUI to test it before I post it for you.

Thanks for porting this over to Lazarus.
Yes, indeed, we could make a new release. And we could include a binary of Clericus in each package. I have just changed the version number and created a "Release" build mode for the GUI.

Yes, it would be good to have a Mac build.

Thank you for your interest in that project. :wink:
Thanks for your great contribution ....

What is the estimated strength of Lazarus ?

Cheers
_No one can hit as hard as life.But it ain’t about how hard you can hit.It’s about how hard you can get hit and keep moving forward.How much you can take and keep moving forward….

adnoh
Posts: 22
Joined: Tue Jun 26, 2007 4:31 am
Full name: Charles Wong

Re: Clericus/Hopeless ported to Lazarus

Post by adnoh » Mon Aug 03, 2020 3:32 pm

Here is the Windows 0.49.0.4 build with the latest changes and it has the Hopeless (xboard) and Clericus (gui) executable inside. I'll work on the Mac build soon.

I tested it in Arena with time control of 5"+1" and it works now.

https://1drv.ms/u/s!Aqe2-2i2H5hetEra1f4 ... y?e=GXnNZ7

Just a small note. Seems you may have unintentionally renamed the build mode of xboard_release to gui_release because it was missing so I just created it to do the build.

adnoh
Posts: 22
Joined: Tue Jun 26, 2007 4:31 am
Full name: Charles Wong

Re: Clericus/Hopeless ported to Lazarus

Post by adnoh » Tue Aug 04, 2020 3:05 am

To get a sense of its strength, I had Hopeless 0.49.0.4 play 10 games each against AdaChess 3.6 and MadChess 2.2 at 2'+6"" and it had 4 wins and 4 ties against AdaChess but it lost all of the other games on time forfeit. Too bad too as it can hold its own against MadChess in a few games until it forfeits.

For clarity, the WinBoard engine is called Hopeless, Lazarus is the development environment it was ported to from Delphi by Roland.

https://www.lazarus-ide.org/index.php

Post Reply