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 Move Help
Goto page 1, 2, 3  Next
 
Post new topic       TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions Threaded
View previous topic :: View next topic  
Author Message
Steve Mulligan



Joined: 20 Jul 2011
Posts: 114
Location: Ottawa, Canada

PostPosted: Sun Feb 05, 2012 10:09 pm    Post subject: Null Move Help Reply to topic Reply with quote

I'm trying to implement null move pruning and I'm not sure how to test it. I want to determine if my simple implementation is actually working, or if it's pruning too much.

eg, null move off I get f4f5 d6f6 f2g1 (score is 56)

and with null move on the best moves are e4e5 d6d5 f2g1 (score is 48)

Is it normal to see entirely different lines with scores that are worse? Or should null move on return the same score and best moves more often than not?
Back to top
View user's profile Send private message Visit poster's website
Sven Schüle



Joined: 15 May 2008
Posts: 2240
Location: Berlin, Germany

PostPosted: Sun Feb 05, 2012 10:36 pm    Post subject: Re: Null Move Help Reply to topic Reply with quote

stevemulligan wrote:
I'm trying to implement null move pruning and I'm not sure how to test it. I want to determine if my simple implementation is actually working, or if it's pruning too much.

eg, null move off I get f4f5 d6f6 f2g1 (score is 56)

and with null move on the best moves are e4e5 d6d5 f2g1 (score is 48)

Is it normal to see entirely different lines with scores that are worse? Or should null move on return the same score and best moves more often than not?

Depends on your testing conditions. When using time control, correctly doing nullmove will let your engine search deeper, and so it will eventually choose a different best move. So you might want to test with fixed depth and compare whether nullmove keeps your final PV intact, which should be the goal since the main idea of nullmove pruning is to reduce the tree size. In this case, not matching PVs can be caused by
a) a bug,
b) a zugzwang situation that you don't handle, or
c) some hash table effect.

If you use nullmove also for other purposes, e.g. to detect threats, then it could have a regular impact on the PV.

Sven
Back to top
View user's profile Send private message Visit poster's website
Robert Purves



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

PostPosted: Sun Feb 05, 2012 10:38 pm    Post subject: Re: Null Move Help Reply to topic Reply with quote

NMP, like most modifications to an engine, changes the search tree and so it is entirely normal to get a different score and PV.

NMP should give you a big improvement in time-to-depth (or nodes at given depth). In my engine NMP reduces those metrics to a half at low depths and a quarter in deep searches.

In self-play NMP should be worth roughly 100 Elo, easily confirmed in a fast match with only a few hundred games.

Robert P.
Back to top
View user's profile Send private message
Steve Mulligan



Joined: 20 Jul 2011
Posts: 114
Location: Ottawa, Canada

PostPosted: Sat Feb 11, 2012 9:19 am    Post subject: Re: Null Move Help Reply to topic Reply with quote

I setup cutechess-cli for the first time. What are good time control settings for self-play testing? I read somewhere I need like 1000 rounds to get an accurate ELO, is that true for self play as well?

This is what I'm using now (40 moves in 60 seconds):

cutechess-cli -engine conf=Pwned1 -engine conf=Pwned2 -each tc=40/60 -rounds 1000 -pgnout selfplay.pgn

engines.json
Code:

[
    {
    "name": "Pwned1",
   "command": "pwned_console.exe",
   "protocol": "xboard",
   "workingDirectory": "C:\\Source\\pwned\\pwned_console\\bin\\Debug",
   "initStrings": ["nullmove"]
    },
   {
    "name": "Pwned2",
   "command": "pwned_console.exe",
   "protocol": "xboard",
   "workingDirectory": "C:\\Source\\pwned\\pwned_console\\bin\\Debug",
   "initStrings": []
    }
]


(nullmove is the engine command to enable null move pruning/ordering)
Back to top
View user's profile Send private message Visit poster's website
Lucas Braesch



Joined: 31 May 2010
Posts: 1730

PostPosted: Sat Feb 11, 2012 11:23 am    Post subject: Re: Null Move Help Reply to topic Reply with quote

stevemulligan wrote:
I setup cutechess-cli for the first time. What are good time control settings for self-play testing? I read somewhere I need like 1000 rounds to get an accurate ELO, is that true for self play as well?

Depends what you're testing and how fast your engine is. I use 6"+0.1", which is very fast, although I wouldn't recommend it for an engine that isn't fast and mature enough
Back to top
View user's profile Send private message
Steve Mulligan



Joined: 20 Jul 2011
Posts: 114
Location: Ottawa, Canada

PostPosted: Sat Feb 11, 2012 8:06 pm    Post subject: Re: Null Move Help Reply to topic Reply with quote

Sorry I'm not that familiar with terms yet. What does 6"+0.1" look like in xboard syntax?
Back to top
View user's profile Send private message Visit poster's website
Tony Mokonen



Joined: 12 Mar 2006
Posts: 545
Location: Vancouver

PostPosted: Sun Feb 12, 2012 1:01 am    Post subject: Re: Null Move Help Reply to topic Reply with quote

6 second base, with a tenth of a second (100 millisecond) increment.

level 0 0:6 0.1

is what Arena gives me if I set a 6 second base, and 100 millisecond increment.
Back to top
View user's profile Send private message Send e-mail
Lucas Braesch



Joined: 31 May 2010
Posts: 1730

PostPosted: Sun Feb 12, 2012 1:14 am    Post subject: Re: Null Move Help Reply to topic Reply with quote

tmokonen wrote:
6 second base, with a tenth of a second (100 millisecond) increment.

level 0 0:6 0.1

is what Arena gives me if I set a 6 second base, and 100 millisecond increment.

using a GUI like Arena for such testing is a very bad idea. You can be sure there will be a ton of time losses that are 100% attributable to Arena, because it's way to slow to handle such time controls. Besides, you're not taking advantage of multiple cpus. I have a duo core and my program is single threaded so with cutechess-cli I run 2 games in parralel. For fast and parralel testing, cutechess-cli is beats the crap out of any GUI (precisely because it is not a *G*UI), and it also works easily with shell or python scripting. A great example is the combinaison of cutechess-cli and CLOP
Back to top
View user's profile Send private message
Patrik Karlsson



Joined: 18 Jan 2009
Posts: 33
Location: Sweden

PostPosted: Sun Feb 12, 2012 9:06 am    Post subject: Re: Null Move Help Reply to topic Reply with quote

lucasart wrote:
tmokonen wrote:
6 second base, with a tenth of a second (100 millisecond) increment.

level 0 0:6 0.1

is what Arena gives me if I set a 6 second base, and 100 millisecond increment.

using a GUI like Arena for such testing is a very bad idea. You can be sure there will be a ton of time losses that are 100% attributable to Arena, because it's way to slow to handle such time controls. Besides, you're not taking advantage of multiple cpus. I have a duo core and my program is single threaded so with cutechess-cli I run 2 games in parralel. For fast and parralel testing, cutechess-cli is beats the crap out of any GUI (precisely because it is not a *G*UI), and it also works easily with shell or python scripting. A great example is the combinaison of cutechess-cli and CLOP


Oh dear, I think Tony will explode this time. He didn't make a point of using Arena. He was just explaining what the time settings meant.
Back to top
View user's profile Send private message
Tony Mokonen



Joined: 12 Mar 2006
Posts: 545
Location: Vancouver

PostPosted: Sun Feb 12, 2012 9:59 am    Post subject: Re: Null Move Help Reply to topic Reply with quote

elpapa wrote:

Oh dear, I think Tony will explode this time. He didn't make a point of using Arena. He was just explaining what the time settings meant.


Yeah, what he said.... 'twas a copy and paste from an output log, nothing more. Lucas does have a point with using command line tools, though. Haven't tried CLOP yet for myself, but it looks like an interesting concept. Maybe I could use it to try tune material values for variants.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic       TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions All times are GMT
Goto page 1, 2, 3  Next
Threaded
Page 1 of 3

 
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