Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Nullmove problem

Author: Georg v. Zimmermann

Date: 10:09:41 11/22/01

Go up one level in this thread


On November 22, 2001 at 12:48:55, Michel Langeveld wrote:

>On November 22, 2001 at 07:46:23, Georg v. Zimmermann wrote:
>
>>
>>>>Due to the negamax recursive call, (-beta, -beta+1)
>>>>becomes (beta-1, beta) at the next level, which is
>>>>correct.
>>>>
>>>>(-beta+1, -beta) would become (beta, beta-1). These
>>>>last bounds are false. What is effectively beta there
>>>>(the second value), is smaller than alpha.
>>>>
>>>>I hope that makes sense. I'm not as good an explainer
>>>>as Bruce is.
>>>>
>>>>--
>>>>GCP
>>>
>>>You explained it well :-)
>>>I see indeed that -beta+1, -beta is incorrect.
>>>I have changed this back to -beta, -beta+1 and even -beta, -alfa but I have
>>>still problems. I think this is because my nullmove can end immediatly in my
>>>QSearch. Or is this normal behaviour?
>>
>>That is correct behaviour.
>>
>>Can you tell us a bit more about where your program doesn't see the mate (at
>>which plies) , maybe post search output. And maybe put the nullmove
>>implementation on here ?
>>
>>Here is what sunsetter does (edited):
>>
>>	 /* NullMove : passing should be worse than any other move. */
>>
>>	if ((!wasNullMove) && (NULL_REDUCTION))
>>
>>	  //  no Null moves for black + white after another.
>>	  //  no Null move if its turned off
>>	{
>>
>>		AIBoard.makeNullMove();
>>
>>		NullValue =  -search(-beta, -beta+1, depth - ((NULL_REDUCTION +1) * ONE_PLY),
>>ply + 1, 1);
>>
>>		AIBoard.unmakeNullMove();
>>
>>		stats_NullTries[depth/ONE_PLY]++;
>>
>>
>>
>>		if (NullValue >= beta)
>>                //	fail high even without making a move, this must
>>	        //	be a very good position
>>		{
>>
>>
>>
>>			stats_NullCuts[depth/ONE_PLY]++;
>>			AIBoard.store(depth, bestMove, NullValue, orgAlpha, orgBeta);
>>
>>			return NullValue;
>>
>>		}	// End of successful NullMove try
>>
>>
>>	}	// End of NullMove try
>
>This code is helpfull. How do you make sure you don't use this in check?

Yeah I read that was your problem. I split into checking / non checking much
earlier. Posting your code might get you the reason faster next time.

Here is what I do:

1. Opp in Check ? Return Infinity

2. Hash hit ? Adjust bounds or return exact

3. Do normal extensions, like recaps.

4. In Check ? -> 4.a.

4.a.1. Check extensions

4.a.2. Try Hash move

4.a.3. Create Check Evasions

4.a.4. Try the Moves

4.b.1 Try Futility Pruning // We are not in check

4.b.2 Try Null Move // <======== Code snipet

4.b.3 Try Hash Move

4.b.4 Create Moves // 4 Step PMG simplified

4.b.5 Try Moves

5. See if we got mated and do things related to that

6. Return




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.