Butcher Chess

(Version 1.64, 25 IV 2012)



I. Download




 == DJGPP (x86-32) ==


CWSDPMI – small tool required to run Butcher under plain DOS






 == GCC (x86-32) ==



 == GCC (x86-64) ==







 == (x86-32) ==



 == (x86-64) ==



 == (x86-64 Core i7) ==



 == (x86-64 Core i7, IOPCCC 2012 Compilation, 1-2 December 2012) ==





Opening book(s)


Due to server limitations I’ve split an opening book into two chunks.


Chunk 1      (5000000 bytes)

Chunk 2      (4654130 bytes)


In order to get a valid book for Butcher you may follow the steps below:


1)  Download two parts of the book (links above).

2)  Copy downloaded files (book.001 and book.002) into the same directory/folder.

3)  Run windows console (i.e. cmd.exe in Windows 2000/XP) and go to the directory/folder where files book.001 and book.002 were copied.

4)  Join files into one book.zip archive using command:
copy /B book.001 + /B book.002 book.zip /B

5)  Unpack book.zip into Butcher’s directory/folder (use WinZIP application for example).





II. Additional Information


     After nearly three year period an update of Butcher chess engine is released. Although Butcher 1.59 series had been ready last year and later successfully used during the 7th IOPCCC 2008 it was never released. Many small changes and lots of bug fixes were implemented over the time, e.g.:


·         some minor speed improvements,

·         move generation bug fixes,

·         hash table structure/access redesign,

·         search extensions redesigned,

·         endgame knowledge added,

·         evaluation function adjustments,

·         improved time management,

·         hundred hours of testing,

·         many small improvements.


Apart from the above there is one new significant feature in Butcher 1.60 series - multiple CPU support. Since it was not my intention to completely redesign the code I decided to adapt the existing code to support multiple CPUs. This work was supposed to get me some experience before I start a new project which shall also support multiple CPUs. Here are some facts regarding Butcher's parallel search implementation:


·         Parallel search is available only on Windows platform.

·         Separate processes are used to implement the search. There is one master process (the one which starts first) that spawns worker processes. Worker processes (excluding initialization) run independently without master process supervision (It is possible to kill worker processes during the search with no hurt to the search). Master process prepares all the structures necessary to split the node and continues the search. Worker processes simply use existing "split nodes" to start their search and report the results. Master process shall kill worker processes upon exit (if everything goes well :) )

·         Hash tables are shared by all processes in the search group.

·         Internal synchronization mechanism is used to access and protect vital shared data (e.g. split node structure, flags) - no operating system overhead.

·         Split occurs in 3-9 ply range.

·         Unique character string is used to identify different instances of parallel Butcher engines (it is possible to start two parallel Butcher engines on the same machine - each of these shall use unique string to identify its group members).

·         Supports up to 30 CPUs. Never tested with more than 8 though ;).



How do I use more than one CPU with Butcher?


There is a new "-par" command line switch which should be used to make Butcher use more than one CPU (If you don't want to use more than one CPU just use your old launch command line).


     butcher.exe  -ht  ht_size  -par  unique_string  num_of_cpus_x2




     ht_size - size of all hash tables in megabytes. All processes will share hash tables


     unique_string - unique character string to identify processes search group you are about to start. It does not need to be unnecessarily long


     num_of_cpus_x2 - number of worker processes multiplied by two. If num_of_cpus_x2&1 equals 1 each worker process will pop up a statistics window. Otherwise, the worker processes will run silently in the background.


Example 1:


     butcher.exe  -ht  1024  -par  match_2cpu_verbose  3


Two CPUs are used. Master process and one worker process which will display status and statistics window.


Example 2:


     butcher.exe  -ht  2048  -egtb 256 -par  game_4cpu_quiet  6


Four CPUs are used. Master process and three worker processes running silently in the background.




III. Links







Marek Kołacz

markol4 [at] wp [dot] pl