Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: funny search results, nullmove

Author: martin fierz

Date: 04:09:30 12/03/03

Go up one level in this thread


On December 03, 2003 at 06:59:20, Tord Romstad wrote:

>On December 02, 2003 at 18:32:08, macaroni wrote:
>
>>this is the analasys from the re-write of my engine from the first position in
>>WAC.
>>[D]2rr3k/pp3pp1/1nnqbN1p/3pN3/2pP4/2P3Q1/PPB4P/R4RK1 w - - 0 1
>>-->"WAC001", best=Qg6
>>stage=middlegame, playing as WHITE, nullmove is ON, Using
>>ply=1, value=-200, nodes=113, kNps=0, best=Ne5xc6
>>ply=2, value=-200, nodes=2546, kNps=11, best=Ne5xc6
>>ply=3, value=-200, nodes=7708, kNps=18, best=Ne5xc6
>>ply=4, value=10000, nodes=129225, kNps=88, best=Qg3-g6
>>ply=5, value=100, nodes=224379, kNps=105, best=Nf6-e8
>>ply=6, value=10000, nodes=658686, kNps=125, best=Qg3-g6
>>ply=6, value=10000, nodes=1012767, kNps=129, best=Qg3-g6
>>
>>it's a very easy mate in 2, and the computer, as expected, finds it at ply 4,
>>but then disregards it at ply 5, for Ne8, which also just about wins. It is
>>nullmoving that has caused this, is there any way I can avoid this sort of
>>problem? it arises, because after playing Qg6, it nullmoves, and calls a 1 ply,
>>or 0 ply search, in both of these searches, black is better by 200 points, it
>>doesn't fail in the ply 4 search because there is nothing better, it DOES fail
>>in the ply 5 search because Ne8 is also good, so beta is 100, not -200.
>
>It must be a bug, I'm afraid.

probably you're right - if it was exactly what the author thinks it is, it
should not find Qg6 on iteration 4, right? because then you go Qg6, remaining
depth 3, nullmove with R=2 => depth 0 => qsearch which doesn't see the mate. at
depth 5 it should have a remaining depth of 1 after Qg6+nullmove and should see
the mate.
doing the same with R=3:
iteration 4, Qg6, nullmove =>QS, no mate.
iteration 5, Qg6, nullmove =>QS, no mate
iteration 6, Qg6, nullmove =>depth 1 => mate score.

both R=2 and R=3 should produce something different than what we see in the
output.
so probably there is a bug in the nullmove search?! macaroni, are you using R=2
or R=3?

cheers
  martin

>
>As others have mentioned, allowing checks at least at the first ply in the
>qsearch (I do it at all levels in the qsearch) helps greatly in positions
>like this.  It is also a good idea to try to detect simple mate threats
>in the evaluation function, and avoid doing a null move (and perhaps make
>an extension) when such a threat is found.
>
>In WAC001, after white's move 1. Qg6, my program notices that the black
>king is on the back rank, that the square directly in front of it is
>attacked by a white queen and knight, and that this square is not defended
>by any black pieces except the king.  The program knows that this means
>that there is almost certainly a mate threat on h7, and therefore avoids
>doing a null move.  The move 1. Qg6 is found already at the first iteration.
>
>Tord



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.