Author: Bas Hamstra
Date: 05:29:00 07/26/02
Go up one level in this thread
On July 25, 2002 at 23:13:24, Robert Hyatt wrote:
>On July 25, 2002 at 20:45:48, Bas Hamstra wrote:
>
>>On July 25, 2002 at 16:58:58, Robert Hyatt wrote:
>>
>>>On July 25, 2002 at 14:06:39, Bas Hamstra wrote:
>>>
>>>>>>>IID is not a huge thing. It mainly helps where you fail high but can't get
>>>>>>>a real score so that the next iteration, you end up with no hash moves for
>>>>>>>the PV search... IID will supply good moves.
>>>>>>
>>>>>>All you get is a reasonable move from a D-2 search. Why not store the original
>>>>>>hashmove in stead?
>>>>>
>>>>>Where would you get it from? I use the fact that there is no hash move
>>>>>for a PV node to trigger the IID search...
>>>>
>>>>>>So when you normally store a UPPER score, in stead of saving
>>>>>>no move at all, you save the original hashmove? I don't see why IID would
>>>>>>provide a better move than that...
>>>>>
>>>>>Because at the _next_ ply in the tree, you have no move because it is a
>>>>>fail low position...
>>>>
>>>>I don't understand. In case of a fail-low position I store the *original*
>>>>hashmove which was a bestmove. So, I never am without hashmove.
>>>
>>>
>>>You _must_ be without one at times. How can you store the "original"
>>>best move is there is no hash entry there at all?
>>>
>>>I'll bet that if you count the number of times you call hash probe, and
>>>the number of times you don't get a "hit", the difference will be extremely
>>>high. And in _each_ of those misses, you don't get any kind of hash move
>>>at all. Which is where IID helps.
>>
>>I have done that. As far as I know it only happens in the last 1-2 plies. Maybe
>>it will worsen somewhat if the hashtable is full.
>>
>>Bas.
>
>
>I think we are somehow talking about different things. IE what happens when
>you change your mind at the root? (fail high). That means that at ply=2,
>for that move, you have no best move. It might be that this move at ply 1
>has _never_ been interesting so that it has never been stored into the
>table. Now it has failed high, which means either the move at ply-2 is
>stale (because you saved it as you mentioned, and it might be a bad move since
>the score is suddenly jumping up) or there is no hash position at all because
>it was overwritten.
>
>I notice the biggest gain in those tactical positions where I fail high at ply
>N, but can't get a good score (the re-search fails low). At the next iteration
>I have _nothing_ to use for ordering and IID saves the bacon there...
>
>Not common. But important when it happens by a large factor.
I ran a quick test and simply printed Depth [%2d] whenever
. remaining searchdepth > 2
. beta != alpha+1
. nullmove < beta
. no hashmove found
I see some, but not many. Here is output for the start position:
Tao 5.02
Hash 16 Mb
PawnHash 8 Mb
Hashing 1048576 positions
PHash 131072 records
No TableBases found in c:\yin5021\TB\Test
Book Tao.bk (72179 pos)
Ok[book]
Book[No]
Ok[analyze]
TargetTime set[8590]
1. 39 110 23 d2d4
2 0 110 49 d2d4 d7d5
2. 0 110 124 d2d4 d7d5
3 26 110 206 d2d4 d7d5 e2e3
3. 26 110 405 d2d4 d7d5 e2e3
4 0 110 690 d2d4 d7d5 g1f3 g8f6
4 0 110 926 e2e4!!
4 4 110 1552 e2e4 e7e5 d2d4 e5d4 d1d4
4. 4 170 2182 e2e4 e7e5 d2d4 e5d4 d1d4
5 29 170 4634 e2e4 e7e5 f1c4 f8c5 g1f3
5. 29 170 6304 e2e4 e7e5 f1c4 f8c5 g1f3
6 0 220 10436 e2e4 e7e5 f1c4 f8c5 d2d3 d7d6
6. 0 280 21041 e2e4 e7e5 f1c4 f8c5 d2d3 d7d6
[ 4][ 4] 7 31 500 54422 e2e4 e7e5 g1f3 d7d6 d2d4 e5d4 f3d4
7. 31 610 73112 e2e4 e7e5 g1f3 d7d6 d2d4 e5d4 f3d4
8 12 1100 135510 e2e4 e7e5 g1f3 d7d6 b1c3 b8c6 d2d4 e5d4 f3d4
c6d4 d1d4
8. 12 1380 189834 e2e4 e7e5 g1f3 d7d6 b1c3 b8c6 d2d4 e5d4 f3d4
c6d4 d1d4
9 29 2360 430927 e2e4 e7e5 g1f3 g8f6 b1c3 b8c6 f1c4 f8b4 d2d3
9. 29 2800 532131 e2e4 e7e5 g1f3 g8f6 b1c3 b8c6 f1c4 f8b4 d2d3
10 10 4670 1018119 e2e4 e7e5 g1f3 g8f6 b1c3 f8b4 f3e5 d7d6 e5c4
b4c3 d2c3 f6e4
10. 10 6650 1524899 e2e4 e7e5 g1f3 g8f6 b1c3 f8b4 f3e5 d7d6 e5c4
b4c3 d2c3 f6e4
11 26 14010 3397759 e2e4 e7e5 g1f3 g8f6 b1c3 b8c6 f1b5 c6d4 e1g1
d4f3 d1f3 f8c5
11. 26 16480 3732278 e2e4 e7e5 g1f3 g8f6 b1c3 b8c6 f1b5 c6d4 e1g1
d4f3 d1f3 f8c5
12 4 33510 7810372 e2e4 e7e5 g1f3 g8f6 f3e5 d7d6 e5c4 f6e4 d2d3
e4c5 d3d4 c5e4
And here some output for a tactical position with a couple of FH's at the root:
Tao 5.02
Hash 16 Mb
PawnHash 8 Mb
Hashing 1048576 positions
PHash 131072 records
No TableBases found in c:\yin5021\TB\Test
Book Tao.bk (72179 pos)
Ok[Load matje.epd]
Ok[analyze]
TargetTime set[8590]
1. 104 110 208 c6c5
2 49 110 318 c6c5 d5d6 g4e6
2 49 110 359 c6d5!!
2 93 110 484 c6d5 b3d5 h6e6
2. 93 110 827 c6d5 b3d5 h6e6
3 63 110 1360 c6d5 b3d5 h6e6 d5g5 e6g6 g5d5 g4e6
3. 63 160 4229 c6d5 b3d5 h6e6 d5g5 e6g6 g5d5 g4e6
4 50 160 5729 c6d5 b3d5 h6e6 d5g5 e6g6 g5e7
4 50 220 7940 f8f7!!
4 60 220 10034 f8f7 b3b8 g8g7 b8e8 c6d5 e8e5 h6f6 e3d5
4. 60 220 15514 f8f7 b3b8 g8g7 b8e8 c6d5 e8e5 h6f6 e3d5
5 35 270 22578 f8f7 b3b8 g8g7 d5c6 h6c6 b8e8
5 35 330 27973 c6d5!!
5 39 330 32426 c6d5 b3d5 f8f7 d5g5 h6g6 g5d8 g8g7 h2g1
5 39 380 40009 c6c5!!
5 56 380 45744 c6c5 b3c3 f8b8 a2a4 h6d6 c3c5 b8b2 e3g4 f3g4
5. 56 440 56363 c6c5 b3c3 f8b8 a2a4 h6d6 c3c5 b8b2 e3g4 f3g4
6 47 550 70720 c6c5 b3c3 f8b8 b2b3 b8b5 a2a3
6 47 710 106022 f8f7!!
[ 6] 6 59 1100 168147 f8f7 d5c6 h6c6 a1d1 c6f6 d1d8 g8g7
6. 59 1210 208136 f8f7 d5c6 h6c6 a1d1 c6f6 d1d8 g8g7
7 58 1540 319676 f8f7 a1d1 h6d6 b3b8 g8g7 b8e8 c6d5 d1d5
7. 58 2410 596013 f8f7 a1d1 h6d6 b3b8 g8g7 b8e8 c6d5 d1d5
[ 3][ 4][ 5][ 6][ 5] 8 46 3130 823407 f8f7 d5c6 h6c6 a1d1 h7h6
h2g1 g8h7 d1d8
8. 46 6040 1804143 f8f7 d5c6 h6c6 a1d1 h7h6 h2g1 g8h7 d1d8
[ 7] 9 36 6810 2060145 f8f7 d5c6 h6c6 a1d1 h7h6 d1d8 g8g7 h2g1 c6d6
b3c3 d6f6
9 36 7690 2332286 c6c5!!
[ 4][ 6][ 6][ 6][ 6][ 4][ 6][ 4] 9 48 11920 3709540 c6c5 a1c1 h6b6
b3a3 g4d7 c1c2 d7b5 f1a1 b5d3
9 48 13130 4118284 f3g2!!
[ 9][11][12][13][13] 9 894 13290 4188552 f3g2 e3g2 h3g2 h2g2 g4f3
b3f3 e4f3 g2g1 f8f5 a1e1 f5h5 e1e8 g8f7 e8e7
f7e7 f1e1 e7f7 e1e7 f7e7
9. 894 13670 4343713 f3g2 e3g2 h3g2 h2g2 g4f3 b3f3 e4f3 g2g1 f8f5
a1e1 f5h5 e1e8 g8f7 e8e7 f7e7 f1e1 e7f7 e1e7
f7e7
10 894 14060 4510185 f3g2 e3g2 h3g2 h2g2 g4f3 b3f3 e4f3 g2g1 f8f5
a1e1 f5h5 e1e8 g8f7 e8e7 f7e7 f1e1 e7f7 e1e7
f7e7
10. 894 14720 4783338 f3g2 e3g2 h3g2 h2g2 g4f3 b3f3 e4f3 g2g1 f8f5
a1e1 f5h5 e1e8 g8f7 e8e7 f7e7 f1e1 e7f7 e1e7
f7e7
11 29979 15710 5236405 f3g2 e3g2 h3g2 h2g2 g4f3 b3f3 e4f3 g2g1 f8f5
a1e1 f5h5 e1e8 g8f7 e8e7 f7e7 f1e1 e7d8 e1e8
d8e8 d5c6 h5h1
11. 29979 15710 5236405 f3g2 e3g2 h3g2 h2g2 g4f3 b3f3 e4f3 g2g1 f8f5
a1e1 f5h5 e1e8 g8f7 e8e7 f7e7 f1e1 e7d8 e1e8
d8e8 d5c6 h5h1
So it happens, but not often. But I guess you are right that IID could improve
on not having a good move in these cases. But for some reason IID seems to
instabilize my search and I have seen cases where it misses the right move for
several plies, while found correctly without IID. Maybe my IID implementation
sucked.
Best regards,
Bas.
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.