Gull 3 (Linux port) released.

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

Moderator: Ras

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

Gull 3 (Linux port) released.

Post by basil00 »

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: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: Gull 3 (Linux port) released.

Post by MikeB »

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: 4433
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: Gull 3 (Linux port) released.

Post by jdart »

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: 12870
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Gull 3 (Linux port) released.

Post by Dann Corbit »

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: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: Gull 3 (Linux port) released.

Post by MikeB »

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: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 (null)
info depth 7
Segmentation fault: 11
Mac-Pro:src michaelbyrne$  
looks really off
Dann Corbit
Posts: 12870
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Gull 3 (Linux port) released.

Post by Dann Corbit »

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 (score < beta) {
        if (score <= alpha) fprintf(stdout, "info depth %d seldepth %d score %s%d upperbound nodes %lld nps %lld pv %s\n", depth, sel_depth, score_string, (mate ? mate_score : score), snodes, nps, pv_string);
        else fprintf(stdout, "info depth %d seldepth %d score %s%d nodes %lld nps %lld pv %s\n", depth, sel_depth, score_string, (mate ? mate_score : score), snodes, nps, pv_string);
    } else fprintf(stdout, "info depth %d seldepth %d score %s%d lowerbound nodes %lld nps %lld pv %s\n", depth, sel_depth, score_string, (mate ? mate_score : score), snodes, nps, pv_string);
basil00
Posts: 55
Joined: Thu Oct 22, 2015 2:14 am

Re: Gull 3 (Linux port) released.

Post by basil00 »

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: 2455
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: Gull 3 (Linux port) released.

Post by Jim Ablett »

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: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: Gull 3 (Linux port) released.

Post by MikeB »

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: 265
Joined: Sat Feb 22, 2014 8:37 pm

Re: Gull 3 (Linux port) released.

Post by Isaac »

Awesome job Basil. Really appreciated.