Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: UCI960 Support? #3

Open
LocutusOfPenguin opened this issue Aug 9, 2017 · 8 comments
Open

Question: UCI960 Support? #3

LocutusOfPenguin opened this issue Aug 9, 2017 · 8 comments

Comments

@LocutusOfPenguin
Copy link

Hello,
im looking around for different uci engines for the project "picochess", which is also part of these DGT Pi chess clocks.
Mainly, im searching for engines with UCI960 support and/or Levels.

Now: Your side saying "todo uci960" ...can y tell me if that's planed in near future, and if yes when this can be expected? Also what about level support (similar to SF).

Jürgen

@LocutusOfPenguin
Copy link
Author

Something else:
Trying to compile Laser for Raspberry, doesnt work (out of the box).
I get following error:
syzygy/tbcore.c:393:1: error: narrowing conversion of ‘-1’ from ‘int’ to ‘char’ inside { } [-Wnarrowing]
};

I changed "char" to "short" , and then this link error happening:

arm-linux-gnueabihf-gcc -O3 -flto -o laser bbinit.o board.o common.o eval.o evalhash.o hash.o search.o moveorder.o syzygy/tbprobe.o uci.o -lpthread
/tmp/ccSJxa7x.s: Assembler messages:
/tmp/ccSJxa7x.s:999: Error: Ungültige Anweisung »bsfq r2,r4«
/tmp/ccSJxa7x.s:1142: Error: Ungültige Anweisung »bsfq r2,r4«
lto-wrapper: fatal error: arm-linux-gnueabihf-gcc returned 1 exit status
compilation terminated.
/usr/lib/gcc-cross/arm-linux-gnueabihf/5/../../../../arm-linux-gnueabihf/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
Makefile:30: die Regel für Ziel „uci“ scheiterte
make: *** [uci] Fehler 1

Im using a cross compiler from x86_64 to arm (ubuntu) but my friend on a Rasp (=directly) has similar problems.

@jeffreyan11
Copy link
Owner

Hi,
Unfortunately, 960 will not be available for a while. I have been too busy to write such a large amount of code, and I plan on doing pondering before 960 support. I would say this December at the earliest.

For the compilation error, I have never tried compiling with anything other than MinGW, but the error probably comes from the inline assembly in common.cpp. Perhaps changing this to gcc intrinsics or setting USE_INLINE_ASM = false in common.h would help, at the cost of some NPS.

@LocutusOfPenguin
Copy link
Author

Hi Jeff,
thanks for yr comments on UCI960!

for ubuntu (& its gcc), it works ...but not when i tried it on a raspberrypi.
I changed the USE_INILINE_ASM = false , as you suggested, and i works now (as far i see).

What about this "char => short" change from me (see above)?
If i do this, this narrow error disappears.
Also there are warnings for
KNOWN_WIN, TB_WIN (eval.h) => unused var

Jürgen

@jeffreyan11
Copy link
Owner

The offdiag array is actually from Ronald de Man's Syzygy code, but there should be no harm in changing char to short (or int).

I can't really explain the warnings, as KNOWN_WIN is used in eval.cpp and TB_WIN is used in search.cpp. Do the unused warnings stay even when all other warnings and errors are gone? Sometimes gcc gives unused warnings for const variables that are derived from other const variables (in this case both are derived from PIECE_VALUES[EG][PAWNS]) when it cannot complete the compilation.

@LocutusOfPenguin
Copy link
Author

This is on a RaspberryPi3 (your files - not changed):

make
g++ -c -Wall -ansi -pedantic -std=c++11 -O3 -flto -x c++ bbinit.cpp -o bbinit.o
g++ -c -Wall -ansi -pedantic -std=c++11 -O3 -flto -x c++ board.cpp -o board.o
In file included from board.cpp:25:0:
eval.h:69:11: warning: ‘KNOWN_WIN’ defined but not used [-Wunused-variable]
const int KNOWN_WIN = PIECE_VALUES[EG][PAWNS] * 75;
^
eval.h:70:11: warning: ‘TB_WIN’ defined but not used [-Wunused-variable]
const int TB_WIN = PIECE_VALUES[EG][PAWNS] * 125;
^
g++ -c -Wall -ansi -pedantic -std=c++11 -O3 -flto -x c++ common.cpp -o common.o
g++ -c -Wall -ansi -pedantic -std=c++11 -O3 -flto -x c++ eval.cpp -o eval.o
In file included from eval.cpp:25:0:
eval.h:70:11: warning: ‘TB_WIN’ defined but not used [-Wunused-variable]
const int TB_WIN = PIECE_VALUES[EG][PAWNS] * 125;
^
g++ -c -Wall -ansi -pedantic -std=c++11 -O3 -flto -x c++ evalhash.cpp -o evalhash.o
g++ -c -Wall -ansi -pedantic -std=c++11 -O3 -flto -x c++ hash.cpp -o hash.o
g++ -c -Wall -ansi -pedantic -std=c++11 -O3 -flto -x c++ search.cpp -o search.o
In file included from search.cpp:27:0:
eval.h:69:11: warning: ‘KNOWN_WIN’ defined but not used [-Wunused-variable]
const int KNOWN_WIN = PIECE_VALUES[EG][PAWNS] * 75;
^
g++ -c -Wall -ansi -pedantic -std=c++11 -O3 -flto -x c++ moveorder.cpp -o moveorder.o
g++ -c -Wall -ansi -pedantic -std=c++11 -O3 -flto -x c++ syzygy/tbprobe.cpp -o syzygy/tbprobe.o
In file included from syzygy/tbprobe.cpp:44:0:
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
};
^
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing]
In file included from syzygy/tbprobe.cpp:32:0:
syzygy/../eval.h:69:11: warning: ‘KNOWN_WIN’ defined but not used [-Wunused-variable]
const int KNOWN_WIN = PIECE_VALUES[EG][PAWNS] * 75;
^
g++ -c -Wall -ansi -pedantic -std=c++11 -O3 -flto -x c++ uci.cpp -o uci.o
In file included from uci.cpp:31:0:
eval.h:69:11: warning: ‘KNOWN_WIN’ defined but not used [-Wunused-variable]
const int KNOWN_WIN = PIECE_VALUES[EG][PAWNS] * 75;
^
eval.h:70:11: warning: ‘TB_WIN’ defined but not used [-Wunused-variable]
const int TB_WIN = PIECE_VALUES[EG][PAWNS] * 125;
^
g++ -O3 -flto -o laser bbinit.o board.o common.o eval.o evalhash.o hash.o search.o moveorder.o syzygy/tbprobe.o uci.o -lpthread

@LocutusOfPenguin
Copy link
Author

when i fix the "tbcore.c" (short) these errors vanish..the others stay.
This is NOT with ubunu, only with rasp.

You can simply ignore it, if y want..I just mentioned its not everywhere perfect.
After all, this issue is for "uci960" :-)

@LocutusOfPenguin
Copy link
Author

Hi Jeff,

Thanks for #6 ! I'll include yr engine in my next picochess release.

for compile your newest code on raspPi (arm) i need to change this inline flag, and this tbcore stuff.
Perhaps its interesting to see this:
http://talkchess.com/forum/viewtopic.php?p=738162&highlight=#738162

Jürgen

@xoto10
Copy link

xoto10 commented Nov 1, 2019

As a heads up, the current TCEC 960 competition made me try adding 960 support to laser.

I don't think this code is ready for a PR yet, (may be buggy/reduce normal chess elo too much) but it appears to be "ok" at 960: c960b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants