Sending Crafty batch input

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

Robert Pope
Posts: 572
Joined: Sat Mar 25, 2006 8:27 pm
Location: USA
Full name: Robert Pope

Sending Crafty batch input

Post by Robert Pope »

I wanted to see what Crafty's output was on a number of positions, so I tried queuing up the commands I wanted it to run and pasted it into the command line, e.g.

xboard
post
easy
st 5
force
setboard 8/2k5/7K/8/8/8/2R5/8 b - -
go
force
setboard 8/8/4R3/8/8/6k1/8/7K b - -
go
force
setboard 8/8/8/8/4K3/8/1R6/5k2 w - -
go
etc....

But it only gave output for the first position and then stopped. Can you do something like this for Crafty? Running it through epd2wb would maybe be an alternative, but if I want to test a fixed depth, e.g. sd 3, even testing at 1 second per position would be much slower by comparison.
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: Sending Crafty batch input

Post by MikeB »

Robert Pope wrote:I wanted to see what Crafty's output was on a number of positions, so I tried queuing up the commands I wanted it to run and pasted it into the command line, e.g.

xboard
post
easy
st 5
force
setboard 8/2k5/7K/8/8/8/2R5/8 b - -
go
force
setboard 8/8/4R3/8/8/6k1/8/7K b - -
go
force
setboard 8/8/8/8/4K3/8/1R6/5k2 w - -
go
etc....

But it only gave output for the first position and then stopped. Can you do something like this for Crafty? Running it through epd2wb would maybe be an alternative, but if I want to test a fixed depth, e.g. sd 3, even testing at 1 second per position would be much slower by comparison.
it's built in - set your tc and threads for example st 60 for a 60 second run per position, mt= # of cores you want to test - use real cores only

test file.epd 4 - the 4 is an option to condsider the position correct after 4 plies with correct answer

example:

Code: Select all

White(1): st 10
search time set to 10.00.
White(1): mt 8
max threads set to 8.
White(1): hash 512M
hash table memory = 512M bytes (32M entries).
White(1): test wac300.epd 4


======================================================================
! WAC.001                                                            !
======================================================================
solution 1. Qg6  
        time surplus   0.00  time limit 10.00 (10.00)
        depth     time       score   variation (1)
starting thread 1 2 3 4 5 6 7 <done>
          5->   0.00/10.00   Mat02   1. Qg6 fxg6 2. Nxg6#          
        time=0.00(100%)  nodes=6785(6.8K)  fh1=83%  pred=0  nps=678.5K
        chk=132  qchk=423  fp=386  mcp=121  50move=1
        LMReductions:  1/45
        null-move (R):  3/237
        splits=1(0)  aborts=0  joins=7  data=1%(15%)
----------------------> solution correct (1/1).
8/7p/5k2/5p2/p1p2P2/Pr1pPK2/1P1R3P/8 b - - bm Rxb2; id "WAC.002";

...

...
======================================================================
! WAC.299                                                            !
======================================================================
solution 1. Nca4  
        time surplus   0.00  time limit 10.00 (10.00)
        depth     time       score   variation (1)
starting thread 1 2 3 4 5 6 7 <done>
          4->   0.01/10.00    6.27   1. Nca4 Nd7 2. Rxd7+ Kb8 3. Rxg7 (s=2)
        time=0.01(100%)  nodes=3691(3.7K)  fh1=94%  pred=0  nps=369.1K
        chk=153  qchk=630  fp=645  mcp=65  50move=1
        LMReductions:  1/2
        null-move (R):  3/96
----------------------> solution correct (297/299).
b2b1r1k/3R1ppp/4qP2/4p1PQ/4P3/5B2/4N1K1/8 w - - bm g6; id "WAC.300";

======================================================================
! WAC.300                                                            !
======================================================================
solution 1. g6  
        time surplus   0.00  time limit 10.00 (10.00)
        depth     time       score   variation (1)
starting thread 1 2 3 4 5 6 7 <done>
          5->   0.01/10.00    0.06   1. g6 h6 2. fxg7+ Kxg7 3. Rxf7+ Rxf7
                                     4. gxf7 Qxf7 5. Qxe5+ (s=2)
        time=0.01(23%)  nodes=17914(17.9K)  fh1=92%  pred=0  nps=1.8M
        chk=447  qchk=708  fp=6.0K  mcp=831  50move=1
        LMReductions:  1/81  2/27
        null-move (R):  3/483
        splits=1(0)  aborts=0  joins=7  data=1%(23%)
----------------------> solution correct (298/300).
savepos *



test results summary:

total positions searched..........         300
number right......................         298
number wrong......................           2
percentage right..................          99
percentage wrong..................           0
total nodes searched..............  2023791224
average search depth..............         8.6
nodes per second..................    35498881
total time........................       57.01
White(1): 
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Sending Crafty batch input

Post by bob »

Another answer is to put the keyword "batch" as the first command in the file. This disables asynchronous I/O so it will simply execute one command at a time and do exactly what you want.

The "test command" is a better way, however.

I am not sure what those "force" commands are for, however, and I would remove them as they are pointless in the example you gave.
Robert Pope
Posts: 572
Joined: Sat Mar 25, 2006 8:27 pm
Location: USA
Full name: Robert Pope

Re: Sending Crafty batch input

Post by Robert Pope »

Thanks, I'll try the batch command. It doesn't look like test outputs scores, which is primarily what I am interested in.