Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: NullMove

Author: adam ruiz

Date: 12:43:44 10/19/03

Go up one level in this thread


On October 19, 2003 at 06:06:33, José Carlos wrote:

>On October 19, 2003 at 06:03:32, José Carlos wrote:
>
>>On October 19, 2003 at 00:36:33, adam ruiz wrote:
>>
>>>On October 18, 2003 at 20:16:46, Robert Hyatt wrote:
>>>
>>>>On October 18, 2003 at 19:40:11, adam ruiz wrote:
>>>>
>>>>>
>>>>> I was reading about nullmove and i think i understand the idea ( i am not sure
>>>>>how it should be code) and i have a question (for now), it is possible to use
>>>>>the concept in this way?: i play my first move, now my opponent do nothing so
>>>>>it´s my turn again and i play (i play - null - i play) if the position is bad
>>>>>for me then i cut this node (i think it should be: score <= alpha). Is that
>>>>>right?!
>>>>>
>>>>> Thanks
>>>>
>>>>
>>>>Close.  If at ply=2 you play a null move and you fail high (score >= beta)
>>>>then your position is so good there is no need to search a real move since
>>>>that should make the score even better for you than "passing".
>>>
>>> But i am not looking for good positions for me.. ( i think this is the way
>>>normal nullmove works, i pass and then if my oppenent even playing two times in
>>>a row can't hurt me then my position is really good) but the opposite, my
>>>oppenent is the one who pass, he let me play tow times in a row, so if a can't
>>>hurt him, his position is really good.. in that sense i need to see it like: if
>>>score <= alpha ? right?... (not if score >= beta because my oppenent is playing
>>>nullmoves not me)..
>>
>>  You don't make a distinction between you and your opponent inside the tree.
>>You just switch colors and do the same. You want to prune for the side to move
>>because null move means "I can do a move but I don't need to because my position
>>is so good that I'm better even if I pass", thus you prune against beta.
>>  If you use alpha you're saying "my position is very bad" but since it's your
>>turn to move, you can get a better position by making a move, so it's a bad idea
>>to prune.
>>  The important thing you must understand is that, inside the tree, there's no
>>"me" nor "my opponent" but just white and black to move. Try null move for any
>>color, but avoid trying more than one null move in a row (unless you wat to do
>>double null move, but I suggest to ignore this until you get better
>>understanding of null move), don't try null move when in check (that would allow
>>to capture the king).
>>  In pseudocode:
>>
>>  if (previous move was not null move && not in check)
>>  {
>>    MakeNullMove();  // switch sides and update some information
>>    NewDepth = depth - R - 1;  // use R = 2 to start with
>>    Val = -AlphaBeta(-Beta, -Beta+1, NewDepth  ); // Null search against beta
>
>
>     UnMakeNullMove(); // I forgot this, restore side to move and search info
>
>
>>    if (Val >= Beta)
>>      return(Beta);
>>  }
>>
>>  Do that everywhere in the tree.
>>  When you get understanding of that, you can experience other values of R and
>>many more ideas.
>>
>>  José C.

 Thanks José C. I'll do some testing to understand it better.



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.