Arena-Xboard. My engine can´t play two consecutive games.

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
Luis Babboni
Posts: 464
Joined: Sat Feb 28, 2015 4:37 pm
Location: Argentina

Arena-Xboard. My engine can´t play two consecutive games.

Post by Luis Babboni »

Hi!

(Failing with UCI, I´m trying Xboard now that seems more explicit and detailed.)

To the point: If I play human vs my engine and human resings, nothing appears on debug dialogue but I just simple need to do "New Rated Game" to play another consecutive game.
But the problem appears if is my engine who resign or lost by time.

In this case the debug dialogue shows for example:
<--1: resigns
*1* black resign detected...

But then the "New Rated Game" is not avaiable anymore.
I could use Game/Resign and Game/adjudicate to get "New Rated Game" avaiable again.... but when is my engine turn, the debug dialogue shows:

*1*Engine already calculating!

What I can not avoid without restart Arena.

I found a way to play two consecutive games seting feature reuse=0 but it is needed a lot of time and clicks everywhere to do two consecutive games this way.

Any hint?

Thanks!
User avatar
Luis Babboni
Posts: 464
Joined: Sat Feb 28, 2015 4:37 pm
Location: Argentina

Re: Arena-Xboard. My engine can´t play two consecutive games

Post by Luis Babboni »

I found that in Crafty GUI all works fine! :D

Just cant find a debug window yet.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Arena-Xboard. My engine can´t play two consecutive games

Post by bob »

Luis Babboni wrote:I found that in Crafty GUI all works fine! :D

Just cant find a debug window yet.
You can start by trying "-xreuse" which says "re-start engine for each new game" to see if your program is hanging or not replying to something as it should. If this fixes it, you need to see what you didn't send or didn't respond to.
User avatar
Luis Babboni
Posts: 464
Joined: Sat Feb 28, 2015 4:37 pm
Location: Argentina

Re: Arena-Xboard. My engine can´t play two consecutive games

Post by Luis Babboni »

Thanks Robert!

Not sure how to use -xreuse, but seems reading
http://www.gnu.org/software/xboard/engine-intf.html
: "...xboard normally reuses the same chess engine process for multiple games. At the end of a game, xboard will send the "force" command (see below) to make sure your engine stops thinking about the current position. It will later send the initString again to start a new game. If your engine can't play multiple games, you can disable reuse either with the "feature" command (beginning in protocol version 2; see below) or with xboard's -xreuse (or -xreuse2) command line option. xboard will then ask the process to quit after each game and start a new process for the next game...."
That with protover 2 making feature reuse=0 is the same, at least is what I understand.
And as I said, I did it and works but after so many time (5 secs :-D ) and clicks.

I found this Crafty GUI too much more intuitive than Arena! It´s a pitty it haven´t a good debug output
:(
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Arena-Xboard. My engine can´t play two consecutive games

Post by bob »

Luis Babboni wrote:Thanks Robert!

Not sure how to use -xreuse, but seems reading
http://www.gnu.org/software/xboard/engine-intf.html
: "...xboard normally reuses the same chess engine process for multiple games. At the end of a game, xboard will send the "force" command (see below) to make sure your engine stops thinking about the current position. It will later send the initString again to start a new game. If your engine can't play multiple games, you can disable reuse either with the "feature" command (beginning in protocol version 2; see below) or with xboard's -xreuse (or -xreuse2) command line option. xboard will then ask the process to quit after each game and start a new process for the next game...."
That with protover 2 making feature reuse=0 is the same, at least is what I understand.
And as I said, I did it and works but after so many time (5 secs :-D ) and clicks.

I found this Crafty GUI too much more intuitive than Arena! It´s a pitty it haven´t a good debug output
:(
Have you used -debug? It gives a log of every message sent and received by xboard, as well as an indication for whether the line was sent or received, and which engine was involved.

I have to use it every now and then when I break something, to see what is causing the game to hang. I just had one in the latest where it would hang at the end. Turns out some I/O changes caused it to fail to respond to a "ping n" command.
User avatar
Luis Babboni
Posts: 464
Joined: Sat Feb 28, 2015 4:37 pm
Location: Argentina

Re: Arena-Xboard. My engine can´t play two consecutive games

Post by Luis Babboni »

Yes Robert, is a very usefull window.... the strange thing is that with Crafty, where you couldn´t see too much of the GUI-engine dialogue, my engine works perfectly.

But as I said, with reuse = 0 I could play in Arena two consecutives games without need to restart.... just too many clicks and a little of wait time.
So for the moment I´ll use Arena to test the GUI-engine communications and Crafty to test the play of my engine*.

*: well, my "future" engine.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Arena-Xboard. My engine can´t play two consecutive games

Post by bob »

Luis Babboni wrote:Yes Robert, is a very usefull window.... the strange thing is that with Crafty, where you couldn´t see too much of the GUI-engine dialogue, my engine works perfectly.

But as I said, with reuse = 0 I could play in Arena two consecutives games without need to restart.... just too many clicks and a little of wait time.
So for the moment I´ll use Arena to test the GUI-engine communications and Crafty to test the play of my engine*.

*: well, my "future" engine.
I am not sure what you mean when "with crafty". Crafty doesn't manage games between it and other opponents, that is what xboard does. And xboard has the -debug option that captures all data to/from both engines so that you can see what was sent and when.
User avatar
Luis Babboni
Posts: 464
Joined: Sat Feb 28, 2015 4:37 pm
Location: Argentina

Re: Arena-Xboard. My engine can´t play two consecutive games

Post by Luis Babboni »

Crafty GUI:
http://www.nchess.eu/crafty/

How to set that -debug option?
I have Winboard GUI for example and a lot of other GUIs and can not found a way to see the GUI-engine dialogue more than in Arena :oops:
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Arena-Xboard. My engine can´t play two consecutive games

Post by bob »

Luis Babboni wrote:Crafty GUI:
http://www.nchess.eu/crafty/

How to set that -debug option?
I have Winboard GUI for example and a lot of other GUIs and can not found a way to see the GUI-engine dialogue more than in Arena :oops:
No idea. That is not MY code at all. The only GUI I use is Xboard, I have been using that since late 1994.
User avatar
hgm
Posts: 28480
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Arena-Xboard. My engine can´t play two consecutive games

Post by hgm »

Luis Babboni wrote:Crafty GUI:
http://www.nchess.eu/crafty/

How to set that -debug option?
I have Winboard GUI for example and a lot of other GUIs and can not found a way to see the GUI-engine dialogue more than in Arena :oops:
WinBoard does not have a window where you can see the engine-GUI communication real time, like Arena. The -debug option Bob mentions if for WinBoard/XBoard, and can be specified as "Additional option" in the WinBoard startup dialog, or on its command line. You can also switch in on by pressing Crtl-D when the main window has focus. (This toggles debug mode.) It causes the communication to be written to a file winboard.debug. Usually it is so much that it is easier to view it with an editor, than in a GUI window.

For XBoard there is the possibility to use options -debug -debugfile stderr to redirect the debug output to the terminal from which you started XBoard.