Fix force mode after setboard
[bonanza.git] / readme.txt
index 7aaf0fb..631a415 100644 (file)
@@ -1,6 +1,6 @@
 ----------------------------------------------------------------------
-              Bonanza Feliz 0.0 - Executable Source Code
-                                            Kunihito Hoki, 1 Apr 2010
+                        Bonanza 6.0 - Client Source Code
+                                            Kunihito Hoki, May 2011
 ----------------------------------------------------------------------
 
 
@@ -52,6 +52,49 @@ Within these limits, you can use, redistribute, and/or modify it.
 3. Change Logs
 ---------------
 
+Version 6.0
+
+Search() function is modified to ignore moves which receive negative
+values from Static Exchange Evaluation (SEE) at frontier and
+pre-frontier nodes. Self-play experiments showed that this modification
+makes Bonanza slightly stronger. Similar results were also observed in
+experiments using a shogi program YSS,
+http://www32.ocn.ne.jp/~yss/horizon.txt. Moreover, the branch cut by
+means of SEE at frontier nodes can also be found in a chess program,
+Stockfish.
+
+Now Bonanza does Late Move Reduction (LMR) at root nodes, and recursive
+iterative deepening more often. Self-play experiments showed that these
+modifications make Bonanza slightly stronger.
+
+DFPN searcher is added to the set of Bonanza source codes (dfpn.c,
+dfpn.h, and dfpnhash.c). You can use the searcher by using 'dfpn'
+command with a compile option -DDFPN turned on. To make use of the DFPN
+searcher in ordinary search, use 'dfpn_client' command with a compile
+option -DDFPN_CLIENT turned on. To provide a proper service to the DFPN
+client, you also need to use a server script 'src/server/dfpn_server.pl'
+with one or more DFPN worker(s) connected with 'dfpn connect' command.
+I am thankful to Dr. A. Nagai for his kind and fruitful advice.
+
+Now Bonanza can be a client of parallel searches using cluster computing
+environment with mnj command. 'src/server/parallel_server.pl' is a
+server script of root-node parallelizations, and the server can be a
+client of majority voting cluster computation.
+
+Some techniques which increase computational efficiency of Bonanza are
+reported by E. Ito, http://aleag.cocolog-nifty.com/. In his website,
+two ideas are shown, i.e., (i) speed up of the computation of the static
+evaluation function, and (2) use of SSE instructions of Intel processors
+for bitboard operations. By adopting his ideas to Bonanza, NPS value
+nearly doubled. This is amazing. To use SSE instructions, specify -DSSE2
+or -DSSE4 compiler option. I am thankful to Mr. E. Ito for his kind and
+fruitful advice.
+
+-DINANIWA_SHIFT compilation flag is supplied to enable an Inaniwa-strategy detection
+
+There are many other modifications and bug fixes.
+
+
 Feliz 0.0
 
 - Some results from Y. Sato's experiments with Bonanza inspired me
@@ -181,6 +224,8 @@ Here is a list of files you can find in this directory.
 C headers
 - param.h     piece values
 - shogi.h     main header
+- bitop.h     bit operations
+- dfpn.h      header of DFPN codes
 
 basic C functions
 - main.c      main function of C program
@@ -188,15 +233,14 @@ basic C functions
 - ini.c       initializations
 - rand.c      pseudo random number generator
 - time.c      time functions
-- bitop.c     bit operation
+- bitop.c     bit operations
 - utility.c   misc. functions
 
 I/O
-- proce.c     input procedure 
+- proce.c     input procedures
 - csa.c       csa file format I/O
 - io.c        basic I/O
-- dek.c       dekunobou
-- sckt.c      TCP/IP client of CSA SHOGI protocol
+- sckt.c      Socket communications
 
 bitboard manipulations
 - attack.c    piece attacks
@@ -221,6 +265,7 @@ brute-force search
 - evaldiff.c  easy and fast evaluation function
 - swap.c      static exchange evaluation
 - hash.c      transposition table
+- phash.c     perfect hash function of moves
 - thread.c    thread-level parallelization
 - root.c      root move genelation and shallow min-max search
 - mate3.c     3-ply mate detection
@@ -229,6 +274,10 @@ brute-force search
 - problem.c   auto problem solver
 - valid.c     examine move validity
 
+DFPN search
+- dfpn.c      DFPN search
+- dfpnhash.c  Hashing for DFPN search
+
 optimal control of min-max search
 - learn1.c    main functions
 - learn2.c    feture vector manipuration
@@ -289,6 +338,19 @@ Makefile.vs. The macros are:
 
 - NO_LOGGING        suppresses dumping log files
 
+- HAVE_SSE2         use SSE2 instructions for speed
+
+- HAVE_SSE4         use SSE2 and SSE4.1 instructions for speed
+
+- MNJ_LAN           enables a client-mode of cluster searches
+
+- INANIWA_SHIFT     enables an Inaniwa strategy detection
+
+- DFPN              build the DFPN worker of mate-problems server
+
+- DFPN_CLIENT       enables the client-mode of mate-problem server
+
+
 Bonanza is an application that does not provide graphical user
 interface. If you could build "bonanza.exe" properly without CSASHOGI
 macro, it shows a prompt "Black 1>" when you execute it at a computer
@@ -304,6 +366,13 @@ directory to dump log files.
 5. Command List
 ---------------
 
+- analyze
+    Starts to ponder on the current position, until a command is
+    received. After a 'move', 'undo' command pondering will continue
+    in the new position, while 'excdude', 'include' and 'mpv' will
+    continue analysis of the same position in the new mode. To get out
+    of this mode without side effects, you can use the 'exit' command.
+
 - beep on
 - beep off
     These commands enable (on) or disable (off) a beep when Bonanza
@@ -349,8 +418,33 @@ directory to dump log files.
     This command becomes effective when CSA_LAN macro is defined in
     the Makefile.
 
-- dekunobou 'addr' 'port-dekunobou' 'port-bonanza'
-    This command connects Bonanza to Dekunobou.
+- dfpn go
+    Bonanza does DFPN search at a current position.
+
+- dfpn hash 'num'
+    This command is used to initialize the transposition table of
+    DFPN search and set the size of the table to 2^'num'. This
+    command becomes effective when DFPN macro is defined in the
+    Makefile.
+
+- dfpn connect 'hostname' 'port#' 'ID'
+    This command is used to connect to the server script
+    dfpn_server.pl as a worker. This command becomes effective when
+    DFPN macro is defined in the Makefile.
+
+- dfpn_client 'hostname' 'port#'
+    This command is used to connect to the server script
+    dfpn_server.pl as a client. With this, a root and its child
+    posittions are examined by the DFPN worker(s). This command
+    becomes effective when DFPN_CLIENT macro is defined in the
+    Makefile.
+
+- exclude ['str']
+- include ['str']
+    The move 'str' will be excluded from search in the current
+    position, or included again. The list of excluded move will
+    be cleared as soon as we alter the position by the move, undo,
+    or new command.
 
 - display ['num']
     This command prints the shogi board. If you want to flip the
@@ -418,16 +512,19 @@ directory to dump log files.
     longer than the time limited by the previous command if it wishes
     to. The default is "strict".
 
-- mnj 'sd' 'seed' 'addr' 'port' 'id'
-    This command connects Bonanza to the council server in
-    src/cluster/. The first two integers specify the standard
+- mnj 'sd' 'seed' 'addr' 'port' 'id' 'factor' 'stable_depth'
+    This command connects Bonanza to the majority or parallel server in
+    src/server/. The first two integers specify the standard
     deviation and initial seed of pseudo-random numbers which are
     added to the static evaluation function. Experiments suggested
-    that an appropriate value for the standard deviation is 50. Note
-    that all clients should use different seeds. The last three
+    that an appropriate value for the standard deviation is 15. Note
+    that all clients should use different seeds. The following three
     arguments are network address, port number, user ID,
-    respectively. This command becomes effective when MNJ_LAN macro is
-    defined in the Makefile.
+    respectively. You can specify factor as a voting weight. Also
+    stable_depth is useful to detect opening positions. Here, when
+    Bonanza reaches the specified depth, then this is reported to the
+    server to reduce thinking time. This command becomes effective
+    when MNJ_LAN macro is defined in the Makefile.
 
 - move ['str']
     Bonanza makes a move of 'str'. If the argument is omitted, Bonanza
@@ -539,6 +636,9 @@ directory to dump log files.
     when TLP macro is defined in the Makefile. 'num' is the number of
     threads. The default value is 1.
 
+- undo
+    This command causes the latest move to be taken back.
+
 - #
     A line beginning with # causes all characters on that line
     to be ignored.
@@ -560,3 +660,4 @@ directory to dump log files.
       OU - King             (Osho)
 
     Here, words in parentheses are romanization of Japanese words.
+