Article View: gnu.chess
Article #5180Re: PL69 slower ?
From: Chua Kong Sian
Date: Sat, 09 Apr 1994 04:52
Date: Sat, 09 Apr 1994 04:52
302 lines
9834 bytes
9834 bytes
Dr Michael J. White (mwhite@osiris.cso.uiuc.edu) wrote:
: I think that pl69 has lost some speed. It gives about the same number
: of nodes per second evaluation, but it seems much much MUCH slower.
: It evaluates about twice as many nodes per ply at shallow searches and
: about ten times as many nodes at depths 5 and 6 ply.
: I post a position below that takes 1.5 hour with pl69 versus 5 min. with pl68
: to fixed depth of 6 ply.
: Any ideas whats going on?
: The two PL's are compiled with different options:
: PL69:
: OPT= -DUSEINT -DCACHE -DGDX -DHASGETTIMEOFDAY -DDEEPNULL -DQUIETBACKGROUND -DSEMIQUIETBOOKGEN -DWAY4PL64 -DHISTORY -DHASHSTATS -DAGING
: PL68:
: OPT= -DUSEINT -DCACHE -DGDX -DHASGETTIMEOFDAY -DKILLT -DDEEPNULL
: and I fixed the pawn evaluation buglet posted by Kong Sian in PL69 but
: not PL68. I am sure there are many other minor differences, but nothing
: I suspect as causing this.
: Can HISTORY slow down the search this much. If so, out it goes!!!
There is one important difference between pl68 and pl69. The HISTORY
heuristics have been decoupled from the KILLT heuristics. This means that
you can specify both -DHISTORY and -DKILLT together in pl69 whereas in
earlier versions, you have to specify either one or the other. Both of
these heuristics deal with improving move ordering, so to get the best
result, specify both in the Makefile for pl69!
: I also noticed bizarre behavior from pl69 when it encountered a mate position.
: It began evaluating a 5 ply mate at 9994 (or so). It chose to analyze another
: mating move at 9991, then 9988, then 9985, then 9982, etc., counting down
: by some constant offset. Weird! So out comes this position with a 42 ply
: mating move. Wow! Not! If I can gather the stats on this one I will post it
: later.
I might have an idea about this. NOT tested, but if you ever come across
a position where this happens, change the following line in search.c.
if (flag.hash /*&& ply <= Sdepth*/ && *rpt == 0 && best == alpha)
to
if (flag.hash && SAVEHT && *rpt == 0 && best == alpha)
recompile and try again. This *could* be the problem. Please post your
findings here.
: Meanwhile here's a sample to show poor timing from PL69:
: post book force
: e2e4 b7b6 d2d4 c8b7 f1d3 e7e6 g1f3 c7c5 c2c3 g8f6 d1e2 f8e7 e1g1 b8c6 e4e5
: f6d5 d4c5 b6c5 b1a3 e8g8 a3c4 d8c7 f1d1 f7f5
: depth 6 bd beep go quit
: R - - - - R K -
: P B Q P B - P P
: - - N - P - - -
: - - P N p P - -
: - - n - - - - -
: - - p b - n - -
: p p - - q p p p
: r - b r - - k -
: PL68 :
: -------------------------------------------------
: Move# 13 Target= 0 Clock: 719805
: 2. 47 5 1094 e5f6 f8f6
: 3& 41 11 13277 e5f6 d5f6 h2h3 a8b8
: 3. 41 12 15316 e5f6 d5f6 h2h3 a8b8
: 4& 45 21 37397 e5f6 d5f6 h2h3 a8b8 c1g5
: 4. 45 26 49778 e5f6 d5f6 h2h3 a8b8 c1g5
: 5& 52 55 124185 e5f6 d5f6 h2h3 a8b8 c1g5 f6d5
: 5. 52 61 136590 e5f6 d5f6 h2h3 a8b8 c1g5 f6d5
: 6& 45 120 279609 e5f6 d5f6 h2h3 a8b8 c1g5 f6d5 g5e7 c6e7
: 6. 45 176 420217 e5f6 d5f6 h2h3 a8b8 c1g5 f6d5 g5e7 c6e7
: 1. ... e5f6
: Gen 1645322 Node 420217 Tree 495 Eval 41721 Rate 2387 EC 28047/10920 RS hi 0 lo 0
: Hin/Hout/Tcol/Coll/Fin/Fout = 1791/820/0/0/0/0
: My move is: e5f6
: <<<<<<ALL THIS TOOK ABOUT 3 MINUTES, 420k NODES>>>>>>>>
: PL 69:
: -------------------------------------------------------
: Your move is?
: Move# 13 Target= 0 Clock: 719697
: 2. 42 1 2349 e5f6 e7f6
: 3& 36 4 10405 e5f6 d5f6 h2h3 a8b8
: 3. 36 5 13150 e5f6 d5f6 h2h3 a8b8
: 4& 40 24 68984 e5f6 d5f6 h2h3 a8b8 c1g5
: 4. 40 33 92511 e5f6 d5f6 h2h3 a8b8 c1g5
: <<<after a few minutes I lost patience and hit ^C>>>
: 5. 40 209 661512 e5f6 d5f6 h2h3 a8b8 c1g5
: 1. ... e5f6
: Gen 2478550 Node 661512 Tree 962 Eval 44247 Rate 3165 EC 32519/9718 RS hi 0 lo 0
: Hin/Hout/Tcol/Coll/Fin/Fout = 125289/13345/0/0/0/0
: My move is: e5f6
: Your move is?
: <<<<<<<<<ABOUT 5 MINUTES SO FAR, 661k NODES, NOT YET 5 ply>>>>>>>>
: This thing runs for another 1.5 hour at least if I let it go.
Here is the results of pl69 with the following OPT= line.
OPT= -DUSEINT -DCACHE -DGDX -DHASGETTIMEOFDAY -DDEEPNULL -DQUIETBACKGROUND
-DSEMIQUIETBOOKGEN -DWAY4PL64 -DHISTORY -DKILLT -DHASHSTATS -DAGING
Enter [moves] minutes[:sec] [increment][+]:
White 1:00 Black 1:00
R N B Q K B N R
P P P P P P P P
- - - - - - - -
- - - - - - - -
- - - - - - - -
- - - - - - - -
p p p p p p p p
r n b q k b n r
Book used 31805 of 40000 entries.
transposition table is 150001
Playing without hashfile
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is? depth=
Your move is?
White 11:59 Black 12:00
R - - - - R K -
P B Q P B - P P
- - N - P - - -
- - P N p P - -
- - n - - - - -
- - p b - n - -
p p - - q p p p
r - b r - - k -
Your move is?
Your move is?
Move# 13 Target= 77870 Clock: 77970
2. 42 0 1250 e5f6 f8f6
3& 36 1 9669 e5f6 d5f6 h2h3 a8b8
3. 36 1 12509 e5f6 d5f6 h2h3 a8b8
4& 40 3 33676 e5f6 d5f6 h2h3 a8b8 c1g5
4. 40 4 44542 e5f6 d5f6 h2h3 a8b8 c1g5
5& 47 9 147048 e5f6 d5f6 h2h3 a8b8 c1g5 f6d5
5. 47 12 163085 e5f6 d5f6 h2h3 a8b8 c1g5 f6d5
6& 43 88 1023075 e5f6 d5f6 c1g5 a8b8 g5h4 f6h5 h4e7 c6e7
6. 43 185 1903267 e5f6 d5f6 c1g5 a8b8 g5h4 f6h5 h4e7 c6e7
1. ... e5f6
Gen 5969274 Node 1903267 Tree 927 Eval 130101 Rate 10287 EC 97338/29740 RS hi 0 lo 0
Hin/Hout/Tcol/Coll/Fin/Fout = 375180/20057/0/0/0/0
My move is: e5f6
There is an improvement in the number of nodes searched from the original
posts' results.
However, I have been experimenting with a slightly different implementation
of the history heuristics. In search.c, make the following changes.
Change
if (history[j] < HISTORYLIM)
history[j] += (unsigned short) 1 << depth;
to
if (history[j] < ((unsigned short) 1 << depth))
history[j] = ((unsigned short) 1 << depth);
Here are the results when running pl69 with this change.
Enter [moves] minutes[:sec] [increment][+]:
White 1:00 Black 1:00
R N B Q K B N R
P P P P P P P P
- - - - - - - -
- - - - - - - -
- - - - - - - -
- - - - - - - -
p p p p p p p p
r n b q k b n r
Book used 31805 of 40000 entries.
transposition table is 150001
Playing without hashfile
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is?
Your move is? depth=
Your move is?
White 11:59 Black 11:59
R - - - - R K -
P B Q P B - P P
- - N - P - - -
- - P N p P - -
- - n - - - - -
- - p b - n - -
p p - - q p p p
r - b r - - k -
Your move is?
Your move is?
Move# 13 Target= 77861 Clock: 77961
2. 42 0 1250 e5f6 f8f6
3& 36 2 13445 e5f6 d5f6 h2h3 a8b8
3. 36 3 16272 e5f6 d5f6 h2h3 a8b8
4& 40 6 38407 e5f6 d5f6 h2h3 a8b8 c1g5
4. 40 8 51465 e5f6 d5f6 h2h3 a8b8 c1g5
5& 47 23 142216 e5f6 d5f6 h2h3 a8b8 c1g5 f6d5
5. 47 26 155392 e5f6 d5f6 h2h3 a8b8 c1g5 f6d5
6& 40 54 465257 e5f6 d5f6 c1g5 a8b8 g5h4 f6h5 h4e7 c6e7
6. 40 61 587616 e5f6 d5f6 c1g5 a8b8 g5h4 f6h5 h4e7 c6e7
1. ... e5f6
Gen 3259958 Node 587616 Tree 950 Eval 50240 Rate 9633 EC 35303/11916 RS hi 0 lo 0
Hin/Hout/Tcol/Coll/Fin/Fout = 112343/12015/0/0/0/0
My move is: e5f6
This gives a great reduction in the number of nodes searched to reach 6
plies. However note that this is not true in all cases. After many
tests, I have found that there are positions where the original code is
faster. These positions are in the minority (maybe 1/4 of the time).
My conclusion is that in most positions, the new code gives very good
results, especially at high plies. Hopefully, this could make it way
into pl70.
Regards.
Kong Sian
PS. I'll be away on a trip to the States for a couple of weeks and
hence might not be able to answer any e-mail or queries (unless I am
able to find a host to logon back home)
Technical Details
Message-ID:
<2o5ca5$nio@nuscc.nus.sg>Path:
arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!raffles.technet.sg!nuscc.nus.sg!nsrccksReferences:
<2o3len$397@vixen.cso.uiuc.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d71d,eeb17e158c8984ff X-Google-Attributes: gid10d71d,public X-Google-ArrivalTime: 1994-04-08 21:52:21 PST Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!raffles.technet.sg!nuscc.nus.sg!nsrccks From: nsrccks@leonis.nus.sg (Chua Kong Sian) Newsgroups: gnu.chess Subject: Re: PL69 slower ? Date: 9 Apr 1994 04:52:21 GMT Organization: National University of Singapore Lines: 302 Message-ID: <2o5ca5$nio@nuscc.nus.sg> References: <2o3len$397@vixen.cso.uiuc.edu> NNTP-Posting-Host: leonis.nus.sg X-Newsreader: TIN [version 1.2 PL0]