Linux friendly engines at all levels

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

OliverBr
Posts: 725
Joined: Tue Dec 18, 2007 9:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch

Re: Linux friendly engines at all levels

Post by OliverBr »

jorose wrote: Mon Oct 12, 2020 6:42 am Could you replace std=c++11 with std=c++14 on line four of the Makefile?
Works perfectly!
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink
jorose
Posts: 358
Joined: Thu Jan 22, 2015 3:21 pm
Location: Zurich, Switzerland
Full name: Jonathan Rosenthal

Re: Linux friendly engines at all levels

Post by jorose »

OliverBr wrote: Mon Oct 12, 2020 6:48 am
jorose wrote: Mon Oct 12, 2020 6:42 am Could you replace std=c++11 with std=c++14 on line four of the Makefile?
Works perfectly!
Thanks for the help and swift replies. I have updated the repository!
-Jonathan
User avatar
JimmyRustles
Posts: 32
Joined: Sun May 05, 2019 11:24 pm
Full name: Steven Griffin

Re: Linux friendly engines at all levels

Post by JimmyRustles »

If you're still looking for engines, Raven works on Ubuntu so I'd expect it'd run on most Linux distros. There are linux executables available for Raven 0.60 (~2200 elo) to Raven 1.10 (~2600 elo) here: https://github.com/sgriffin53/raven/releases
OliverBr
Posts: 725
Joined: Tue Dec 18, 2007 9:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch

Re: Linux friendly engines at all levels

Post by OliverBr »

jorose wrote: Mon Oct 12, 2020 6:54 am
OliverBr wrote: Mon Oct 12, 2020 6:48 am
jorose wrote: Mon Oct 12, 2020 6:42 am Could you replace std=c++11 with std=c++14 on line four of the Makefile?
Works perfectly!
Thanks for the help and swift replies. I have updated the repository!
I have updated my list, unfortunately I cannot edit my post anymore. I would be great if there was a possibility to edit in such cases.

Code: Select all

winter	+400	0.8.16	uci	https://github.com/rosenthj/Winter
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink
User avatar
maksimKorzh
Posts: 771
Joined: Sat Sep 08, 2018 5:37 pm
Location: Ukraine
Full name: Maksim Korzh

Re: Linux friendly engines at all levels

Post by maksimKorzh »

Volodya wrote: Wed Jan 23, 2019 4:39 pm Dear all,

I am new to the world of chess programming. a hobby I took on for 3 reasons: (i) I have always enjoyed watching chess, (ii) to learn C++ and (iii) because I find the mathematical methods used fascinating (tree searches, neural networks, etc.).

I have spent quite some effort to learn from BlueFever Software and his engine Vice (http://bluefever.net/Downloads/ViceReadMe.html). This resource was in fact invaluable to my learning of both C++ and chess programming and I can't thank him enough for providing people like me with such material.

I am now starting from an engine similar to Vice (massively copied to be frank), I am looking forward to developing some improvements and quantify the progress made. As such, I would need to find sparing partners to test against. My set up is very basic. I have a few i5 Linux laptops with cutechess-cli installed on them. I have tried to find chess engines at all levels but ended up being unable to install most of them: either they are just provided in the form of a windows executable, or the makefile doesn't work (by either trying to fetch a file that doesn't exist or other issue that seems unfixable at my end).

So far, I have the following list of sparring partners with their Elo taken from CCRL (40/4 most of the time but I might have taken it from other sources):
-Stockfish 8 3496
-Alfil 12MT 3137 (Elo for v. 15.7)
-Crafty 25.2 3056
-Spike 1.2 3017 (Elo for v. 1.4)
-Demolito 20190106 2980 (Elo for v. 20181029)
-Gaviota 1.0 2941
-Glaurung 2.2 2914
-Fruit 2.3.1 2782
-Pawny 1.2 2767
-Arminius 20170101 2721 (Elo for v. 20181223)
-K2 0.87 2617 (Elo for v. 0.91)
-Hermann 2.7.1 2532 (Elo for v. 2.8)
-AICE 0.9.22 2338
-BikJump 2.01 2104
-Vice 1.1 2042 (Elo for v. 1.0)
-Heracles 0.6.16 1920
-TSCP 1.81b 1714
-Hippocampe 0.4.2 868 (Elo for v. 0.4.1)

As you can see, there is a big gap between Elo 2000 and ELo 2700 which is where my initial improvements will lie.

Do you have any suggestion of Linux friendly engine that I could download and use as sparring partners an

Thank you in advance,

V.
Another linux enthusiast here!
Here's my engine (developed under linux but also cross compiled to windows)

https://github.com/maksimKorzh/bbc
latest versions plays around 2070 ELO

Maybe you find my 91 video tutorial series on building BBC from scratch useful:


It also has own GUI:
https://github.com/maksimKorzh/uci-gui

More over that you can play online versus it:
http://maksimkorzh.pythonanywhere.com/
jorose
Posts: 358
Joined: Thu Jan 22, 2015 3:21 pm
Location: Zurich, Switzerland
Full name: Jonathan Rosenthal

Re: Linux friendly engines at all levels

Post by jorose »

OliverBr wrote: Mon Oct 12, 2020 10:35 pm
jorose wrote: Mon Oct 12, 2020 6:54 am
OliverBr wrote: Mon Oct 12, 2020 6:48 am
jorose wrote: Mon Oct 12, 2020 6:42 am Could you replace std=c++11 with std=c++14 on line four of the Makefile?
Works perfectly!
Thanks for the help and swift replies. I have updated the repository!
I have updated my list, unfortunately I cannot edit my post anymore. I would be great if there was a possibility to edit in such cases.

Code: Select all

winter	+400	0.8.16	uci	https://github.com/rosenthj/Winter
That is almost certainly v0.9 I put the version number in a header file, probably not the smartest thing to do. So if you previously cloned and compiled, there is a chance its saying wrong version number.
-Jonathan
OliverBr
Posts: 725
Joined: Tue Dec 18, 2007 9:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch

Re: Linux friendly engines at all levels

Post by OliverBr »

maksimKorzh wrote: Mon Oct 12, 2020 10:57 pm
Here's my engine (developed under linux but also cross compiled to windows)

https://github.com/maksimKorzh/bbc
latest versions plays around 2070 ELO
It compiles well with Linux/GCC, but MacOSX/class yields a couple of errors. If you want to fix it, I can post them.
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink
User avatar
maksimKorzh
Posts: 771
Joined: Sat Sep 08, 2018 5:37 pm
Location: Ukraine
Full name: Maksim Korzh

Re: Linux friendly engines at all levels

Post by maksimKorzh »

OliverBr wrote: Tue Oct 13, 2020 12:42 am
maksimKorzh wrote: Mon Oct 12, 2020 10:57 pm
Here's my engine (developed under linux but also cross compiled to windows)

https://github.com/maksimKorzh/bbc
latest versions plays around 2070 ELO
It compiles well with Linux/GCC, but MacOSX/class yields a couple of errors. If you want to fix it, I can post them.
It would be great, Oliver, I'd appreciate that (pull request would be just awesome). Could you also post what the errors are? I have no idea what compilers are used on MacOS.
jdart
Posts: 4366
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: Linux friendly engines at all levels

Post by jdart »

maksimKorzh wrote: Tue Oct 13, 2020 12:51 am It would be great, Oliver, I'd appreciate that (pull request would be just awesome). Could you also post what the errors are? I have no idea what compilers are used on MacOS.
The MacOS standard compiler nowadays is clang.
OliverBr
Posts: 725
Joined: Tue Dec 18, 2007 9:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch

Re: Linux friendly engines at all levels

Post by OliverBr »

maksimKorzh wrote: Tue Oct 13, 2020 12:51 am It would be great, Oliver, I'd appreciate that (pull request would be just awesome). Could you also post what the errors are? I have no idea what compilers are used on MacOS.
As Jon said, "clang" is the typical MacOSX compiler, which is a more sophisticated compiler than gcc, but it should be 100% compatible. So I guess the errors may help you to fix some code cleanups. Here it is with gcc is being linked to clang.

EDIT: I see now, that this double definition of "time" as variable and function may be the main problem. Just rename one.

Code: Select all

make
gcc -Ofast bbc.c -o ../bin/bbc
bbc.c:347:5: error: redefinition of 'time' as different kind of symbol
int time = -1;
    ^
/usr/include/time.h:117:8: note: previous definition is here
time_t time(time_t *);
       ^
bbc.c:2189:94: warning: operator '<<' has lower precedence than '-'; '-' will be evaluated first [-Wshift-op-parentheses]
                                add_move(move_list, encode_move(source_square, target_square - 8, piece, 0, 0, 1, 0, 0));
                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
bbc.c:1711:6: note: expanded from macro 'encode_move'
    (target << 6) |     \
     ^~~~~~ ~~
bbc.c:2189:94: note: place parentheses around the '-' expression to silence this warning
                                add_move(move_list, encode_move(source_square, target_square - 8, piece, 0, 0, 1, 0, 0));
                                                                               ~~~~~~~~~~~~~~^~~
bbc.c:1711:6: note: expanded from macro 'encode_move'
    (target << 6) |     \
     ^~~~~~
bbc.c:2302:94: warning: operator '<<' has lower precedence than '+'; '+' will be evaluated first [-Wshift-op-parentheses]
                                add_move(move_list, encode_move(source_square, target_square + 8, piece, 0, 0, 1, 0, 0));
                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
bbc.c:1711:6: note: expanded from macro 'encode_move'
    (target << 6) |     \
     ^~~~~~ ~~
bbc.c:2302:94: note: place parentheses around the '+' expression to silence this warning
                                add_move(move_list, encode_move(source_square, target_square + 8, piece, 0, 0, 1, 0, 0));
                                                                               ~~~~~~~~~~~~~~^~~
bbc.c:1711:6: note: expanded from macro 'encode_move'
    (target << 6) |     \
     ^~~~~~
bbc.c:2936:29: warning: unsequenced modification and access to 'mask' [-Wunsequenced]
                    mask |= set_bit(mask, square);
                         ~~ ^
bbc.c:562:47: note: expanded from macro 'set_bit'
#define set_bit(bitboard, square) ((bitboard) |= (1ULL << (square)))
                                              ^
bbc.c:2944:29: warning: unsequenced modification and access to 'mask' [-Wunsequenced]
                    mask |= set_bit(mask, square);
                         ~~ ^
bbc.c:562:47: note: expanded from macro 'set_bit'
#define set_bit(bitboard, square) ((bitboard) |= (1ULL << (square)))
                                              ^
bbc.c:4425:10: error: non-object type 'time_t (time_t *)' (aka 'long (long *)') is not assignable
    time = -1;
    ~~~~ ^
bbc.c:4461:14: error: non-object type 'time_t (time_t *)' (aka 'long (long *)') is not assignable
        time = atoi(argument + 6);
        ~~~~ ^
bbc.c:4466:14: error: non-object type 'time_t (time_t *)' (aka 'long (long *)') is not assignable
        time = atoi(argument + 6);
        ~~~~ ^
bbc.c:4487:14: error: non-object type 'time_t (time_t *)' (aka 'long (long *)') is not assignable
        time = movetime;
        ~~~~ ^
bbc.c:4500:13: warning: comparison between pointer and integer ('time_t (*)(time_t *)' (aka 'long (*)(long *)') and 'int')
    if(time != -1)
       ~~~~ ^  ~~
bbc.c:4506:14: error: invalid operands to binary expression ('time_t (time_t *)' (aka 'long (long *)') and 'int')
        time /= movestogo;
        ~~~~ ^  ~~~~~~~~~
bbc.c:4509:18: warning: ordered comparison between pointer and integer ('time_t (*)(time_t *)' (aka 'long (*)(long *)') and 'int')
        if (time > 1500) time -= 50;
            ~~~~ ^ ~~~~
bbc.c:4509:31: error: invalid operands to binary expression ('time_t (time_t *)' (aka 'long (long *)') and 'int')
        if (time > 1500) time -= 50;
                         ~~~~ ^  ~~
bbc.c:4512:18: warning: incompatible pointer to integer conversion assigning to 'int' from 'time_t (*)(time_t *)' (aka 'long (*)(long *)') [-Wint-conversion]
        stoptime = starttime + time + inc;
                 ^ ~~~~~~~~~~~~~~~~~~~~~~
bbc.c:4515:18: warning: ordered comparison between pointer and integer ('time_t (*)(time_t *)' (aka 'long (*)(long *)') and 'int')
        if (time < 1500 && inc && depth == 64) stoptime = starttime + inc - 50;
            ~~~~ ^ ~~~~
bbc.c:4525:13: warning: format specifies type 'int' but the argument has type 'time_t (*)(time_t *)' (aka 'long (*)(long *)') [-Wformat]
            time, starttime, stoptime, depth, timeset);
            ^~~~
9 warnings and 7 errors generated.
make: *** [all] Error 1
PS: For Arasan I get an error with MacOSX/Clang, too:

Code: Select all

make
clang: error: no input files
expr: syntax error
awk: syntax error at source line 1
 context is
	BEGIN{print CCVER >>>  >= <<< 
awk: illegal statement at source line 1
awk: illegal statement at source line 1
Makefile:186: *** GCC version is : versions <  not supported.  Stop.
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink