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.
-
MikeB
- Posts: 2522
- Joined: Thu Mar 09, 2006 5:34 am
- Location: Pen Argyl, Pennsylvania
Post
by MikeB » Mon Jan 23, 2017 2:48 am
The
Crafty team is pleased to announce the release of
Crafty 25.3 with the addition of a
Play of ELO feature - this is strictly a chess players version as there are no other changes to the code. You may also download the
Crafty Chess Informant opening books, based on the games published over the last
50 years by Chess Informant. Just include them in the directory where you place the Crafty exe and crafty wil access them automatically.
Will add windows and linux versions as they become available.
Source, macOS exe's and opening books are here:
https://github.com/MichaelB7/Crafty/releases/tag/25.3
To play by ELO insert into the crafty.rc file:
Code: Select all
elo="rating" where rating is any number between 800 and 2600.
A non busy "sleep" for the appropriate time for the time control selected is enabled by default so it will not play instantaneously. Selecting a rating below 1200 enables skill level which will slowly degrade the skill level the more one selects a rating below 1200. A rating between 1200 and 2600 uses Crafty full evaluation function with no deliberate evaluation weakening, it simply reduces the number of nodes searched. Every increase of 100 ELO points will double the number of nodes searched on average. There is also built-randomization factor that varies the number of nodes on any given move to increase variability in play.
-
supersharp77
- Posts: 475
- Joined: Sat Jul 05, 2014 5:54 am
- Location: Southwest USA
Post
by supersharp77 » Mon Jan 23, 2017 10:07 am
MikeB wrote:The
Crafty team is pleased to announce the release of
Crafty 25.3 with the addition of a
Play of ELO feature - this is strictly a chess players version as there are no other changes to the code. You may also download the
Crafty Chess Informant opening books, based on the games published over the last
50 years by Chess Informant. Just include them in the directory where you place the Crafty exe and crafty wil access them automatically.
Will add windows and linux versions as they become available.
Source, macOS exe's and opening books are here:
https://github.com/MichaelB7/Crafty/releases/tag/25.3
To play by ELO insert into the crafty.rc file:
Code: Select all
elo="rating" where rating is any number between 800 and 2600.
A non busy "sleep" for the appropriate time for the time control selected is enabled by default so it will not play instantaneously. Selecting a rating below 1200 enables skill level which will slowly degrade the skill level the more one selects a rating below 1200. A rating between 1200 and 2600 uses Crafty full evaluation function with no deliberate evaluation weakening, it simply reduces the number of nodes searched. Every increase of 100 ELO points will double the number of nodes searched on average. There is also built-randomization factor that varies the number of nodes on any given move to increase variability in play.
Great idea.......Like Brainfish for Crafty.....downloaded new bin files and will check out results!! Thx AR

-
styx
- Posts: 338
- Joined: Tue Mar 13, 2012 8:59 pm
- Location: Germany
Post
by styx » Mon Jan 23, 2017 10:41 pm
Awesome. Thank you.
One question: why are there two different ways of setting up parameters in the .craftyrc (according to the demo .craftyrc)?
for example, one time it is
and then there is also
or is simply both possible?
-
MikeB
- Posts: 2522
- Joined: Thu Mar 09, 2006 5:34 am
- Location: Pen Argyl, Pennsylvania
Post
by MikeB » Tue Jan 24, 2017 2:15 am
styx wrote:Awesome. Thank you.
One question: why are there two different ways of setting up parameters in the .craftyrc (according to the demo .craftyrc)?
for example, one time it is
and then there is also
or is simply both possible?
Both should work , I'm sort of old school and use the "=", old habits die hard.
-
jdart
- Posts: 3503
- Joined: Fri Mar 10, 2006 4:23 am
- Location: http://www.arasanchess.org
Post
by jdart » Tue Jan 24, 2017 3:17 am
The Makefile.xp does not seem to work with Visual C++:
Code: Select all
Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation. All rights reserved.
cl /D_CONSOLE /DWIN64 /D_CRT_SECURE_NO_DEPRECATE /Ox /Gr /GL /MT /DSMP /DCPUS=4 /DVC_INLINE_ASM /DNT_i386 /c crafty.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24210 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
crafty.c
e:\chess\engines\crafty25.3\crafty-25.3\src\iterate.c(238): warning C4312: 'type cast': conversion from 'long' to 'void *' of greater size
e:\chess\engines\crafty25.3\crafty-25.3\src\thread.c(455): warning C4028: formal parameter 1 different from declaration
e:\chess\engines\crafty25.3\crafty-25.3\src\thread.c(888): warning C4028: formal parameter 1 different from declaration
e:\chess\engines\crafty25.3\crafty-25.3\src\utility.c(2558): warning C4477: 'printf' : format string '%llu' requires an argument of type 'unsigned __int64', but variadic argument 1 has type 'DWORD'
e:\chess\engines\crafty25.3\crafty-25.3\src\utility.c(2558): note: consider using '%lu' in the format string
e:\chess\engines\crafty25.3\crafty-25.3\src\utility.c(2591): warning C4477: 'printf' : format string '%I64d' requires an argument of type '__int64', but variadic argument 1 has type 'ULONG'
e:\chess\engines\crafty25.3\crafty-25.3\src\utility.c(2591): note: consider using '%ld' in the format string
e:\chess\engines\crafty25.3\crafty-25.3\src\tbcore.c(11): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.EXE"' : return code '0x2'
Stop.
You should be checking for define _WIN32 to detect a Windows build, not _WIN32__ or __WIN32__. You may want to look at my fork of the Fathom library, which has a bunch of portability fixes:
https://github.com/jdart1/Fathom
--Jon
-
GONeill
- Posts: 51
- Joined: Sun Jun 15, 2014 4:40 am
-
Contact:
Post
by GONeill » Wed Jan 25, 2017 2:54 am
Trying to compile it with GCC 5.4 ("make windows-gcc" after renaming makefile.win to makefile) I'm getting the following errors:
Code: Select all
make -j target=WINDOWS \
CC=gcc CXX=gcc \
opt=' -DINLINEASM -DCPUS=8 -DSYZYGY -DEPD -DSKILL ' \
CFLAGS='-Wall -pipe -Wno-array-bounds -Ofast --param l1-cache-size=64 --param l2-cache-size=256 -l3-cache-size=12228 -march=native -O3 -msse4.2 -mpopcnt -Os -Ofast -O3 -fprofile-use -fprofile-correction \
-pthread' \
CXFLAGS='-Wall -pipe -Wno-array-bounds --param l1-cache-size=64 --param l2-cache-size=256 -l3-cache-size=12228 -march=native -msse4.2 -mpopcnt -Os -Ofast -O3 -fprofile-use -fprofile-correction \
-pthread' \
LDFLAGS=' -fprofile-use -pthread -lstdc++' \
crafty-make
make[1]: Entering directory `/d/MinGW/Crafty'
make[2]: Entering directory `/d/MinGW/Crafty'
gcc -Wall -pipe -Wno-array-bounds -Ofast --param l1-cache-size=64 --param l2-cache-size=256 -l3-cache-size=12228 -march=native -O3 -msse4.2 -mpopcnt -Os -Ofast -O3 -fprofile-use -fprofile-correction \
-pthread -DINLINEASM -DCPUS=8 -DSYZYGY -DEPD -DSKILL -DWINDOWS -c crafty.c
In file included from iterate.c:1:0,
from crafty.c:13:
chess.h:326:20: error: expected identifier or '(' before numeric constant
#define MSB(v) (63 - __builtin_clzll(v))
^
inline.h:73:19: note: in expansion of macro 'MSB'
__forceinline int MSB(uint64_t a) {
^
In file included from chess.h:648:0,
from iterate.c:1,
from crafty.c:13:
inline.h: In function '__builtin_ctzll':
inline.h:83:21: warning: passing argument 1 of '_BitScanForward64' from incompatible pointer type [-Wincompatible-pointer-types]
_BitScanForward64(&v, a);
^
In file included from d:/MinGW/mingw64/x86_64-w64-mingw32/include/winnt.h:27:0,
from d:/MinGW/mingw64/x86_64-w64-mingw32/include/minwindef.h:163,
from d:/MinGW/mingw64/x86_64-w64-mingw32/include/windef.h:8,
from d:/MinGW/mingw64/x86_64-w64-mingw32/include/windows.h:69,
from chess.h:50,
from iterate.c:1,
from crafty.c:13:
d:/MinGW/mingw64/x86_64-w64-mingw32/include/psdk_inc/intrin-impl.h:749:1: note: expected 'long unsigned int *' but argument is of type 'int *'
__buildbitscan(_BitScanForward64, unsigned __int64, "bsf{q %[Mask],%[Index] | %[Index],%[Mask]}")
^
In file included from crafty.c:13:0:
iterate.c: In function 'Iterate':
iterate.c:182:19: warning: implicit declaration of function 'sleep' [-Wimplicit-function-declaration]
if (elo_sleep) sleep (time_limit/167);
^
iterate.c:238:39: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
NumaStartThread(ThreadInit, (void *) proc);
^
In file included from crafty.c:27:0:
utility.c: In function 'WinNumaInit':
utility.c:2533:16: warning: too many arguments for format [-Wformat-extra-args]
printf("System is NUMA. " PRId64 " nodes reported by Windows\n",
^
utility.c:2533:16: warning: too many arguments for format [-Wformat-extra-args]
utility.c:2538:18: warning: too many arguments for format [-Wformat-extra-args]
printf("Node " PRId64 " CPUs: ", ulNode);
^
utility.c:2538:18: warning: too many arguments for format [-Wformat-extra-args]
utility.c:2546:24: warning: too many arguments for format [-Wformat-extra-args]
printf("" PRId64 " ", ulCPU);
^
utility.c:2546:24: warning: too many arguments for format [-Wformat-extra-args]
utility.c:2558:16: warning: unknown conversion type character 'l' in format [-Wformat=]
printf("Current ideal CPU is %llu\n", dwCPU);
^
utility.c:2558:16: warning: too many arguments for format [-Wformat-extra-args]
utility.c:2558:16: warning: unknown conversion type character 'l' in format [-Wformat=]
utility.c:2558:16: warning: too many arguments for format [-Wformat-extra-args]
utility.c:2564:22: warning: too many arguments for format [-Wformat-extra-args]
printf("Exchanging nodes 0 and " PRId64 "\n", ulNode);
^
utility.c:2564:22: warning: too many arguments for format [-Wformat-extra-args]
utility.c: In function 'NumaStartThread':
utility.c:2591:12: warning: format '%I64d' expects argument of type 'long long int', but argument 2 has type 'ULONG {aka long unsigned int}' [-Wformat=]
printf("Starting thread on node " PRId64 " CPU mask %I64d\n", ulNumaNode,
^
utility.c:2591:12: warning: too many arguments for format [-Wformat-extra-args]
utility.c:2591:12: warning: format '%I64d' expects argument of type 'long long int', but argument 2 has type 'ULONG {aka long unsigned int}' [-Wformat=]
utility.c:2591:12: warning: too many arguments for format [-Wformat-extra-args]
In file included from tbcore.c:11:0,
from tbprobe.c:104,
from crafty.c:28:
d:/MinGW/mingw64/x86_64-w64-mingw32/include/unistd.h: At top level:
d:/MinGW/mingw64/x86_64-w64-mingw32/include/unistd.h:46:22: error: conflicting types for 'sleep'
unsigned int __cdecl sleep (unsigned int);
^
In file included from crafty.c:13:0:
iterate.c:182:19: note: previous implicit declaration of 'sleep' was here
if (elo_sleep) sleep (time_limit/167);
^
make[2]: *** [crafty.o] Error 1
make[2]: Leaving directory `/d/MinGW/Crafty'
make[1]: *** [crafty-make] Error 2
make[1]: Leaving directory `/d/MinGW/Crafty'
make: *** [windows-gcc] Error 2
Any idea what I might have done wrong? Thanks!
-
Colin-G
- Posts: 102
- Joined: Mon Oct 31, 2016 5:30 pm
- Location: England
Post
by Colin-G » Wed Jan 25, 2017 10:40 am
I have had problems in the past compiling from some Makefiles.
When having problems, I use the "-Wfatal-errors" flag and try to sort out the errors one at a time.
-
MikeB
- Posts: 2522
- Joined: Thu Mar 09, 2006 5:34 am
- Location: Pen Argyl, Pennsylvania
Post
by MikeB » Wed Jan 25, 2017 10:54 am
For macOS , I always use gcc 4.8 without any problems. Not sure if this will solve your problem or not. I'm not any help solving windows issues .