UCI Engine output

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Dave_N
Posts: 153
Joined: Fri Sep 30, 2011 7:48 am

Re: UCI Engine output

Post by Dave_N »

I am not actually using the windows api in this program - I have based the engine loading code on the "exec" sample from WxWidgets, however I am not sure how many UCI engines can actually run on the Mac or Linux.
Michel
Posts: 2273
Joined: Mon Sep 29, 2008 1:50 am

Re: UCI Engine output

Post by Michel »

Another example is the "pipex" code in the polyglot source (which is C, not C++). On Linux it uses "select" and on Windows threads.
Dave_N
Posts: 153
Joined: Fri Sep 30, 2011 7:48 am

Re: UCI Engine output

Post by Dave_N »

Yeah I have Polyglot too, although I am trying to make an original code (my pgn parse is megalithic and mostly inline) I did experiment with reading the polyglot opening books =)
User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 7:45 pm
Location: Finland

Re: UCI Engine output

Post by ilari »

Dave_N wrote:The code seems to suggest that the "isready" command is occasionally sent to "avoid signal spam" unless I am misinterpreting this:-

Code: Select all

// To avoid signal spam, send the 'readyRead' signal only
 120                 // if we have a whole line of new data
 121                 if &#40;m_lastNewLine <= int&#40;dwRead&#41;)
 122                         emit readyRead&#40;);
I guess I should have mentioned that Cute Chess uses the Qt framework which has some extensions to C++ such as signals and slots. The PipeReader object sends the readyRead() signal to the main thread only when a complete line (something with the \n escape sequence) has been read. That can reduce the frequency of the readyRead() signal and thus improve the efficiency of the code.
Dave_N
Posts: 153
Joined: Fri Sep 30, 2011 7:48 am

Re: UCI Engine output

Post by Dave_N »

I have Qt installed however I am still getting to grips with the compiler