Crafty v25.2 Release

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

Moderators: hgm, Harvey Williamson, bob

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

Crafty v25.2 Release

Post by MikeB » Sat Oct 29, 2016 3:04 pm

Bob Hyatt and team - Tracy Reigle, Peter Skinner and myself, are please to announce the release of Crafty-v25.2

Changes:
Although it is not our practice to release a new version so soon after a previous release, Bob found a minor bug in the fail-high / fail-low code that we determined made a measurable impact on play - at least 20 ELO maybe more. Crafty is supposed to deal with the case where the first move produces a score, then a later move fails high but then produces a worse score. Crafty is supposed to revert to the better move. An "optimization" made this fail, but it is now fixed. "new" command removed as it is pretty difficult to restore everything once a game has been started. To start a new game, quit crafty and restart. Crafty now notifies xboard/winboard to do this automatically so using those interfaces requires no changes to anything.

Main Site: http://craftychess.com
Direct link to source: http://craftychess.com/downloads/source/crafty-25.2.zip
Github: https://github.com/MichaelB7/Crafty

Note: We are still waiting for craftychess.com to be updated , but in the meantime, you may pull the source from either GitHub above or using the dropbox link below: https://www.dropbox.com/s/l0v1hl4kvz9ye ... 2.zip?dl=1

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

Re: Crafty v25.2 Release

Post by jdart » Sat Oct 29, 2016 4:42 pm

It would be nice if the Makefile auto-detected the target. I use $OSTYPE, or if not set:

uname -s|awk '{print tolower($$0)}

I also think -DTEST and -DTRACE should be disabled by default.

I use the $CC variable to select the compiler. So I do:

CC ?= g++

and if not set it defaults to g++. If I want clang for example I set CC=clang in the environment.

Most of the time I do not have to edit my Makefile to build, unless I want a debug build (and if I wanted to I could externize selecting thiat, too).

--Jon

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

Re: Crafty v25.2 Release

Post by MikeB » Sun Oct 30, 2016 1:49 am

Dann Corbett was kind enough to send a Windows exe and it may be found here:

https://github.com/MichaelB7/Crafty/blo ... .2.exe.zip

Canoike
Posts: 86
Joined: Tue Jan 17, 2012 7:08 pm

Re: Crafty v25.2 Release

Post by Canoike » Sun Oct 30, 2016 3:23 am

make profile profile-guided-optimizations
(edit Makefile to make the profile
option use the right compiler)

Which lines must I edit to use the profile for GCC compiler ?

Thanks.

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

Re: Crafty v25.2 Release

Post by MikeB » Sun Oct 30, 2016 6:05 am

copy and paste this in below line 56 "# option is omitted, windows is assumed.", replacing what is there and just type "make" on the command line

Code: Select all

##  the sole purpose of the next 7 lines of code is to grab
##  the directory name where the source is and applied it
##  to the name of the exe, for pgo under gcc, you must 
##  use gcc 4.8 - other versions do not work
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
current_dir := $(notdir $(patsubst %/,%,$(dir $(mkfile_path))))
CRAFTY= $(current_dir:.d=)
CC=gcc-mp-4.8
LDFLAGS=-pthread
STRIP=strip



#	$(MAKE) -j unix-gcc
default:
	$(MAKE) -j gpro
help:
	@echo "You must specify the system which you want to compile for:"
	@echo ""
	@echo "make unix-gcc         Unix w/gcc compiler"
	@echo "make unix-icc         Unix w/icc compiler"
	@echo "make profile          profile-guided-optimizations"
	@echo "                      (edit Makefile to make the profile"
	@echo "                      option use the right compiler)"
	@echo ""


quick:
	$(MAKE) target=UNIX \
		CC=icc \
 		opt='-DSYZYGY -DTEST -DTRACE -mpopcnt -DCPUS=24' \
		CFLAGS='-Wall -Wno-array-bounds -pipe -O3' \
		LDFLAGS='$(LDFLAGS) -lstdc++' \
		crafty-make

unix-gcc:
	$(MAKE) -j target=UNIX \
		CC=gcc-mp-4.8 \
		opt='-DSYZYGY -mpopcnt -DCPUS=24' \
		CFLAGS='-Wall -Wno-array-bounds -pipe -O3 -fprofile-use \
		-fprofile-correction -pthread' \
		LDFLAGS='$(LDFLAGS) -fprofile-use -pthread -lstdc++' \
		crafty-make

unix-gcc-profile:
	$(MAKE) -j target=UNIX \
		CC=gcc-mp-4.8 \
		opt='-DSYZYGY  -mpopcnt -DCPUS=24' \
		CFLAGS='-Wall -Wno-array-bounds -pipe -O3 -fprofile-arcs \
		-pthread' \
		LDFLAGS='$(LDFLAGS) -fprofile-arcs -pthread -lstdc++ ' \
		crafty-make

unix-icc:
	$(MAKE) -j target=UNIX \
		CC=icc  \
		opt=' -DSYZYGY -DUNIX -DSKILL -mpopcnt -DCPUS=24 -DVERSION' \
		CFLAGS='-Wall -ipo -w -O3 --param max-inline-insns-auto=100 --param inline-min-speedup=25 -ftree-loop-distribution -ftree-vectorize  -prof_use -prof_dir ./prof -fno-alias -pthread' \
				LDFLAGS='$(LDFLAGS) -pthread -lstdc++' \
		crafty-make

unix-icc-profile:
	$(MAKE) -j target=UNIX \
		CC=icc \
		opt=' -DSYZYGY -DUNIX -DSKILL -mpopcnt -DCPUS=24 -DVERSION' \
		CFLAGS='-Wall -w -Os -O2 --param max-inline-insns-auto=100 --param inline-min-speedup=5 -ftree-loop-distribution -ftree-vectorize -prof_gen -prof_dir ./prof -fno-alias -pthread' \
		LDFLAGS='$(LDFLAGS) -pthread -lstdc++ ' \
		crafty-make

ipro:
	@rm -rf *.o
	@rm -rf log.*
	@rm -rf game.*
	@rm -rf prof
	@rm -rf *.gcda
	@mkdir prof
	@touch *.c *.h
	$(MAKE) -j unix-icc-profile
	@echo "#!/bin/csh" > runprof
	@echo "$&#40;CRAFTY&#41; <<EOF" >>runprof
	@echo "bench -3" >>runprof
	@echo "mt=0" >>runprof
	@echo "quit" >>runprof
	@echo "EOF" >>runprof
	@chmod +x runprof
	@./runprof
	@rm runprof
	@touch *.c *.h
	$&#40;MAKE&#41; -j unix-icc
	$&#40;STRIP&#41; $&#40;CRAFTY&#41;

gpro&#58;
	@rm -rf *.o
	@rm -rf log.*
	@rm -rf game.*
	@rm -rf prof
	@rm -rf *.gcda
	@mkdir prof
	@touch *.c  *.h
	$&#40;MAKE&#41; -j unix-gcc-profile
	@echo "#!/bin/csh" > runprof
	@echo "$&#40;CRAFTY&#41; <<EOF" >>runprof
	@echo "bench -3" >>runprof
	@echo "mt=0" >>runprof
	@echo "quit" >>runprof
	@echo "EOF" >>runprof
	@chmod +x runprof
	@./runprof
	@rm runprof
	@touch *.c *.h
	$&#40;MAKE&#41; -j unix-gcc
	$&#40;STRIP&#41; $&#40;CRAFTY&#41;


#
#  one of the two following definitions for "objects" should be used.  The
#  default is to compile everything separately.  However, if you use the 
#  definition that refers to crafty.o, that will compile using the file crafty.c
#  which #includes every source file into one large glob.  This gives the
#  compiler max opportunity to inline functions as appropriate.  You should try
#  compiling both ways to see which way produces the fastest code.
#

#objects = main.o iterate.o time.o search.o quiesce.o evaluate.o thread.o \
        repeat.o hash.o next.o history.o movgen.o make.o unmake.o attacks.o \
        see.o tbprobe.o boolean.o utility.o book.o drawn.o epd.o \
        epdglue.o init.o input.o autotune.o interrupt.o option.o output.o \
        ponder.o resign.o root.o learn.o setboard.o test.o validate.o \
        annotate.o analyze.o evtest.o bench.o edit.o data.o

objects = crafty.o

# Do not change anything below this line!

opts = $&#40;opt&#41; -D$&#40;target&#41;

#	@$&#40;MAKE&#41; -j opt='$&#40;opt&#41;'  CFLAGS='$&#40;CFLAGS&#41;' $&#40;CRAFTY&#41;
crafty-make&#58;
	@$&#40;MAKE&#41; opt='$&#40;opt&#41;'  CFLAGS='$&#40;CFLAGS&#41;' $&#40;CRAFTY&#41;

crafty.o&#58; *.c *.h

$&#40;CRAFTY&#41;&#58;	$&#40;objects&#41;
	$&#40;CC&#41; $&#40;LDFLAGS&#41; -o $&#40;CRAFTY&#41; $&#40;objects&#41; -lm  $&#40;LIBS&#41;

evaluate.o&#58; evaluate.h

clean&#58;
	-rm -f *.o $&#40;CRAFTY&#41;

$&#40;objects&#41;&#58; chess.h data.h

.c.o&#58;
	$&#40;CC&#41; $&#40;CFLAGS&#41; $&#40;opts&#41; -c $*.c

.s.o&#58;
	$&#40;AS&#41; $&#40;AFLAGS&#41; -o $*.o $*.s

petero2
Posts: 559
Joined: Mon Apr 19, 2010 5:07 pm
Location: Sweden
Contact:

Re: Crafty v25.2 Release

Post by petero2 » Sun Oct 30, 2016 12:05 pm

MikeB wrote:Bob Hyatt and team - Tracy Reigle, Peter Skinner and myself, are please to announce the release of Crafty-v25.2
Binaries for windows and linux are available here.

The same notes as for 25.1 apply.

User avatar
Graham Banks
Posts: 30641
Joined: Sun Feb 26, 2006 9:52 am
Location: Auckland, NZ

Re: Crafty v25.2 Release

Post by Graham Banks » Sun Oct 30, 2016 6:05 pm

petero2 wrote:
MikeB wrote:Bob Hyatt and team - Tracy Reigle, Peter Skinner and myself, are please to announce the release of Crafty-v25.2
Binaries for windows and linux are available here.

The same notes as for 25.1 apply.
Thanks Peter. :)
My email addresses:
gbanksnz at gmail.com
gbanksnz at yahoo.co.nz

Canoike
Posts: 86
Joined: Tue Jan 17, 2012 7:08 pm

Re: Crafty v25.2 Release

Post by Canoike » Sun Oct 30, 2016 7:58 pm

Thank you Mike B, it worked. One note for the Ubuntu/Debian users, /bin/csh must be replaced by /bin/sh because csh does not exist.

Canoike
Posts: 86
Joined: Tue Jan 17, 2012 7:08 pm

Re: Crafty v25.2 Release - Easy draw

Post by Canoike » Sun Oct 30, 2016 8:57 pm

Why does not Crafty try to win instead of offering a draw by 3 fold ?

[Event "Computer Chess Game"]
[Site "HAL2014"]
[Date "2016.10.30"]
[Round "-"]
[White "donjon"]
[Black "Crafty-25.2"]
[Result "1/2-1/2"]
[TimeControl "300+3"]
[Annotator "6... +0,06"]

1. e4 c5 2. Nf3 d6 3. Bb5+ Nc6 4. d4 cxd4 5. Nxd4 Bd7 6. Be2 e5
{+0,06/26 13} 7. Nb3 Be7 {+0,00/26 13} 8. c4 f5 {-0,18/26 11} 9. f3 Nf6
{-0,32/24 22} 10. Nc3 fxe4 {-0,22/25 16} 11. fxe4 Be6 {-0,07/26 10} 12. O-O
O-O {-0,05/27 6} 13. Be3 Qd7 {+0,00/26 11} 14. Qd3 Nb4 {+0,00/25 11} 15.
Qd1 Nc6 {+0,00/27 18} 16. Qd3 Nb4 {+0,00/31 9} 17. Qd1 Nc6 {+0,00/27 18}
{Draw claim: 3-fold repetition} 1/2-1/2

My .crafyrc file :

mt 4
hash=2048M
hashp=128M
book random 1
book width 5
bookw freq 0.5
bookw eval 0.5
bookw learn 0.5
egtb
egtbd
tbpath=/home/donjon/jeux/echecs/syzygy/
ponder on
learn=100
log off
swindle on
smpgroup=12
smpmin=7
smpgsd=10
smpgsl=7
exit

rcmaddox
Posts: 158
Joined: Mon Oct 14, 2013 6:59 pm
Location: Winder, GA

Re: Crafty v25.2 Release

Post by rcmaddox » Mon Oct 31, 2016 4:24 am

petero2 wrote:
MikeB wrote:Bob Hyatt and team - Tracy Reigle, Peter Skinner and myself, are please to announce the release of Crafty-v25.2
Binaries for windows and linux are available here.

The same notes as for 25.1 apply.
Thank you!

Post Reply