good macintosh guy for UCI engine development

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

BubbaTough
Posts: 1154
Joined: Fri Jun 23, 2006 5:18 am

good macintosh guy for UCI engine development

Post by BubbaTough »

Hi,

With windows Arena was great for debugging, since I could see all the input and output. I have started a new project, my first one on a macintosh, and find it awkward to debug things like doing moves, undoing moves, move generation, etc. without my Arena crutch. Does anyone know of something similar I could use? I have tried xboard, stockfish, and the shredder demo and none seem to provide the same convenience.

-Sam
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: good macintosh guy for UCI engine development

Post by Evert »

There's Sigma Chess, but I switched to using XBoard myself. I never used any of the other options you mention.
User avatar
hgm
Posts: 27787
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: good macintosh guy for UCI engine development

Post by hgm »

Could you elaborate on what exactly it is that Arena does? Is it that you can see the engine-GUI traffic real time? Wit XBoard you can do that, by setting the debug file to stderr. Then all debug output, which includes all time-stamped engine traffic, appears in the xterm from which you started it.

Of course you could pipe stderr to some filter, to pass only lines that contain 'first' or 'second', to be somewhat more selective.

If you want to see what the UCI traffic, you could can use UCIWB as adapter in stead of Polyglot, as it relays all the raw engine input to the GUI as debug statements, so they appear in the XBoard debug file.
BubbaTough
Posts: 1154
Joined: Fri Jun 23, 2006 5:18 am

Re: good macintosh guy for UCI engine development

Post by BubbaTough »

Evert wrote:There's Sigma Chess, but I switched to using XBoard myself. I never used any of the other options you mention.
As far as I can tell, Sigma chess does not work on the most recent mac os since it does not support powerpc applications. I am not sure you get to see all the UCI traffic either.

-Sam
BubbaTough
Posts: 1154
Joined: Fri Jun 23, 2006 5:18 am

Re: good macintosh guy for UCI engine development

Post by BubbaTough »

hgm wrote:Could you elaborate on what exactly it is that Arena does? Is it that you can see the engine-GUI traffic real time? Wit XBoard you can do that, by setting the debug file to stderr. Then all debug output, which includes all time-stamped engine traffic, appears in the xterm from which you started it.

Of course you could pipe stderr to some filter, to pass only lines that contain 'first' or 'second', to be somewhat more selective.

If you want to see what the UCI traffic, you could can use UCIWB as adapter in stead of Polyglot, as it relays all the raw engine input to the GUI as debug statements, so they appear in the XBoard debug file.
I want to see all the UCI traffic. I did download XBoard and managed to get it running via command line (for some reason changing the config files to get rid of fairymax references did not work, so double clicking the XBoard app would always just generate a no-fairymax error). I have not used unix since grad school (aka for a LONG time) so all the fiddling I was doing trying to get it working was a bit discouraging. I never tried polyglot since after spending an hour getting board installed and working with Arasan I was getting a little depressed about the process. It sounds like UCIWB would be an ideal solution, is there a mac/unix version? Are there easy to follow instructions for a dumb manager type (as opposed to a super-star unix programmer)?

-Sam
User avatar
michiguel
Posts: 6401
Joined: Thu Mar 09, 2006 8:30 pm
Location: Chicago, Illinois, USA

Re: good macintosh guy for UCI engine development

Post by michiguel »

BubbaTough wrote:
hgm wrote:Could you elaborate on what exactly it is that Arena does? Is it that you can see the engine-GUI traffic real time? Wit XBoard you can do that, by setting the debug file to stderr. Then all debug output, which includes all time-stamped engine traffic, appears in the xterm from which you started it.

Of course you could pipe stderr to some filter, to pass only lines that contain 'first' or 'second', to be somewhat more selective.

If you want to see what the UCI traffic, you could can use UCIWB as adapter in stead of Polyglot, as it relays all the raw engine input to the GUI as debug statements, so they appear in the XBoard debug file.
I want to see all the UCI traffic. I did download XBoard and managed to get it running via command line (for some reason changing the config files to get rid of fairymax references did not work, so double clicking the XBoard app would always just generate a no-fairymax error). I have not used unix since grad school (aka for a LONG time) so all the fiddling I was doing trying to get it working was a bit discouraging. I never tried polyglot since after spending an hour getting board installed and working with Arasan I was getting a little depressed about the process. It sounds like UCIWB would be an ideal solution, is there a mac/unix version? Are there easy to follow instructions for a dumb manager type (as opposed to a super-star unix programmer)?

-Sam
I have a program I wrote for Linux ("Gestor") that keeps record of all traffic (inspired on an adapter HGM wrote for Micromax). I guess it should compile for Mac. If you find it useful, I can send it to you or better yet, release it. I will look it up tonight at home.

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

Re: good macintosh guy for UCI engine development

Post by hgm »

UCI2WB is open source, ( http://hgm.nubati.net/cgi-bin/gitweb.cgi ), and compiles on Windows as well as Linux. I suppose you should haev no difficulty compiling it for Mac.

The easiest way to get rid of the fairymax error message is to actually install fairymax. I am not sure things like "apt-get install" work on a Mac-Intosh, but the XBoard binary package for Mac that is available from WinBoard forum should come with Fairy-Max pre-installed. (And probably also Mac binaries for Polyglot and UCI2WB).

Another way would be to edit the master settings file (on Linux /etc/xboard.conf) and change the -firstChessProgram setting from fairymax to another engine, or define -ncp mode to start without engine.

To run a UCI engine with UCI2WB from the command line, you could use

xboard -fcp "UCI2WB ENGINECOMMAND ENGINEFOLDER"

where ENGINEFOLDER is optional. (On Linux engines typically know where to find their own files.) Note that UCI2WB should be in your path, i.e. you should be able to type it from the command line. (If you put it in the current directory, you would have to give the command ./UCI2WB to run it.)

Normally XBoard is configured to automatically invoke Polyglot (for the first engine) when you use the argument -fUCI, or tick UCI in the Load Engine dialog. To configure it for using UCI2WB in stead, you would have to run it one time with the option

xboard -adapterCommand "UCI2WB %fcp %fd"

After that, use of -fUCI on an engine would automatically invoke UCI2WB. So you should be able to run, say, Fruit by

xboard -fcp fruit -fUCI

You could also just startup XBoard, select Engine->Load Engine, type "fruit" for engine command, tick UCI, and click OK to load Fruit (and next time you could then select it in that same dialog from the combobox).

Image

To get the debug output you should start XBoard from a terminal window, by typing

xboard -debug -debugfile stderr

The debug output should then appear in the terminal window.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: good macintosh guy for UCI engine development

Post by Evert »

BubbaTough wrote:As far as I can tell, Sigma chess does not work on the most recent mac os since it does not support powerpc applications.
Probably true.
I am not sure you get to see all the UCI traffic either.
I write my own log file with all incoming and outgoing commands. Does the job.
User avatar
hgm
Posts: 27787
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: good macintosh guy for UCI engine development

Post by hgm »

We hope to have a native Mac version of XBoard (tentative name 'OSXBoard') soon. I have just seen a screenshot, and it already displays the board and clocks!
micron
Posts: 155
Joined: Mon Feb 15, 2010 9:33 am
Location: New Zealand

Re: good macintosh guy for UCI engine development

Post by micron »

hgm wrote:We hope to have a native Mac version of XBoard (tentative name 'OSXBoard') soon. I have just seen a screenshot, and it already displays the board and clocks!
I look forward to that.
The old Xboard for Mac installer had so many problems... Here's another that I just noticed. The timestamp utility won't run on MacOS X 10.7:

Code: Select all

/Applications/Xboard/timestamp ; exit;
Launch of "timestamp" failed: the PowerPC architecture is no longer supported.