good macintosh guy for UCI engine development

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

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 »

BubbaTough wrote:I want to see all the UCI traffic.
Are there easy to follow instructions for a dumb manager type (as opposed to a super-star unix programmer)?
Cutechess-cli is an industry standard tool for playing matches (such as for param tuning). It needs little UNIX mumbo-jumbo, and has a handy option [-debug] that shows UCI messaging.
On a Mac you invoke it with cutechess-cli.sh.

Code: Select all

./cutechess-cli.sh  -each tc=40/5 proto=uci -engine cmd=chess_engines/Spandrel -engine cmd=chess_engines/fruit -debug
[ big snip ]
20896 >Spandrel(0): isready
20896 <Spandrel&#40;0&#41;&#58; readyok
20896 >Spandrel&#40;0&#41;&#58; go wtime 3760 btime 5415 movestogo 33
20899 <Spandrel&#40;0&#41;&#58; bestmove b6a6
20899 >Fruit 2.1&#40;1&#41;&#58; position startpos moves g1f3 b8c6 e2e3 g8f6 f1e2 d7d5 e1g1 e7e6 b1c3 f8d6 b2b3 e8g8 c1b2 f6e4 c3b5 d6e7 b5d4 c6d4 e3d4 f7f6 d2d3 e4d6 f1e1 d6f5 a1c1 c8d7 c2c4 e7b4 f3d2 c7c6 a2a3 b4d6 g2g3 d8e7 a3a4 d6a3 d1c2 a3b2 c2b2 e7b4 d2f3 a7a5 c1c2 b7b6 e1c1 f8e8 e2f1 d5c4 c2c4 b4e7 f1h3 f5d6 c4c2 e7f7 f3d2 a8d8 b3b4 d8b8 h3g2 e8c8 g2c6 a5b4 b2b4 d7c6 b4d6 f7d7 d6b4 c6d5 c2c8 b8c8 c1c8 d7c8 d2c4 c8c6 b4b5 g8f7 b5c6 d5c6 c4b6 f7e7 a4a5 e7d6 g1f1 d6c7 b6c4 c7b7 f2f4 b7a6 f1e2 a6b5 f4f5 e6f5 c4d6 b5a5 d6f5 g7g6 f5e7 a5b6 g3g4 b6c7 e7g8 f6f5 g8f6 h7h6 g4f5 g6f5 f6g8 h6h5 h2h4 c6d5 g8f6 d5f7 e2e3 c7d6 e3f4 d6e6 f4g5 f5f4 d4d5 e6e7 d5d6 e7d6 g5f4 f7g6 d3d4 d6e6 f4g5 g6f7 f6h5 e6d5 h5f4 d5d4 f4g6 d4e4 g5f6 f7g8 h4h5 e4f3 h5h6 f3g3 f6g7 g8d5 h6h7 g3f2 h7h8q f2e3 h8h4 d5e4 h4g3 e3d4 g3e5 d4e3 e5f4 e3d4 f4d2 d4c4 g6e5 c4c5 d2c3 c5d6 c3d4 d6c7 d4e4 c7d6 e4d4 d6c7 d4c5 c7b7 e5d7 b7a8 c5c6 a8a7 c6b6 a7a8 b6a6
20899 >Spandrel&#40;0&#41;&#58; isready
20899 >Fruit 2.1&#40;1&#41;&#58; isready
20899 <Spandrel&#40;0&#41;&#58; readyok
20899 <Fruit 2.1&#40;1&#41;&#58; readyok
Finished game 1 &#40;Spandrel vs Fruit 2.1&#41;&#58; 1-0 &#123;White mates&#125;
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 »

micron wrote: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&#58; the PowerPC architecture is no longer supported.
Are you sure you have the latest version? I thought this was fixed long ago.
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 »

There's a new version? Ah, got it: Xboard 4.5.3

Overall, a *much* better experience than v4.5.2 with its bizarre permissions problems. There's is one small bug. At each startup, an error box announces

Code: Select all

Can't open "&#125;"&#58; No such file or directory
This seems due to a mistake in /usr/local/etc/xboard.conf

Code: Select all

...
-firstChessProgram fairymax
-secondChessProgram fairymax
&#125;
-niceEngines 0
-polyglotDir "."
...
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 »

micron wrote:There's a new version? Ah, got it: Xboard 4.5.3

Overall, a *much* better experience than v4.5.2 with its bizarre permissions problems. There's is one small bug. At each startup, an error box announces

Code: Select all

Can't open "&#125;"&#58; No such file or directory
This seems due to a mistake in /usr/local/etc/xboard.conf

Code: Select all

...
-firstChessProgram fairymax
-secondChessProgram fairymax
&#125;
-niceEngines 0
-polyglotDir "."
...
Indeed, after you reported the permission problem I asked DarkLord to fix it. I will report this to him too.

Note that I consider all 4.5.x versions nowadays as highly obsolete, and would recommend use of the development version (which can be released as 4.6.0 any time now).
User avatar
trojanfoe
Posts: 65
Joined: Sun Jul 31, 2011 11:57 am
Location: Waterlooville, Hampshire, UK

Re: good macintosh guy for UCI engine development

Post by trojanfoe »

micron wrote:
BubbaTough wrote:I want to see all the UCI traffic.
Are there easy to follow instructions for a dumb manager type (as opposed to a super-star unix programmer)?
Cutechess-cli is an industry standard tool for playing matches (such as for param tuning). It needs little UNIX mumbo-jumbo, and has a handy option [-debug] that shows UCI messaging.
On a Mac you invoke it with cutechess-cli.sh.

Code: Select all

./cutechess-cli.sh  -each tc=40/5 proto=uci -engine cmd=chess_engines/Spandrel -engine cmd=chess_engines/fruit -debug
&#91; big snip &#93;
20896 >Spandrel&#40;0&#41;&#58; isready
20896 <Spandrel&#40;0&#41;&#58; readyok
20896 >Spandrel&#40;0&#41;&#58; go wtime 3760 btime 5415 movestogo 33
20899 <Spandrel&#40;0&#41;&#58; bestmove b6a6
20899 >Fruit 2.1&#40;1&#41;&#58; position startpos moves g1f3 b8c6 e2e3 g8f6 f1e2 d7d5 e1g1 e7e6 b1c3 f8d6 b2b3 e8g8 c1b2 f6e4 c3b5 d6e7 b5d4 c6d4 e3d4 f7f6 d2d3 e4d6 f1e1 d6f5 a1c1 c8d7 c2c4 e7b4 f3d2 c7c6 a2a3 b4d6 g2g3 d8e7 a3a4 d6a3 d1c2 a3b2 c2b2 e7b4 d2f3 a7a5 c1c2 b7b6 e1c1 f8e8 e2f1 d5c4 c2c4 b4e7 f1h3 f5d6 c4c2 e7f7 f3d2 a8d8 b3b4 d8b8 h3g2 e8c8 g2c6 a5b4 b2b4 d7c6 b4d6 f7d7 d6b4 c6d5 c2c8 b8c8 c1c8 d7c8 d2c4 c8c6 b4b5 g8f7 b5c6 d5c6 c4b6 f7e7 a4a5 e7d6 g1f1 d6c7 b6c4 c7b7 f2f4 b7a6 f1e2 a6b5 f4f5 e6f5 c4d6 b5a5 d6f5 g7g6 f5e7 a5b6 g3g4 b6c7 e7g8 f6f5 g8f6 h7h6 g4f5 g6f5 f6g8 h6h5 h2h4 c6d5 g8f6 d5f7 e2e3 c7d6 e3f4 d6e6 f4g5 f5f4 d4d5 e6e7 d5d6 e7d6 g5f4 f7g6 d3d4 d6e6 f4g5 g6f7 f6h5 e6d5 h5f4 d5d4 f4g6 d4e4 g5f6 f7g8 h4h5 e4f3 h5h6 f3g3 f6g7 g8d5 h6h7 g3f2 h7h8q f2e3 h8h4 d5e4 h4g3 e3d4 g3e5 d4e3 e5f4 e3d4 f4d2 d4c4 g6e5 c4c5 d2c3 c5d6 c3d4 d6c7 d4e4 c7d6 e4d4 d6c7 d4c5 c7b7 e5d7 b7a8 c5c6 a8a7 c6b6 a7a8 b6a6
20899 >Spandrel&#40;0&#41;&#58; isready
20899 >Fruit 2.1&#40;1&#41;&#58; isready
20899 <Spandrel&#40;0&#41;&#58; readyok
20899 <Fruit 2.1&#40;1&#41;&#58; readyok
Finished game 1 &#40;Spandrel vs Fruit 2.1&#41;&#58; 1-0 &#123;White mates&#125;
This is very interesting; I have an almost identical tool called 'cute' that does pretty much the same thing. The name cute came from 'Chimp UCI Test Environment' when I was developing the ill-fated Chimp engine. My tool even logs UCI engine traffic in much the same way i.e. "<engine ..." and ">engine ...". It's amazing how such similarly named and similarly functioning projects have kept on the same path for so long.

Output from cute can be seen in this post.

If the OP is interested I can supply a Mac binary for cute, however it looks to me like the publically available cutechess-cli will perform much the same functionality and is almost certainly better supported (given it's actually been released) :)
BubbaTough
Posts: 1154
Joined: Fri Jun 23, 2006 5:18 am

Re: good macintosh guy for UCI engine development

Post by BubbaTough »

micron wrote:
BubbaTough wrote:I want to see all the UCI traffic.
Are there easy to follow instructions for a dumb manager type (as opposed to a super-star unix programmer)?
Cutechess-cli is an industry standard tool for playing matches (such as for param tuning). It needs little UNIX mumbo-jumbo, and has a handy option [-debug] that shows UCI messaging.
On a Mac you invoke it with cutechess-cli.sh.

Code: Select all

./cutechess-cli.sh  -each tc=40/5 proto=uci -engine cmd=chess_engines/Spandrel -engine cmd=chess_engines/fruit -debug
&#91; big snip &#93;
20896 >Spandrel&#40;0&#41;&#58; isready
20896 <Spandrel&#40;0&#41;&#58; readyok
20896 >Spandrel&#40;0&#41;&#58; go wtime 3760 btime 5415 movestogo 33
20899 <Spandrel&#40;0&#41;&#58; bestmove b6a6
20899 >Fruit 2.1&#40;1&#41;&#58; position startpos moves g1f3 b8c6 e2e3 g8f6 f1e2 d7d5 e1g1 e7e6 b1c3 f8d6 b2b3 e8g8 c1b2 f6e4 c3b5 d6e7 b5d4 c6d4 e3d4 f7f6 d2d3 e4d6 f1e1 d6f5 a1c1 c8d7 c2c4 e7b4 f3d2 c7c6 a2a3 b4d6 g2g3 d8e7 a3a4 d6a3 d1c2 a3b2 c2b2 e7b4 d2f3 a7a5 c1c2 b7b6 e1c1 f8e8 e2f1 d5c4 c2c4 b4e7 f1h3 f5d6 c4c2 e7f7 f3d2 a8d8 b3b4 d8b8 h3g2 e8c8 g2c6 a5b4 b2b4 d7c6 b4d6 f7d7 d6b4 c6d5 c2c8 b8c8 c1c8 d7c8 d2c4 c8c6 b4b5 g8f7 b5c6 d5c6 c4b6 f7e7 a4a5 e7d6 g1f1 d6c7 b6c4 c7b7 f2f4 b7a6 f1e2 a6b5 f4f5 e6f5 c4d6 b5a5 d6f5 g7g6 f5e7 a5b6 g3g4 b6c7 e7g8 f6f5 g8f6 h7h6 g4f5 g6f5 f6g8 h6h5 h2h4 c6d5 g8f6 d5f7 e2e3 c7d6 e3f4 d6e6 f4g5 f5f4 d4d5 e6e7 d5d6 e7d6 g5f4 f7g6 d3d4 d6e6 f4g5 g6f7 f6h5 e6d5 h5f4 d5d4 f4g6 d4e4 g5f6 f7g8 h4h5 e4f3 h5h6 f3g3 f6g7 g8d5 h6h7 g3f2 h7h8q f2e3 h8h4 d5e4 h4g3 e3d4 g3e5 d4e3 e5f4 e3d4 f4d2 d4c4 g6e5 c4c5 d2c3 c5d6 c3d4 d6c7 d4e4 c7d6 e4d4 d6c7 d4c5 c7b7 e5d7 b7a8 c5c6 a8a7 c6b6 a7a8 b6a6
20899 >Spandrel&#40;0&#41;&#58; isready
20899 >Fruit 2.1&#40;1&#41;&#58; isready
20899 <Spandrel&#40;0&#41;&#58; readyok
20899 <Fruit 2.1&#40;1&#41;&#58; readyok
Finished game 1 &#40;Spandrel vs Fruit 2.1&#41;&#58; 1-0 &#123;White mates&#125;
I used cute_chess on windows, and your suggestion is really good (much better than what I am doing now). I will still like something where I can play my own moves (and set the fen, and go back and forth in a game via gui, perhaps even test ponder someday). If memory serves, cute_chess is really just for engine vs. engine matches.
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 »

Another handy thing is a board display function for use without a GUI. Terminal.app can show Unicode chess characters.

Image
User avatar
trojanfoe
Posts: 65
Joined: Sun Jul 31, 2011 11:57 am
Location: Waterlooville, Hampshire, UK

Re: good macintosh guy for UCI engine development

Post by trojanfoe »

micron wrote:Another handy thing is a board display function for use without a GUI. Terminal.app can show Unicode chess characters.

Image
That is awesome. Are those chess pieces available in all Mac fonts?

EDIT: I can answer my own question here by using the Mac Font Book app;

The pieces are in Menlo, but not in the other fixed-width fonts (Monaco, Courier, Courier New and Andale Mono).
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 »

trojanfoe wrote: That is awesome. Are those chess pieces available in all Mac fonts?
Not a straight answer, but they are part of the standard Unicode range.
The pieces are in Menlo, but not in the other fixed-width fonts (Monaco, Courier, Courier New and Andale Mono).
I have Monaco set as my terminal font and I can get the pieces to display in my terminal.
Not sure if that means that it's doing some kind of font substitution, but regardless: they do work.
BubbaTough
Posts: 1154
Joined: Fri Jun 23, 2006 5:18 am

Re: good macintosh guy for UCI engine development

Post by BubbaTough »

I downloaded the most recent cute chess-cli, compiled for the Macintosh, but I got the following error:

dyld: Library not loaded: /Users/ilari/QtSDK/Desktop/Qt/4.8.0/gcc/lib/QtCore.framework/Versions/4/QtCore

sigh...

-Sam