Hamsters randomizer in action

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Alessandro Scotti

Hamsters randomizer in action

Post by Alessandro Scotti »

After the comments from Michael and Ron I've managed to spend some time with Hamsters. As a result, my wife won't talk to me. As a side effect though, I think I've found something.

In this position (best move is Kb1):

[D]6k1/3p4/3p4/3P4/4P1p1/6P1/8/K7 w - - 0 1

I get the following PV:

Code: Select all

28/46 0:03.45 0 3582109 Kb2 Kh8 Kc3 Kg7 Kd4 Kf6 Ke3 Kg5 Kd4 Kf6
28/46 0:04.22 190 4472111 Kb1 Kg7 Kc1 Kh7 Kc2 Kg7 Kc3 Kh6 Kd4 Kg6 e5 dxe5+ Kxe5 Kf7 Kf5 Ke7 Kxg4 Kd6 Kf5 Ke7 g4...
29/46 0:04.99 0 5317284 Kb1 Kg7 Kc1 Kh7 Kc2 Kg7 Kc3 Kf7 Kd4 Kf6 Ke3 Kg5 Kd4 Kf6
30/48 0:06.27 240 6471878 Kb1 Kg7 Kc1 Kh7 Kc2 Kg7 Kc3 Kh7 Kd4 Kh6 e5 Kg6 Ke4 dxe5 Kxe5 Kf7 Kf5 Ke7 Kxg4 Kf6 Kf4 d6 g4...
31/48 0:07.91 255 8076986 Kb1 Kg7 Kc1 Kh7 Kc2 Kg6 Kd3 Kf6 Kd4 Kg6 e5 Kf7 exd6 Kf6 Ke4 Kg6 Kf4 Kf7 Kxg4 Kf6 Kh5 Kf7 g4...
Or variations thereof by playing with some parameters:

Code: Select all

28/46 0:02.69 37 2754395 Kb1 Kg7 Kc1 Kh6 Kd2 Kh5 Kc3 Kh6 Kd4 Kg6 e5 Kf7 exd6 Kf6 Ke4 Kg6 Kf4 Kf6 Kxg4...
29/47 0:03.73 125 3680504 Kb1 Kg7 Kc1 Kh6 Kd2 Kh5 Kc3 Kh6 Kd4 Kg6 e5 Kg5 Ke4 Kg6 exd6 Kg5 Ke5 Kg6 Kf4 Kf6 Kxg4...
30/49 0:05.83 170 5676962 Kb1 Kg7 Kc1 Kh6 Kd2 Kh5 Kc3 Kh6 Kd4 Kg6 e5 Kf7 exd6 Kf6 Ke4 Kg6 Kf4 Kf6 Kxg4...
31/49 0:08.61 51 8711860 Kb1 Kg7 Kc1 Kh6 Kd2 Kg6 Kd3 Kh6 Kd4 Kh5 e5 Kg6 Ke4 Kf7 exd6 Kg6 Kf4 Kf6 Kxg4...
32/54 0:12.11 260 12086482 Kb1 Kg7 Kc1 Kh6 Kd2 Kg6 Kd3 Kh6 Kd4 Kg6 e5 Kf5 exd6 Kf6 Ke4 Kg6 Kf4 Kf6 Kxg4...
There are huge score drops in some plies that suggest a serious bug somewhere. I've spent a few hours poking around to no avail, and yet I think this time asking for suggestions on the bug would be too much even for the collective wisdom of the CCC! :-)
So my question is... how do I debug something like this that happens million nodes away from the root?!? :o
Gerd Isenberg
Posts: 2250
Joined: Wed Mar 08, 2006 8:47 pm
Location: Hattingen, Germany

Re: Hamsters randomizer in action

Post by Gerd Isenberg »

Isn't it more a deterministic odd-even effect rather than a randomizer? You have to analyze the end-positions in the pvs, causing the oscillating scores - your eval might be very sensitive by side to move. For instance, you may try to favour same color to move at the leaves in pv-nodes by doing/not doing pv-extensions near the tips.
Alessandro Scotti

Re: Hamsters randomizer in action

Post by Alessandro Scotti »

To be honest, I don't have a clue what's happening. However, I've selectively enabled/disabled/changed most eval and search terms and it seems the problem is always there, although at different ply, score, etc.
In the first example it seems a 3-rep draw is found at ply 29... but then why it wasn't found at ply 28?
Gerd Isenberg
Posts: 2250
Joined: Wed Mar 08, 2006 8:47 pm
Location: Hattingen, Germany

Re: Hamsters randomizer in action

Post by Gerd Isenberg »

The weaker side standing pat at the leaves might be crucial here and probably worth an extra ply if in zugzwang, where only losing king moves or losing pawn moves are possible.
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: Hamsters randomizer in action

Post by Michael Sherwin »

I suspect a hashtable bug. I suggest testing Hamsters while only using the hashtables for move ordering to see if the bug is still there.
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
Pradu
Posts: 287
Joined: Sat Mar 11, 2006 3:19 am
Location: Atlanta, GA

Re: Hamsters randomizer in action

Post by Pradu »

Alessandro Scotti wrote:After the comments from Michael and Ron I've managed to spend some time with Hamsters. As a result, my wife won't talk to me. As a side effect though, I think I've found something.
Hi! Your search/eval is quite good here as Hamsters seems to take way less nodes than Buzz here to reach the same ply:

Code: Select all

1 -139 0 2 e5
1 15 0 4 Kb1
1 15 0 6 Kb1
2 15 0 12 Kb1 Kf7
2 15 0 18 Kb1 Kf7
3 15 1 37 Kb1 Kf7 Ka1
3 15 1 64 Kb1 Kf7 Ka1
4 15 1 144 Kb1 Kf7 Kc1 Kf6
4 15 1 179 Kb1 Kf7 Kc1 Kf6
5 15 1 288 Kb1 Kf7 Kc1 Kf6 Kb1
5 15 1 413 Kb1 Kf7 Kc1 Kf6 Kb1
6 15 1 631 Kb1 Kf7 Kc1 Kf6 Kd1 Kf7
6 18 3 909 Kb2 Kf7 Kc3 Kf6 Kd4 Kf7
6 18 3 909 Kb2 Kf7 Kc3 Kf6 Kd4 Kf7
7 15 3 1660 Kb2 Kf7 Kc3 Kg7 Kd4 Kf7 Kd3
7 15 3 1858 Kb2 Kf7 Kc3 Kg7 Kd4 Kf7 Kd3
8 15 3 2712 Kb2 Kf7 Kc3 Kg7 Kd4 Kf7 Kd3 Kg8 Kc4 Kf7 Kd4 Kf6 Kc4 Kg6 Kd3 Kf6 Kd4
Kf7
8 15 4 3112 Kb2 Kf7 Kc3 Kg7 Kd4 Kf7 Kd3 Kg8 Kc4 Kf7 Kd4 Kf6 Kc4 Kg6 Kd3 Kf6 Kd4
Kf7
9 18 4 4715 Kb2 Kf7 Kc3 Kg7 Kd4 Kf7 Ke3 Kg6 Kf4
9 18 4 5175 Kb2 Kf7 Kc3 Kg7 Kd4 Kf7 Ke3 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g6 Kf4 Kf7 g4 Kg8 g5 Kf8 Kg4 Ke8 Kf
5 Kf7 g6+ Kg7 Kg5 Kg8 Kf6 Kh8 g7+ Kh7 Kf7 Kh6 g8=Q Kh5
35 249 27853 141990586 Kb1 Kg7 Kc1 Kg6 Kd1 Kg5 Kc2 Kh5 Kc3 Kh6 Kd4 Kg6 e5 Kf5 ex
d6 Kf6 Ke4 Kg5 Ke5 Kg6 Kf4 Kf7 Kxg4 Kg6 Kf4 Kg7 g4 Kg8 Kg5 Kf7 Kh6 Ke8 Kh5 Kf7 g
5 Kf8 g6 Kg7 Kg5 Kf8 Kh6 Kg8 g7 Kf7 Kh7 Kf6 g8=Q Ke5 Qg2
35 249 37871 196654059 Kb1 Kg7 Kc1 Kg6 Kd1 Kg5 Kc2 Kh5 Kc3 Kh6 Kd4 Kg6 e5 Kf5 ex
d6 Kf6 Ke4 Kg5 Ke5 Kg6 Kf4 Kf7 Kxg4 Kg6 Kf4 Kg7 g4 Kg8 Kg5 Kf7 Kh6 Ke8 Kh5 Kf7 g
5 Kf8
36 856 40260 209519491 Kb1 Kg7 Kc1 Kg6 Kd1 Kg5 Kc2 Kh5 Kc3 Kh6 Kd4 Kg6 e5 Kf5 ex
d6 Kf6 Ke4 Kg5 Ke5 Kg6 Kf4 Kf6 Kxg4 Ke5 Kh5 Kxd6 g4 Kxd5 g5 Ke6 g6 d5 Kh6 d4 g7
Kf7 Kh7 d3 g8=Q+ Ke7
Do you use a depth based replacement scheme for the hash table? If so try replace always if hashkey==entry->hashKey and see if that fixes the problem.
Tony

Re: Hamsters randomizer in action

Post by Tony »

Alessandro Scotti wrote:After the comments from Michael and Ron I've managed to spend some time with Hamsters. As a result, my wife won't talk to me. As a side effect though, I think I've found something.

In this position (best move is Kb1):

[D]6k1/3p4/3p4/3P4/4P1p1/6P1/8/K7 w - - 0 1

I get the following PV:
....
There are huge score drops in some plies that suggest a serious bug somewhere. I've spent a few hours poking around to no avail, and yet I think this time asking for suggestions on the bug would be too much even for the collective wisdom of the CCC! :-)
So my question is... how do I debug something like this that happens million nodes away from the root?!? :o
My guess,

if you have some kingInsideTheSquareOfThePawn code, check it
else add it.

A no presence of this code can give this kind of beheavior.

Tony
Pradu
Posts: 287
Joined: Sat Mar 11, 2006 3:19 am
Location: Atlanta, GA

Re: Hamsters randomizer in action

Post by Pradu »

Tony wrote:if you have some kingInsideTheSquareOfThePawn code...
A no presence of this code can give this kind of beheavior.
Tony
Actually it doesn't. Buzz doesn't have this kind of code but scores seem stable. Buzz's eval is very simple here too, pretty much basic pawn eval (doubled, isolated...) + passers. There's no king proximity to the pawn or any bonus for the king being closer to the center squares. Only a difference in pawn structure can change the score here for Buzz...although might be another reason for Buzz's sluglishness to get good ply in this position.
Tony

Re: Hamsters randomizer in action

Post by Tony »

Pradu wrote:
Tony wrote:if you have some kingInsideTheSquareOfThePawn code...
A no presence of this code can give this kind of beheavior.
Tony
Actually it doesn't. Buzz doesn't have this kind of code but scores seem stable. Buzz's eval is very simple here too, pretty much basic pawn eval (doubled, isolated...) + passers. There's no king proximity to the pawn or any bonus for the king being closer to the center squares. Only a difference in pawn structure can change the score here for Buzz...although might be another reason for Buzz's sluglishness to get good ply in this position.
Well.., yes.

Not having this code means that search will find out that the pawn promotes, meaning most of the time it becomes very inefficient.

Having it implemented wrong (fe an off by 1 wrt stm) would give more of a "I'm winning", "No I'm not" beheavior every other iteration, while the former can hide it with horizon moves (and will) and give less score jumps.

Tony
Gerd Isenberg
Posts: 2250
Joined: Wed Mar 08, 2006 8:47 pm
Location: Hattingen, Germany

Re: Hamsters randomizer in action

Post by Gerd Isenberg »

Tony wrote: Well.., yes.

Not having this code means that search will find out that the pawn promotes, meaning most of the time it becomes very inefficient.

Having it implemented wrong (fe an off by 1 wrt stm) would give more of a "I'm winning", "No I'm not" beheavior every other iteration, while the former can hide it with horizon moves (and will) and give less score jumps.

Tony
I have this zugzwang in mind:

[D] 8/3p4/3p4/3P3k/4PKp1/6P1/8/8 b - -

If your eval recognizes this as drawish, your search will almost try to reach this position as a leaf with black to move. It interacts with path-dependencies from hash. Avoidrep-pruning becomes quite efficient.

Beside possible passer and square of king issues, co-ordinating squares might be even more important in this kind of endings.

Alessandro may have some bugs in eval or search (hashing) - therefor it is important to get the wrong evaluated positions from the primary variations.

Gerd