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 

First steps with SMP
Post new topic    TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions Flat
View previous topic :: View next topic  
Author Message
Robert Purves



Joined: 15 Feb 2010
Posts: 155
Location: New Zealand

PostPost subject: First steps with SMP    Posted: Wed Nov 30, 2011 3:02 am Reply to topic Reply with quote

I have just implemented the first step of multi-threading my engine. It can search on the main thread and a parallel one simultaneously, each returning the same score and PV without crashing. Node count at any depth is exactly doubled by the extra thread. (All this is of course with the shared TT off).

Now I want to implement some form of YBW. Knowing little of the theory, I head for CPW and quickly find some fascinating pseudocode for the Jamboree algorithm:
http://chessprogramming.wikispaces.com/Jamboree

I understand the pseudocode in part, but am puzzled by the return values in two places (these are inside the parallel section):
Code:
      s = -jamboree(c[i], -α - 1, -α);
      if (s >= β) abort_and_return b;
...
          s = -jamboree(c[i], -β, -α);
          if (s >= β) abort_and_return b;

I expected to see s returned, the same as in single-threaded search.
Is there a subtle issue with multithreading that makes b the correct return value, or is there a bug in the pseudocode?

Robert P.
Back to top
View user's profile Send private message
Display posts from previous:   
Subject Author Date/Time
First steps with SMP Robert Purves Wed Nov 30, 2011 3:02 am
      Re: First steps with SMP Kevin Hearn Wed Nov 30, 2011 3:48 am
            Re: First steps with SMP Robert Purves Wed Nov 30, 2011 5:45 am
                  Re: First steps with SMP Kevin Hearn Wed Nov 30, 2011 6:24 am
                        Re: First steps with SMP Robert Purves Wed Nov 30, 2011 12:28 pm
                              Re: First steps with SMP Gerd Isenberg Wed Nov 30, 2011 12:46 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