If I let my engine play a move, then take it back and calculate again, then take it back and let it calculate again, I get quiet different search statistics and a different move to play sometimes. Even though the move it plays IS sensible each time.
I do zero the Transposition table and history tables before each search.
Is this normal behavior ?
Shouldn't it be deterministic and repeat ?
Does it demonstrate a bug in my program ?
Nodes: 4574306
QNodes: 2983332 65%
NPS: 76238
Beta Cuts: 2469452
Eval Hits: 344962
TT Hits: 66091
QSearch Depth: 28
Fixed Time: 60
Time Used: 60
1 116 0 C5C4 2cp
2 822 0 C5C4 D3F5 3cp
3 1148 0 C5C4 D3F5 E7E6 -13cp
4 6756 0 C5C4 D3F5 E7E6 F5C2 -13cp
5 30147 0 C5xD4 C3xD4 D8A5 E1F1 F6E4 23cp
6 855018 6 A7A5 E1F1 C5C4 D3C2 D7B8 F1G1 30cp
7 2638016 26 E7E6 D4xC5 D7xC5 D3C2 E6E5 E1G1 D8D6 29cp
8 4574306 60 E7E6 E1G1 C5C4 D3E2 F8D6 B2B3 D8C7 B3xC4 15cp
==================================================================
Nodes: 2880955
QNodes: 2014093 70%
NPS: 47228
Beta Cuts: 1584883
Eval Hits: 194381
TT Hits: 32231
QSearch Depth: 26
Fixed Time: 60
Time Used: 61
1 67 0 C5C4 2cp
2 448 0 C5C4 E1G1 16cp
3 1736 0 C5xD4 C3xD4 F6E4 8cp
4 62371 1 D7B8 D4xC5 A7A6 E1F1 16cp
5 94861 2 C5xD4 C3xD4 D8C7 E1G1 C7xH2 23cp
6 1054543 9 A7A6 E1G1 C5C4 F3E5 C4xD3 B1A3 27cp
7 4169884 39 C5C4 D3C2 D8C7 E1G1 E7E5 F1E1 E5E4 18cp
8 2880955 61 C5xD4 E3xD4 E7E6 E1G1 F8D6 D3C2 E8G8 F6E4 15cp
=================================================================
Nodes: 3880716
QNodes: 2864137 74%
NPS: 64678
Beta Cuts: 2229270
Eval Hits: 260132
TT Hits: 37639
QSearch Depth: 26
Fixed Time: 60
Time Used: 60
1 59 0 C5C4 2cp
2 432 0 C5C4 B1D2 16cp
3 945 0 C5C4 B1D2 E7E6 -9cp
4 38229 1 C5C4 B1D2 B7B5 D3F5 15cp
5 31362 1 C5C4 D3C2 E7E6 C2D3 A8B8 16cp
6 905211 8 D7B6 E1G1 C5C4 F3H4 C4xD3 C1D2 18cp
7 3234659 32 E7E6 E1G1 C5xD4 E3xD4 F8D6 C3C4 E8G8 15cp
8 3880716 60 E7E6 E1G1 F8D6 B1A3 E8G8 D4xC5 D7xC5 F1E1 14cp
=================================================================
None repeating search
Moderators: hgm, Dann Corbit, Harvey Williamson
-
lauriet
- Posts: 199
- Joined: Sun Nov 03, 2013 9:32 am
Re: None repeating search
No. Just plain old fashion single.
-
flok
Re: None repeating search
Try running it from valgrind. Sounds like uninitialized variables.
-
konsolas
- Posts: 182
- Joined: Sun Jun 12, 2016 5:44 pm
- Location: London
- Full name: Vincent
Re: None repeating search
To test deterministically, set your program to terminate at a certain depth or nodes visited instead of time. Also, reset your hash table between tests.
-
bob
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: None repeating search
What about other things like killer moves? counter-moves? Anything that affects move ordering in any way can cause this kind of behavior.lauriet wrote:If I let my engine play a move, then take it back and calculate again, then take it back and let it calculate again, I get quiet different search statistics and a different move to play sometimes. Even though the move it plays IS sensible each time.
I do zero the Transposition table and history tables before each search.
Is this normal behavior ?
Shouldn't it be deterministic and repeat ?
Does it demonstrate a bug in my program ?
Nodes: 4574306
QNodes: 2983332 65%
NPS: 76238
Beta Cuts: 2469452
Eval Hits: 344962
TT Hits: 66091
QSearch Depth: 28
Fixed Time: 60
Time Used: 60
1 116 0 C5C4 2cp
2 822 0 C5C4 D3F5 3cp
3 1148 0 C5C4 D3F5 E7E6 -13cp
4 6756 0 C5C4 D3F5 E7E6 F5C2 -13cp
5 30147 0 C5xD4 C3xD4 D8A5 E1F1 F6E4 23cp
6 855018 6 A7A5 E1F1 C5C4 D3C2 D7B8 F1G1 30cp
7 2638016 26 E7E6 D4xC5 D7xC5 D3C2 E6E5 E1G1 D8D6 29cp
8 4574306 60 E7E6 E1G1 C5C4 D3E2 F8D6 B2B3 D8C7 B3xC4 15cp
==================================================================
Nodes: 2880955
QNodes: 2014093 70%
NPS: 47228
Beta Cuts: 1584883
Eval Hits: 194381
TT Hits: 32231
QSearch Depth: 26
Fixed Time: 60
Time Used: 61
1 67 0 C5C4 2cp
2 448 0 C5C4 E1G1 16cp
3 1736 0 C5xD4 C3xD4 F6E4 8cp
4 62371 1 D7B8 D4xC5 A7A6 E1F1 16cp
5 94861 2 C5xD4 C3xD4 D8C7 E1G1 C7xH2 23cp
6 1054543 9 A7A6 E1G1 C5C4 F3E5 C4xD3 B1A3 27cp
7 4169884 39 C5C4 D3C2 D8C7 E1G1 E7E5 F1E1 E5E4 18cp
8 2880955 61 C5xD4 E3xD4 E7E6 E1G1 F8D6 D3C2 E8G8 F6E4 15cp
=================================================================
Nodes: 3880716
QNodes: 2864137 74%
NPS: 64678
Beta Cuts: 2229270
Eval Hits: 260132
TT Hits: 37639
QSearch Depth: 26
Fixed Time: 60
Time Used: 60
1 59 0 C5C4 2cp
2 432 0 C5C4 B1D2 16cp
3 945 0 C5C4 B1D2 E7E6 -9cp
4 38229 1 C5C4 B1D2 B7B5 D3F5 15cp
5 31362 1 C5C4 D3C2 E7E6 C2D3 A8B8 16cp
6 905211 8 D7B6 E1G1 C5C4 F3H4 C4xD3 C1D2 18cp
7 3234659 32 E7E6 E1G1 C5xD4 E3xD4 F8D6 C3C4 E8G8 15cp
8 3880716 60 E7E6 E1G1 F8D6 B1A3 E8G8 D4xC5 D7xC5 F1E1 14cp
=================================================================
Of course bugs can also do this. IE uninitialized variables (used before initialized), bad subscripts, and such.
Best solution is, since you see differences at depth=2, to dump both trees and see what is different. Then you have to figure out why.
-
syzygy
- Posts: 5554
- Joined: Tue Feb 28, 2012 11:56 pm
Re: None repeating search
Piecelists?lauriet wrote:If I let my engine play a move, then take it back and calculate again, then take it back and let it calculate again, I get quiet different search statistics and a different move to play sometimes. Even though the move it plays IS sensible each time.
I do zero the Transposition table and history tables before each search.
-
lauriet
- Posts: 199
- Joined: Sun Nov 03, 2013 9:32 am
Re: None repeating search
Yippy Fixed !!!
Turns out I needed to zero my evaluation hash table before each search.....I guess there were clashes returning wrong evaluations.
The lesson once again is to, first make sure there are no bugs......then do some debugging.

Turns out I needed to zero my evaluation hash table before each search.....I guess there were clashes returning wrong evaluations.
The lesson once again is to, first make sure there are no bugs......then do some debugging.
-
PK
- Posts: 893
- Joined: Mon Jan 15, 2007 11:23 am
- Location: Warsza
Re: None repeating search
Not fixed. I suspect that either Your evaluation hashtable implementation is somehow wrong, or Your hash keys are bad/too short.
Pawel Koziol
http://www.pkoziol.cal24.pl/rodent/rodent.htm
http://www.pkoziol.cal24.pl/rodent/rodent.htm