Problem to run XBoard with Mac command line

Discussion of chess software programming and technical issues.

Moderators: Harvey Williamson, bob, hgm

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
phhnguyen
Posts: 849
Joined: Wed Apr 21, 2010 2:58 am
Location: Australia
Full name: Nguyen Hong Pham
Contact:

Problem to run XBoard with Mac command line

Post by phhnguyen » Tue Nov 22, 2016 12:08 am

I want to run XBoard (4.9.1 for Mac) with Xiangqi engines from command line on a Macbook pro.

Firstly I have checked that I can load, run, play against well with both haqikid and eleeeye from menu of XBoard.

Then I have copied haqikid and ELEEYE engines from XBoard folder into a new folder (/Users/Me/engines) then run bellow command line (it is copied and modified from one which could run well in MS Windows):

Code: Select all

open -a XBoard.app --args -debug -variant=xiangqi -fcp "haqikid" -fd "/Users/Me/engines" -scp "ELEEYE" -sd "/Users/Me/engines"
XBoard runs and displays correctly Xiangqi board. However there is a popup with message "Failed to start first chess program haqikid on localhost: haqikid: Permission denied".

I have used chmod to give all rights (r, w, x) to all files in that folder but no hope.

Thanks for any helps.

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

Re: Problem to run XBoard with Mac command line

Post by hgm » Tue Nov 22, 2016 10:08 am

I never had a Mac, but I know that in Linux you cannot start programs in the current directory by just mentioning the name of the binary. You have to prefix it with "./". So perhaps you could try it with -fcp "./haqikid".

Note that in the command line you posted here, XBoard would try to use Elephant Eye as a WinBoard engine, as you gave it no indication that it is UCCI. You would have to add -sUCCI to indicate that. (Assuming XBoard is configured to use UCI2WB properly, which should be the case if you are using the OS X App.)

User avatar
Evert
Posts: 2929
Joined: Fri Jan 21, 2011 11:42 pm
Location: NL
Contact:

Re: Problem to run XBoard with Mac command line

Post by Evert » Tue Nov 22, 2016 11:02 am

hgm wrote:I never had a Mac, but I know that in Linux you cannot start programs in the current directory by just mentioning the name of the binary. You have to prefix it with "./". So perhaps you could try it with -fcp "./haqikid".
I would specify the full path, even.
Note that you can add "." to the PATH on both OS X and Linux to get the same behaviour as Windows (able to run programs in the current directory without specifying the path).

User avatar
phhnguyen
Posts: 849
Joined: Wed Apr 21, 2010 2:58 am
Location: Australia
Full name: Nguyen Hong Pham
Contact:

Re: Problem to run XBoard with Mac command line

Post by phhnguyen » Tue Nov 22, 2016 10:55 pm

Oops, so silly me! I was distracted by the meaning of the message :(

Thanks all. Everything works well now. I have been watching matches between haqikid and eleeye

BTW, do you know any test/match management app which could run with Xiangqi?

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

Re: Problem to run XBoard with Mac command line

Post by hgm » Tue Nov 22, 2016 11:06 pm

Not sure what you mean by test/match management app. Isn't that exactly what XBoard is?

User avatar
phhnguyen
Posts: 849
Joined: Wed Apr 21, 2010 2:58 am
Location: Australia
Full name: Nguyen Hong Pham
Contact:

Re: Problem to run XBoard with Mac command line

Post by phhnguyen » Tue Nov 22, 2016 11:26 pm

To play, say over night, automatically matches between some (>2) engines.

User avatar
phhnguyen
Posts: 849
Joined: Wed Apr 21, 2010 2:58 am
Location: Australia
Full name: Nguyen Hong Pham
Contact:

Re: Problem to run XBoard with Mac command line

Post by phhnguyen » Wed Nov 23, 2016 12:01 am

Muller, I have just watched matches between haqikid and eleeye (ElephantEye). Thought haqikid should be stronger but the result amazes me (2-8-0 even I forgot to copy book of eleeye). Do I need any special settings for haqikid? I have known that haqikid can run with multi cores too. How can I setup that, say, let haqikid runs on 2 cores? Thanks

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

Re: Problem to run XBoard with Mac command line

Post by hgm » Wed Nov 23, 2016 10:06 am

phhnguyen wrote:To play, say over night, automatically matches between some (>2) engines.
Well, that is what XBoard does. Just select the participants in the Tournament Options dialog, and the other tourney parameters (tourney type (round robin or gauntlet), number of games per pairing and cycles, possibly files with opening lines, and press 'OK'.

HaQiKi D is not really stronger than Elephant Eye. In the Xiangqi enginetourney I held in 2010 it ended below the latter ( http://home.hccnet.nl/h.g.muller/XQC2010.html ), and I hardly worked on it since. It also has rather poor opening play, and really needs the book. Are you sure it was configured to use the book (through XBoard)? Finally, 10 games statistically is pretty meaningless. Even a slightly better engine can easily lose 8-2.

I did make a (lazy) SMP implementation just before this year's ICGA Olympiad, but I am not sure I ever released that. (It also uses End-Game Tables for Rook vs defenders, 2 Horses vs defenders and several end-games with Cannons.) I will check with Joshua Pettus, who maintains the Mac binaries of XBoard and engines bundled with it, what the latest version of HaQiKi D was that he included.

JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 12:23 am

Re: Problem to run XBoard with Mac command line

Post by JoshPettus » Wed Nov 23, 2016 3:44 pm

Glad you got it working. Even happier that that command line works! :D That use to have quite a few issues with spawning a infinite xboard apps...

[EDIT]
Sorry to hijack your thread, but since both mac xboard users are here, I thought I'd ask anyway.

I have a bit of a problem that I wondering if it was a larger problem.

The way XBoard.app is suppose to work is it is suppose to be able to switch the icon on the dock to white and black versions of the knight depending on whose turn it is. (or the red and black Ma for the Xiangqi version) Also if you open the "Engine Output" window under the "View" menu, you are suppose to see dots indicating which engine is white, which is black, and which is unloaded with a grey dot. Also in the same window you are suppose to see if the engine is thinking/pondering, or waiting with another couple of icons. This is all due to the magic of gdk pixbufs.

Now on my laptop, which was my primary dev machine, this all worked fine. But when I tried it on a school computer, I noticed it didn't work. I originally thought this was due to some permission issue. Without having admin access to get past gatekeeper, I was launching stuff via the terminal. So permissions didn't seem out of the question. But then I built myself a 'hackentosh'. Now it has the same problem. (Which could be explained by the fact I'm using a hacked kernel which has other icon problems) But it has me really worried. Did this pixbuf feature ever work on either of your machines?

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

Re: Problem to run XBoard with Mac command line

Post by hgm » Wed Nov 23, 2016 3:59 pm

Since you are here, what is the version of HaQiKi D you distribute with XBoard?

Post Reply