Gull 3 (Linux port) released.

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

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
basil00
Posts: 55
Joined: Thu Oct 22, 2015 12:14 am

Gull 3 (Linux port) released.

Post by basil00 » Wed Oct 28, 2015 2:07 am

This is a simple Linux port of the Gull 3 chess engine (3rd place in TCEC 8). This was announced on the TCEC chatwing but I think it is also worthwhile to announce it here.

Gull 3 (Linux) is available from here: Note that if you download a pre-built binary you must manually set the execute permission (chmod a+x Gull).

The original Gull 3 is Windows-only, and contained some very Windows-specific code. This port replaces the Windows-specific parts with Linux equivalents. The Linux port supports Gull's SMP implementation including using processes instead of threads. The core engine itself (search, evaluation, etc.) is not platform specific and is very portable.

The port did expose a small bug in Gull 3 which has been fixed in the Linux version. See here for details. The bug caused the Linux version to crash, but is probably harmless in the Windows version (maybe small elo loss?).

The port has not been significantly tested. There may be more bugs or it may not be as strong as the Windows version. Over time I hope to improve Gull Linux further. Bug reports and/or pull requests are welcome via Github.

User avatar
MikeB
Posts: 2522
Joined: Thu Mar 09, 2006 5:34 am
Location: Pen Argyl, Pennsylvania

Re: Gull 3 (Linux port) released.

Post by MikeB » Wed Oct 28, 2015 2:13 am

basil00 wrote:This is a simple Linux port of the Gull 3 chess engine (3rd place in TCEC 8). This was announced on the TCEC chatwing but I think it is also worthwhile to announce it here.

Gull 3 (Linux) is available from here: Note that if you download a pre-built binary you must manually set the execute permission (chmod a+x Gull).

The original Gull 3 is Windows-only, and contained some very Windows-specific code. This port replaces the Windows-specific parts with Linux equivalents. The Linux port supports Gull's SMP implementation including using processes instead of threads. The core engine itself (search, evaluation, etc.) is not platform specific and is very portable.

The port did expose a small bug in Gull 3 which has been fixed in the Linux version. See here for details. The bug caused the Linux version to crash, but is probably harmless in the Windows version (maybe small elo loss?).

The port has not been significantly tested. There may be more bugs or it may not be as strong as the Windows version. Over time I hope to improve Gull Linux further. Bug reports and/or pull requests are welcome via Github.
Awesome - we just got much closer to a Mac version - will let you know how I make out.

jdart
Posts: 3503
Joined: Fri Mar 10, 2006 4:23 am
Location: http://www.arasanchess.org

Re: Gull 3 (Linux port) released.

Post by jdart » Wed Oct 28, 2015 2:26 am

The Linux port supports Gull's SMP implementation including using processes instead of threads.
The Windows version does this, too - so doing it in the port is sensible. But I think a thread-based implementation would be preferable and (with C++ 11 especially) more readily portable.

--Jon

Dann Corbit
Posts: 8662
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: Gull 3 (Linux port) released.

Post by Dann Corbit » Wed Oct 28, 2015 2:55 am

Windows version with your move generation patch:
https://www.dropbox.com/s/5wwmzphz1aetn ... 03.7z?dl=0

The version without your patch clearly generates the wrong moves for this position.
[d]r7/2pnk3/4bp2/pN2p2P/P7/8/2K3P1/5R1R b - -

User avatar
MikeB
Posts: 2522
Joined: Thu Mar 09, 2006 5:34 am
Location: Pen Argyl, Pennsylvania

Re: Gull 3 (Linux port) released.

Post by MikeB » Wed Oct 28, 2015 3:04 am

MikeB wrote:
basil00 wrote:This is a simple Linux port of the Gull 3 chess engine (3rd place in TCEC 8). This was announced on the TCEC chatwing but I think it is also worthwhile to announce it here.

Gull 3 (Linux) is available from here: Note that if you download a pre-built binary you must manually set the execute permission (chmod a+x Gull).

The original Gull 3 is Windows-only, and contained some very Windows-specific code. This port replaces the Windows-specific parts with Linux equivalents. The Linux port supports Gull's SMP implementation including using processes instead of threads. The core engine itself (search, evaluation, etc.) is not platform specific and is very portable.

The port did expose a small bug in Gull 3 which has been fixed in the Linux version. See here for details. The bug caused the Linux version to crash, but is probably harmless in the Windows version (maybe small elo loss?).

The port has not been significantly tested. There may be more bugs or it may not be as strong as the Windows version. Over time I hope to improve Gull Linux further. Bug reports and/or pull requests are welcome via Github.
Awesome - we just got much closer to a Mac version - will let you know how I make out.
No dice - will need somebody who has more programming knowledge than me. It's possible I believe , but there is no #include <sys/prctl.h> for MAC OS X. So I googled and tried to come with some solution - which I was able to compile - but then got this.

Code: Select all

Mac-Pro&#58;src michaelbyrne$ ./gull
Gull 3 x64
go depth 6
info depth 1
info depth 2
info depth 3
info depth 4
info depth 5
info depth 6
info nodes I64d score cp 27919
bestmove e2e4 ponder b8c6
go depth 7
info depth 6 seldepth 4 score cp 17 nodes I64d nps I64d pv &#40;null&#41;
info depth 7
Segmentation fault&#58; 11
Mac-Pro&#58;src michaelbyrne$  
looks really off

Dann Corbit
Posts: 8662
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: Gull 3 (Linux port) released.

Post by Dann Corbit » Wed Oct 28, 2015 3:10 am

The windows format specifiers for 64 bit integers are wrong for posix platforms.

%I64d should be %lld for long long integer, for instance.

Code: Select all

    if &#40;score < beta&#41; &#123;
        if &#40;score <= alpha&#41; fprintf&#40;stdout, "info depth %d seldepth %d score %s%d upperbound nodes %lld nps %lld pv %s\n", depth, sel_depth, score_string, &#40;mate ? mate_score &#58; score&#41;, snodes, nps, pv_string&#41;;
        else fprintf&#40;stdout, "info depth %d seldepth %d score %s%d nodes %lld nps %lld pv %s\n", depth, sel_depth, score_string, &#40;mate ? mate_score &#58; score&#41;, snodes, nps, pv_string&#41;;
    &#125; else fprintf&#40;stdout, "info depth %d seldepth %d score %s%d lowerbound nodes %lld nps %lld pv %s\n", depth, sel_depth, score_string, &#40;mate ? mate_score &#58; score&#41;, snodes, nps, pv_string&#41;;

basil00
Posts: 55
Joined: Thu Oct 22, 2015 12:14 am

Re: Gull 3 (Linux port) released.

Post by basil00 » Wed Oct 28, 2015 10:48 am

Dann Corbit wrote:The windows format specifiers for 64 bit integers are wrong for posix platforms.
Yep. Now fixed.
MikeB wrote:No dice - will need somebody who has more programming knowledge than me.
Should now be fixed. The seg. fault was caused by the format strings (at least when I tried it).

Medium term I plan to add in MacOSX support, as well as the original Windows support, as one unified code-base.
Dann Corbit wrote: The version without your patch clearly generates the wrong moves for this position.
Interesting. I wonder how much this affected Gull? The bug is only triggered on very specific conditions, i.e. pawn on h7 capture/promotes to a knight on g8.

User avatar
Jim Ablett
Posts: 1327
Joined: Fri Jul 14, 2006 5:56 am
Location: London, England
Contact:

Re: Gull 3 (Linux port) released.

Post by Jim Ablett » Wed Oct 28, 2015 12:53 pm

Well done Basil.

I ported the src of some earlier versions of Gull a while back so I could compile for Android.
Maybe you can find something useful in the code.
You can download them here >

http://tinyurl.com/qxg6foz (Gulchess 1.2)
http://tinyurl.com/qzcctv9 (Gullchess 0.12a)

I gave up on Gull 3 - too hard for me with all that windows-specific multi-core code.

Jim.

User avatar
MikeB
Posts: 2522
Joined: Thu Mar 09, 2006 5:34 am
Location: Pen Argyl, Pennsylvania

Re: Gull 3 (Linux port) released.

Post by MikeB » Wed Oct 28, 2015 12:54 pm

Thanks - will try again tonight. Also found a Mac patch from version v1.2 that may be helpful. EST here so it will be much later

Isaac
Posts: 261
Joined: Sat Feb 22, 2014 7:37 pm

Re: Gull 3 (Linux port) released.

Post by Isaac » Wed Oct 28, 2015 7:49 pm

Awesome job Basil. Really appreciated.

Post Reply