ChessUSA.com TalkChess.com
Hosted by Your Move Chess & Games
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Stockfish 1.8 tweaks
Post new topic    TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions Flat
View previous topic :: View next topic  
Author Message
Vratko Polák



Joined: 05 Nov 2009
Posts: 54

PostPost subject: Stockfish 1.8 tweaks    Posted: Fri Jul 09, 2010 1:14 am Reply to topic Reply with quote

I will publish all my patches here in this thread.

First, I like makefile to compile fast and not to ask about architecture:
Code:
diff -dur src-ja/Makefile src/Makefile
--- src-ja/Makefile     2010-06-30 03:19:38.000000000 +0200
+++ src/Makefile        2010-07-06 13:19:13.000000000 +0200
@@ -299,7 +299,7 @@
 ### ==========================================================================
 
 default:
-       $(MAKE) ARCH=$(ARCH) COMP=$(COMP) build
+       $(MAKE) ARCH=x86-32 COMP=gcc build
 
 help:
        @echo ""
@@ -408,7 +408,7 @@
        -strip $(BINDIR)/$(EXE)
 
 clean:
-       $(RM) $(EXE) *.o .depend *~ core bench.txt
+       $(RM) $(EXE) *.o .depend *~ core bench.txt *.gcda
 
 testrun:
        @$(PGOBENCH)

Second, I want ucinewgame to clear hash table, and this time also to clear pawn evaluation tables (not sure if I have done it correctly):
Code:
diff -dur src/search.cpp src-Ch/search.cpp
--- src/search.cpp      2010-07-06 13:17:26.000000000 +0200
+++ src-Ch/search.cpp   2010-07-06 14:39:37.000000000 +0200
@@ -455,7 +455,7 @@
 
   // Read UCI option values
   TT.set_size(get_option_value_int("Hash"));
-  if (button_was_pressed("Clear Hash"))
+  if (button_was_pressed("Clear Hash") || button_was_pressed("New Game"))
       TT.clear();
 
   CheckExtension[1]         = Depth(get_option_value_int("Check Extension (PV nodes)"));
@@ -484,7 +484,7 @@
 
   // Set the number of active threads
   int newActiveThreads = get_option_value_int("Threads");
-  if (newActiveThreads != TM.active_threads())
+  if (newActiveThreads != TM.active_threads() || button_was_pressed("New Game"))
   {
       TM.set_active_threads(newActiveThreads);
       init_eval(TM.active_threads());

Third, I started to prepare HDE patch. It has many new features, but it is still not polished enough to actually increase elo.

But in the meantime, Tinapa 1.01 was released, so I cloned it back to Stockfish:
Code:
diff -dur src-Ch/search.cpp src-TiCh/search.cpp
--- src-Ch/search.cpp   2010-07-06 14:39:37.000000000 +0200
+++ src-TiCh/search.cpp 2010-07-08 11:50:00.000000000 +0200
@@ -1185,7 +1185,7 @@
         ss->currentMove = MOVE_NULL;
 
         // Null move dynamic reduction based on depth
-        int R = 3 + (depth >= 5 * OnePly ? depth / 8 : 0);
+        int R = 3 + (depth >= 9 ? (depth - 3) / 6 : 0); // inspired by Tinapa 1.01
 
         // Null move dynamic reduction based on value
         if (refinedValue - beta > PawnValueMidgame)
and I saw it still uses 5*OnePly constant reduction for zugzwang verification of null search. I was patching that in 1.7.1 already, but this time I used testposition first, and I have come to conclusion that the best reduction for verification is exactly R:
Code:
diff -dur src-TiCh/search.cpp src-TiAvCh/search.cpp
--- src-TiCh/search.cpp 2010-07-08 11:50:00.000000000 +0200
+++ src-TiAvCh/search.cpp       2010-07-08 11:48:37.000000000 +0200
@@ -1206,11 +1206,11 @@
                 nullValue = beta;
 
             // Do zugzwang verification search at high depths
-            if (depth < 6 * OnePly)
+            if (depth-R*OnePly < OnePly)
                 return nullValue;
 
             ss->skipNullMove = true;
-            Value v = search<NonPV>(pos, ss, alpha, beta, depth-5*OnePly, ply);
+            Value v = search<NonPV>(pos, ss, alpha, beta, depth-R*OnePly, ply);
             ss->skipNullMove = false;
 
             if (v >= beta)


And here is my first positive test: Tinapa with constant verification (first 3 patches together) lost to Tinapa with adaptive verification (all 4 patches) by +189 =597 -214 (++21 +=59 +-31 =+42 ==185 =-75 -+15 -=51 --21) that makes bayeselo to say LOS=19:80.

By the way, are there any known testpositions where accuracy (or speed, or both) of verification search is important?
_________________
Testing conditions:
tc=/0:40+.1 option.Threads=1 option.Hash=32 option.Ponder=false -pgnin gaviota-starters.pgn -concurrency 1 -repeat -games 1000
hash clear between games
make build ARCH=x86-64 COMP=gcc
around 680kps on 1 thread at startposition.
Back to top
View user's profile Send private message
Display posts from previous:   
Subject Author Date/Time
Stockfish 1.8 tweaks Vratko Polák Fri Jul 09, 2010 1:14 am
      Re: Stockfish 1.8 tweaks Richard Vida Fri Jul 09, 2010 10:30 am
            Re: Stockfish 1.8 tweaks Eelco de Groot Fri Jul 09, 2010 11:46 am
                  Not a problem for GnuChess! Michel Van den Bergh Fri Jul 09, 2010 11:50 am
            Re: Stockfish 1.8 tweaks Vratko Polák Sat Jul 10, 2010 5:41 am
                  Re: Stockfish 1.8 tweaks Marco Costalba Sat Jul 10, 2010 8:31 am
                  Re: Stockfish 1.8 tweaks Marco Costalba Sun Jul 11, 2010 7:19 am
                        Re: Stockfish 1.8 tweaks Vratko Polák Sun Jul 11, 2010 1:05 pm
                              Re: Stockfish 1.8 tweaks Marco Costalba Sun Jul 11, 2010 1:17 pm
                                    Re: Stockfish 1.8 tweaks Adam Kleng Sun Jul 11, 2010 1:29 pm
                                    Re: Stockfish 1.8 tweaks Robert Houdart Sun Jul 11, 2010 1:31 pm
                                    Re: Stockfish 1.8 tweaks Vratko Polák Sun Jul 11, 2010 2:21 pm
                                          Re: Stockfish 1.8 tweaks Adam Kleng Mon Jul 12, 2010 7:20 pm
                                                Re: Stockfish 1.8 tweaks Vratko Polák Mon Jul 19, 2010 9:31 pm
                  Re: Stockfish 1.8 tweaks Vratko Polák Mon Jul 19, 2010 9:00 pm
                        Re: Stockfish 1.8 tweaks Marco Costalba Tue Jul 20, 2010 6:13 am
            Re: Stockfish 1.8 tweaks Uri Blass Sat Jul 10, 2010 10:47 am
                  Re: Stockfish 1.8 tweaks Marco Costalba Sat Jul 10, 2010 11:06 am
            Re: Stockfish 1.8 tweaks Vratko Polák Thu Jul 29, 2010 8:14 pm
                  Re: Stockfish 1.8 tweaks Vratko Polák Fri Jul 30, 2010 6:33 pm
                        Re: Stockfish 1.8 tweaks Marco Costalba Sat Jul 31, 2010 6:49 am
                              Re: Stockfish 1.8 tweaks Marco Costalba Sat Jul 31, 2010 7:49 pm
                                    Re: Stockfish 1.8 tweaks Robert Hyatt Sat Jul 31, 2010 8:45 pm
                                          Re: Stockfish 1.8 tweaks Marco Costalba Sat Jul 31, 2010 10:50 pm
                                          Re: Stockfish 1.8 tweaks Vratko Polák Sun Aug 01, 2010 12:46 am
                                                Re: Stockfish 1.8 tweaks Robert Hyatt Sun Aug 01, 2010 6:19 am
                                                Re: Stockfish 1.8 tweaks Daniel Shawul Sun Aug 01, 2010 9:56 am
                                                      Re: Stockfish 1.8 tweaks Edsel Apostol Sun Aug 01, 2010 10:14 am
                                                            Re: Stockfish 1.8 tweaks Daniel Shawul Sun Aug 01, 2010 10:30 am
                                                                  Re: Stockfish 1.8 tweaks Edsel Apostol Sun Aug 01, 2010 11:47 am
                                                                        Re: Stockfish 1.8 tweaks Daniel Shawul Sun Aug 01, 2010 12:02 pm
                                                      Re: Stockfish 1.8 tweaks Vratko Polák Sun Aug 01, 2010 9:04 pm
                                                            Re: Stockfish 1.8 tweaks Vratko Polák Tue Aug 03, 2010 7:21 pm
                                                                  Re: Stockfish 1.8 tweaks Daniel Shawul Tue Aug 03, 2010 7:36 pm
                                                                  Re: Stockfish 1.8 tweaks Marco Costalba Tue Aug 03, 2010 11:22 pm
                                                                        Re: Stockfish 1.8 tweaks Vratko Polák Wed Aug 04, 2010 6:38 pm
                                    Re: Stockfish 1.8 tweaks Vratko Polák Sat Jul 31, 2010 10:03 pm
                                          Re: Stockfish 1.8 tweaks Marco Costalba Sat Jul 31, 2010 11:04 pm
                                                Re: Stockfish 1.8 tweaks Joona Kiiski Sun Aug 01, 2010 6:46 am
                                          Re: Stockfish 1.8 tweaks Vratko Polák Sun Aug 01, 2010 9:15 pm
                                                Re: Stockfish 1.8 tweaks Vratko Polák Mon Aug 02, 2010 8:14 pm
                                                      Re: Stockfish 1.8 tweaks Vratko Polák Mon Aug 09, 2010 8:53 pm
                                                            Re: Stockfish 1.8 tweaks Vratko Polák Thu Aug 12, 2010 7:26 pm
                        Re: Stockfish 1.8 tweaks Vratko Polák Sat Jul 31, 2010 7:19 pm
      Re: Stockfish 1.8 tweaks Marco Costalba Fri Jul 09, 2010 12:06 pm
            Re: Stockfish 1.8 tweaks Luis Smith Fri Jul 09, 2010 10:56 pm
      Re: Stockfish 1.8 tweaks Marco Costalba Sat Jul 10, 2010 3:48 pm
      Re: Stockfish 1.8 tweaks Vratko Polák Wed Jul 21, 2010 7:48 pm
            Re: Stockfish 1.8 tweaks Marco Costalba Thu Jul 22, 2010 2:29 am
                  Re: Stockfish 1.8 tweaks Vratko Polák Thu Jul 29, 2010 8:27 pm
                  Re: Stockfish 1.8 tweaks Miguel A. Ballicora Thu Jul 29, 2010 8:44 pm
                        Re: Stockfish 1.8 tweaks Robert Hyatt Fri Jul 30, 2010 4:49 pm
            Re: Stockfish 1.8 tweaks Vratko Polák Tue Aug 24, 2010 7:03 pm
      Re: Stockfish 1.8 tweaks Vratko Polák Wed Aug 11, 2010 9:22 pm
Post new topic    TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Powered by phpBB © 2001, 2005 phpBB Group
Enhanced with Moby Threads