ChessUSA.com TalkChess.com
Hosted by Your Move Chess & Games
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Null returning mate
Post new topic    TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions Flat
View previous topic :: View next topic  
Author Message
kenny stanley



Joined: 08 Mar 2009
Posts: 226
Location: Canada

PostPost subject: Null returning mate    Posted: Thu Dec 09, 2010 5:41 am Reply to topic Reply with quote

Hi, Im having some trouble with having mate scores returned, and the engine resigning or playing a terrible move. Im guessing its because I dont have anything to tell Null move not to return a mate score...

Code:

if (null_score >= beta && depth > 5)
         {   
             
             null_score = -search(beta, alpha, depth - 5, TRUE);
            
            if (null_score >= beta)
                return beta;
            }
            else
            {
         
            if (null_score >= beta)
         
            return beta;
         
         if (null_score < -INF + 10 * maxdepth)
            extensions++;
          }      


Ive seen sections in other programs, but im not sure how to define...

an example from fruit:

Code:

 if (value >= beta) {

            if (value > +ValueEvalInf) value = +ValueEvalInf; // do not return unproven mates
            ASSERT(!value_is_mate(value));


so i need to define +ValueEvalInf, and !value_is_mate. Im guessing +ValueEvalInf should = +INF but im not certain about what value_is_mate should be (INF - 100 ? )

stockfish code looks a bit simpler:
Code:

if (nullValue >= beta)
        {
            // Do not return unproven mate scores
            if (nullValue >= value_mate_in(PLY_MAX))
                nullValue = beta;


but again... im having trouble how to define value_mate_in(PLY_MAX)

The other possible problem is that in move ordering the PV is scored highest at INF... I wonder if I need to drop that lower, hash for example is INF - 10000. Thanks.
_________________
outAtime
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Subject Author Date/Time
Null returning mate kenny stanley Thu Dec 09, 2010 5:41 am
      Re: Null returning mate Michael Hoffmann Thu Dec 09, 2010 9:27 am
            Re: Null returning mate kenny stanley Thu Dec 09, 2010 2:11 pm
                  Re: Null returning mate Robert Hyatt Thu Dec 09, 2010 8:18 pm
                        Re: Null returning mate kenny stanley Thu Dec 09, 2010 8:33 pm
                              Re: Null returning mate Robert Hyatt Thu Dec 09, 2010 8:41 pm
                                    Re: Null returning mate John Merlino Thu Dec 09, 2010 8:53 pm
                                          Re: Null returning mate Robert Hyatt Thu Dec 09, 2010 10:30 pm
      Re: Null returning mate Robert Hyatt Thu Dec 09, 2010 8:14 pm
Post new topic    TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Powered by phpBB © 2001, 2005 phpBB Group
Enhanced with Moby Threads