Test epd for Linux ?

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

Moderators: hgm, Rebel, chrisw

User avatar
hgm
Posts: 27819
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Test epd for Linux ?

Post by hgm »

The latest patch I pushed should already solve this problem, by automatically copy the engine type when it copies the engine as second one.

But perhaps we should first check it on the more elementary level. What happens when you try a simple engine-engine game between two UCI engines, e.g.

xboard -fcp fruit -fUCI -scp stockfish -sUCI

?
Canoike
Posts: 125
Joined: Tue Jan 17, 2012 8:08 pm

Re: Test epd for Linux ?

Post by Canoike »

Thank you John Dart.
I had to install py and the python chess library.
I tested it and it works fine.

Has it this feature ?

If best move is found
then
go to next position, don't spend all the time.
Canoike
Posts: 125
Joined: Tue Jan 17, 2012 8:08 pm

Re: Test epd for Linux ?

Post by Canoike »

hgm wrote:The latest patch I pushed should already solve this problem, by automatically copy the engine type when it copies the engine as second one.

But perhaps we should first check it on the more elementary level. What happens when you try a simple engine-engine game between two UCI engines, e.g.

xboard -fcp fruit -fUCI -scp stockfish -sUCI

?
./xboard -fcp critter-16a-64bit -fUCI -scp stockfish20160315 -sUCI

And when I try to go to Mode --> 2 machines or Machine match, this is the error message :
xboard: Error writing to first chess program: broken pipe
jdart
Posts: 4367
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: Test epd for Linux ?

Post by jdart »

No, as currently written it spends all the time. That feature could be added but it is a bit risky to end early because you can find the solution and then at a later iteration switch to another move.

--Jon
User avatar
hgm
Posts: 27819
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Test epd for Linux ?

Post by hgm »

You already get an error from the first engine?! :shock:

Are you sure you have Polyglot installed?

The 'broken pipe' indicates that the engine process is no longer alive. Normally, when starting an engine fails, you would get another error message, however. But it could be that XBoard does not recognize the error message your system uses for this (normally: "XXX not found"), and therefore only detects that the program you want to start as engine is not there by the fact that the engine process died (and left the pipe dangling).

What happens when you type

polyglot -noini -ec fruit

from the command line?
Canoike
Posts: 125
Joined: Tue Jan 17, 2012 8:08 pm

Re: Test epd for Linux ?

Post by Canoike »

I compiled polyglot and stockfish.
./polyglot14MaCompil -noini -ec stockfish20160315
PolyGlot 1.4 by Fabien Letouzey
*****************************************
But :
./xboard fd "/home/USER/temp/xboard-aae9525/" -fcp "/home/USER/temp/xboard-aae9525/polyglot14MaCompil"

(The polyglot.ini file is OK)
Error: can't open, no such file or directory.

Though this command line works well with xboard 4.7.3
Canoike
Posts: 125
Joined: Tue Jan 17, 2012 8:08 pm

Re: Test epd for Linux ?

Post by Canoike »

I understand your point of view. Thank you for helping. It works well and this is the most important.
User avatar
hgm
Posts: 27819
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Test epd for Linux ?

Post by hgm »

In the XBoard command as you wrote it here, the '-' is missing on -fd. I don't know if that is just a typo here in the forum.

Why don't you just compliantly install Polyglot in the /usr/games or /usr/bin directory, so that you could just type 'polyglot' to make it work from anywhere? And I am not sure how obsolete the version you are using actually is. It could very well be that it doesn't know the -noini option at all, and thinks it is the name of an ini file. I use Polyglot 2.0.3... You cannot expect the XBoard -fUCI and -sUCI options to work if Polyglot is not where it is supposed to be anyway.

I guess the problem with using by default the same second engine as the first also gives problems when the first engine needs to run in a specific directory, and that directory was not specified for the second engine. So XBoard should copy the directory too.

Just make sure you specify a valid second engine (like -scp fairymax, if you compliantly installed Fairy-Max, or -scp ./fairymax if you have it in the current directory).
Canoike
Posts: 125
Joined: Tue Jan 17, 2012 8:08 pm

Re: Test epd for Linux ?

Post by Canoike »

I have found what was wrong : old version of polyglot. So I went to http://hgm.nubati.net/cgi-bin/gitweb.cgi and compiled it, version 1.4.70b. I also downloaded from this forum version 2.0.3.

The command line is : ./xboard -epd -fd "/home/User/temp/xboard-aae9525/" -fcp "/home/User/temp/xboard-aae9525/polyglot". Polyglot.ini for Stockfish.

In the last GUI, go to
*** "Tournament options", "Pause between match games" set to 1000 msec. "Default number of game match" set to 1500 ( I have 1500 positions). "File with start position" put the name of the EPD. "Position number" set to -1 to go to the next position when the time is over "Time control" "fixed max", set the time for each position. Validate

*** "Common engine settings" : the number of CPU is reset to 1 each time you start the GUI. Do not forget to set it.

*** "Mode : Machine match" and the tests can begin.
You see twice the same engine as first and second engine.

Thank you for your help Herr Muller.
User avatar
hgm
Posts: 27819
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Test epd for Linux ?

Post by hgm »

Canoike wrote:I have found what was wrong : old version of polyglot. So I went to http://hgm.nubati.net/cgi-bin/gitweb.cgi and compiled it, version 1.4.70b. I also downloaded from this forum version 2.0.3.
If you are interested in having the source of 2.0.3: it is in the 'learn' branch of this same on-line repository. The 1.4.70b version works well for this purpose too, however; the only important things that would not work is seeing tablebase hits in the thinking output, and excluding moves from analysis.
The command line is : ./xboard -epd -fd "/home/User/temp/xboard-aae9525/" -fcp "/home/User/temp/xboard-aae9525/polyglot". Polyglot.ini for Stockfish.
OK, in the version I just pushed this could be slightly simplified, because it now copied the directory of the engine as well when the second engine defaults to the first:

./xboard -epd -fd "/home/User/temp/xboard-aae9525/" -fcp "./polyglot"

If Polyglot would have been installed compliantly (by "sudo make install") the -fUCI / -sUCI options would work, and you could use

./xboard -epd -fd "/home/User/temp/xboard-aae9525/" -fcp "./stockfish20160315" -fUCI

You then would not have to prepare a polyglot.ini file, but could set any Stockfish parameters you wanted different from the default through the Engine Settings dialog, and press the 'Polyglot Save' button there to make sure these become permanent.

If Stockfish would also have been compliantly installed you would not have had to specify a directory, and the command

./xboard -epd -fcp stockfish20160315 -fUCI

would suffice. Even if youwanted to use the uninstalled Stockfish in a private directory, you could install it with the Load Engine dialog by browsing to /home/User/temp/xboard-aae9525/stockfish20160315 for the 'Engine comand', and erasing the '.' from the 'Engine directory' text entry, ticking the 'UCI' checkbox and giving it a 'Nickname' like 'mystockfish'. Once you have done that, (and the settings were saved!), you could start the EPD suite by

./xboard -epd -fe mystockfish

and XBoard would remember what directory it had to use, and that the engine was UCI.
In the last GUI, go to
*** "Tournament options", "Pause between match games" set to 1000 msec. "Default number of game match" set to 1500 ( I have 1500 positions). "File with start position" put the name of the EPD. "Position number" set to -1 to go to the next position when the time is over "Time control" "fixed max", set the time for each position. Validate
Note that the match pause and default number of games would have to be set only once, as XBoard remembers those settings. The .epd file, and '-1' for the position number to force auto-increent, would have to be specified every time, though. So when you run the same test suite often (e.g. after changing engine settings) it might bemore convenient to set them from the command line with the -lpf ans -lpi options, and recall the command with the arrow keys.

./xboard -epd -fe mystockfish -lpf STS1.epd -lpi -1 -st 0:10

(The -st 0:10 would take care of the fixed-max time control.)
*** "Common engine settings" : the number of CPU is reset to 1 each time you start the GUI. Do not forget to set it.
This is also something that XBoard should remember, and thus has to be done only one time.
*** "Mode : Machine match" and the tests can begin.
You see twice the same engine as first and second engine.
Indeed, the second engine would still be started, although it would never be set to think. This is a consequence of the hasty implementation of running the EPD suite as a match. I hope to be able to fix that in future versions.