Null Move Help

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: Null Move Help

Post by lucasart »

tmokonen wrote:
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.
If you use Windows, there's LittleBlitzer. It can play very fast games and in parralel too. The only thing that it doesn't have compared to cutechess-cli is that it's still a GUI, and it's not a fully scriptable command line tool. So you couldn't use it with CLOP for example, but for self testing of playing tournaments at fast time controls, it's certainly a good choice. On a positive side, some people might find it more user friendly than a command line tool.

Anyway, the most important thing is to have the right tool for the job, which ever it is. And the job is to play a lot of games (yes 1000 is generally a good choice although it depends on the elo difference you need to measure, I prefer a more systematic approach with sequential probability ratio test). So with a given CPU time constraint, the most games will be achieved by playing parralel games at fast time controls. When you have to do a trade off between playing lots of games very fast and playing less games slowly (for better quality of the games), it's best to choose the former in (almost?) all situations
tmokonen
Posts: 1284
Joined: Sun Mar 12, 2006 6:46 pm
Location: Kelowna
Full name: Tony Mokonen

Re: Null Move Help

Post by tmokonen »

I do use Windows, and I am OK with command line tools. There is a Windows compile of cutechess-cli, and it sounds like it's the best option for integrating with CLOP, so I think I will go that route. cutechess-cli may not be the friendliest tool, but according to some I'm not the friendliest guy, so it should suit me just fine. :wink:
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: Null Move Help

Post by lucasart »

tmokonen wrote:I do use Windows, and I am OK with command line tools. There is a Windows compile of cutechess-cli, and it sounds like it's the best option for integrating with CLOP, so I think I will go that route. cutechess-cli may not be the friendliest tool, but according to some I'm not the friendliest guy, so it should suit me just fine. :wink:
Good luck with cutechess-cli and CLOP. I'm currently running a piece value optimisation with CLOP
User avatar
hgm
Posts: 27701
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Null Move Help

Post by hgm »

stevemulligan wrote:Sorry I'm not that familiar with terms yet. What does 6"+0.1" look like in xboard syntax?
level 0 0:06 0.1
User avatar
hgm
Posts: 27701
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Null Move Help

Post by hgm »

lucasart wrote: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
Is it really that much faster than WinBoard (or XBoard) when you run the latter with the option-noGUI? I never did any precice timing measurements, but from looking at the code I don't see any places where WinBoard seems to waste any time, so it is hard to believe the bare necessities could be done much faster...
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: Null Move Help

Post by lucasart »

hgm wrote:
lucasart wrote: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
Is it really that much faster than WinBoard (or XBoard) when you run the latter with the option-noGUI? I never did any precice timing measurements, but from looking at the code I don't see any places where WinBoard seems to waste any time, so it is hard to believe the bare necessities could be done much faster...
I don't know, as I don't use winboard. But I'm glad to hear that there's a no GUI option that is fast. The important thing is also to be able to play several games at the same time. If you have a quad, with the same amount of time (assuming a single threaded program) you can play 4 times more games! And that's where cutechess-cli and littleblitzer really shine
User avatar
hgm
Posts: 27701
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Null Move Help

Post by hgm »

Oh, but concurrent play is also a standard feature of the WinBoard built-in tournament manager.

Not that it seems very important: even before WinBoard had a tournament manager, (i.e. still relied on an external one like PSWBTM), I was simply playing two gauntlets in parallel on my dual. Either of two versions of my own engine I wanted to test both, or with the same engine with each half the set of opponents. You could let the games be written to the same PGN file, or concatenate them later.
User avatar
hgm
Posts: 27701
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Null Move Help

Post by hgm »

I did a small test, by making a modified version of Fairy-Max, which prints the millisec timestamp before it sends a move, and after it receives a move, and then let two instances of it play against each other under XBoard (ponder off with -noGUI on a single-core machine, a 1.3GHz Pentium M running Ubuntu 10.04). A trace from the debug file below shows that there typically only elapses 1 msec between the sending of the move and the opponent getting it. (Sometimes I see 2 msec.)

So it should not be much of a problem to do 1-sec games. (Faster could be problematic for WB engines anyway, as WB protocol has only centi-sec resolution.)
XBoard wrote:16094 <second: # sent at 1908811393
16094 <second: move g8f6
Interrupting first
16094 >first : time 5601
16094 >first : otim 5688
book hit = (NULL)
16094 >first : g8f6
16107 <first : # received at 1908811394
16107 <first : 1 5 0 5 c2c4
16107 <first : 1 19 0 5 c2c3
16107 <first : 2 18 0 6 c2c3
16107 <first : 3 18 0 21 c2c3
16107 <first : 4 19 0 27 c2c3
16107 <first : 5 19 0 45 c2c3
16299 <first : 6 -1 20 37403 c2c3 d7d5 c1f4 c8f5 b1d2 b8d7
16584 <first : 6 4 48 99319 e2e3 d7d5 f1d3 c8e6 e1g1 b8d7
16780 <first : 6 5 68 140220 b1c3 d7d5 c1f4 c8f5 f3h4 f5e6
16992 <first : # sent at 1908812291
16992 <first : move b1c3
Interrupting second
16992 >second: time 5688
16992 >second: otim 5511
book hit = (NULL)
16992 >second: b1c3
16999 <second: # received at 1908812292
16999 <second: 1 -78 0 9 g7g5 c1g5
16999 <second: 1 11 0 9 g7g6
16999 <second: 2 10 0 10 g7g6
16999 <second: 3 10 0 12 g7g6
16999 <second: 3 11 0 13 g7g6
16999 <second: 4 10 0 14 g7g6
17043 <second: 5 4 5 4817 g7g6 c1f4 d7d5 a2a4 c8f5
17098 <second: 5 15 10 16027 h7h5 c1f4 g7g6 a2a4 d7d5
17399 <second: 5 16 40 81379 d7d6 c1e3 c8e6 f3g5 e6f5
17617 <second: 6 15 62 126701 d7d6 e2e4 b8d7 c1f4 d8b6 a1b1
18057 <second: 6 27 106 221667 d7d5 h2h3 c8e6 f3g5 e6f5 c1f4
18071 <second: # sent at 1908813370
18071 <second: move d7d5
Interrupting first
18071 >first : time 5511
18071 >first : otim 5580
book hit = (NULL)
18071 >first : d7d5
18079 <first : # received at 1908813371
18079 <first : 1 -182 0 9 c3d5 f6d5
18079 <first : 1 -15 0 11 c3b1
18079 <first : 1 -10 0 13 c3a4
18079 <first : 1 -4 0 15 f3d2
18079 <first : 1 -1 0 17 f3g5
18079 <first : 1 3 0 19 f3e5
18079 <first : 1 6 0 21 a2a4
18079 <first : 2 -9 0 25 a2a4 c8f5
18079 <first : 2 -6 0 158 c1d2 c8f5
18079 <first : 2 -1 0 167 c1e3 c8f5
18079 <first : 2 4 0 167 c1f4
18079 <first : 3 4 0 192 c1f4
18079 <first : 3 6 0 852 h2h4 c8f5 c1f4
18083 <first : 4 -8 1 1507 h2h4 c8f5 c1f4 b8d7
18102 <first : 4 -6 3 3230 c1e3 c8f5 f3h4 f5e6
18106 <first : 4 4 3 3230 c1f4
18139 <first : 5 5 6 8017 c1f4 c8f5 f3h4 f5d7 h4f3
18794 <first : 6 0 72 146106 c1f4 c8f5 d1d2 f6h5 f3h4 h5f4 h4f5
19025 <first : # sent at 1908814324
19025 <first : move c1f4
Interrupting second
19026 >second: time 5580
19026 >second: otim 5416
book hit = (NULL)
19026 >second: c1f4
19035 <second: # received at 1908814325
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: Null Move Help

Post by lucasart »

hgm wrote:I did a small test, by making a modified version of Fairy-Max, which prints the millisec timestamp before it sends a move, and after it receives a move, and then let two instances of it play against each other under XBoard (ponder off with -noGUI on a single-core machine, a 1.3GHz Pentium M running Ubuntu 10.04). A trace from the debug file below shows that there typically only elapses 1 msec between the sending of the move and the opponent getting it. (Sometimes I see 2 msec.)

So it should not be much of a problem to do 1-sec games. (Faster could be problematic for WB engines anyway, as WB protocol has only centi-sec resolution.)
XBoard wrote:16094 <second: # sent at 1908811393
16094 <second: move g8f6
Interrupting first
16094 >first : time 5601
16094 >first : otim 5688
book hit = (NULL)
16094 >first : g8f6
16107 <first : # received at 1908811394
16107 <first : 1 5 0 5 c2c4
16107 <first : 1 19 0 5 c2c3
16107 <first : 2 18 0 6 c2c3
16107 <first : 3 18 0 21 c2c3
16107 <first : 4 19 0 27 c2c3
16107 <first : 5 19 0 45 c2c3
16299 <first : 6 -1 20 37403 c2c3 d7d5 c1f4 c8f5 b1d2 b8d7
16584 <first : 6 4 48 99319 e2e3 d7d5 f1d3 c8e6 e1g1 b8d7
16780 <first : 6 5 68 140220 b1c3 d7d5 c1f4 c8f5 f3h4 f5e6
16992 <first : # sent at 1908812291
16992 <first : move b1c3
Interrupting second
16992 >second: time 5688
16992 >second: otim 5511
book hit = (NULL)
16992 >second: b1c3
16999 <second: # received at 1908812292
16999 <second: 1 -78 0 9 g7g5 c1g5
16999 <second: 1 11 0 9 g7g6
16999 <second: 2 10 0 10 g7g6
16999 <second: 3 10 0 12 g7g6
16999 <second: 3 11 0 13 g7g6
16999 <second: 4 10 0 14 g7g6
17043 <second: 5 4 5 4817 g7g6 c1f4 d7d5 a2a4 c8f5
17098 <second: 5 15 10 16027 h7h5 c1f4 g7g6 a2a4 d7d5
17399 <second: 5 16 40 81379 d7d6 c1e3 c8e6 f3g5 e6f5
17617 <second: 6 15 62 126701 d7d6 e2e4 b8d7 c1f4 d8b6 a1b1
18057 <second: 6 27 106 221667 d7d5 h2h3 c8e6 f3g5 e6f5 c1f4
18071 <second: # sent at 1908813370
18071 <second: move d7d5
Interrupting first
18071 >first : time 5511
18071 >first : otim 5580
book hit = (NULL)
18071 >first : d7d5
18079 <first : # received at 1908813371
18079 <first : 1 -182 0 9 c3d5 f6d5
18079 <first : 1 -15 0 11 c3b1
18079 <first : 1 -10 0 13 c3a4
18079 <first : 1 -4 0 15 f3d2
18079 <first : 1 -1 0 17 f3g5
18079 <first : 1 3 0 19 f3e5
18079 <first : 1 6 0 21 a2a4
18079 <first : 2 -9 0 25 a2a4 c8f5
18079 <first : 2 -6 0 158 c1d2 c8f5
18079 <first : 2 -1 0 167 c1e3 c8f5
18079 <first : 2 4 0 167 c1f4
18079 <first : 3 4 0 192 c1f4
18079 <first : 3 6 0 852 h2h4 c8f5 c1f4
18083 <first : 4 -8 1 1507 h2h4 c8f5 c1f4 b8d7
18102 <first : 4 -6 3 3230 c1e3 c8f5 f3h4 f5e6
18106 <first : 4 4 3 3230 c1f4
18139 <first : 5 5 6 8017 c1f4 c8f5 f3h4 f5d7 h4f3
18794 <first : 6 0 72 146106 c1f4 c8f5 d1d2 f6h5 f3h4 h5f4 h4f5
19025 <first : # sent at 1908814324
19025 <first : move c1f4
Interrupting second
19026 >second: time 5580
19026 >second: otim 5416
book hit = (NULL)
19026 >second: c1f4
19035 <second: # received at 1908814325
Certainly beats the CRAP out of Arena ;)
User avatar
hgm
Posts: 27701
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Null Move Help

Post by hgm »

It would be a good idea to have engines sending such timing info to the GUI for inclusion in the log file, for testing GUIs. A UCI engine could send it as an info string. UCI2WB again passes everyting it receives from the engine to the GUI, so it would appear in the WinBoard debug file as well. Polyglot might write it in its own log (so you have to go through the drudgery of merging logs...) Of course GUIs that support UCI directly will always include the UCI output in their log.

Your engine is UCI, isn't it? Can't you put that in? I have no sources of UCI engines ready for compiling...