best way to get only main lines from uci engine

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

adams161
Posts: 626
Joined: Sun May 13, 2007 9:55 pm
Location: Bay Area, CA USA
Full name: Mike Adams

best way to get only main lines from uci engine

Post by adams161 »

Hi,

In lantern chess, http://www.lanternchess.com I have

if(stage == 2 && text.contains("readyok"))
{


sendToEngine("setoption name UCI_AnalyseMode value true\n");

I'm trying to only get main lines from engine since i pretty much print everything it sends. User's complain that there is to much spam and it's hard to read.

This seems to sort of work with some engines and is overall better, but is this the right way to do it? Send only once after readyok? Is there anything else i can do. Sometimes i notice engines sending lines that are only a move or two deep. What's the all around best approach to get analysis you want to present to a user?

Mike
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: best way to get only main lines from uci engine

Post by Daniel Shawul »

Well uci engines send too much spam by default so you would have to filter the line with the pv. You can ignore "info currmove" lines which are responsible for most of the spam. I don't think there is a way to tell the engine to send only pv lines but i am no expert. Anyway for ICC client applications you need to parse difficult ICS protocols & chats etc , so parsing formal engine output should be easy compared to that.
adams161
Posts: 626
Joined: Sun May 13, 2007 9:55 pm
Location: Bay Area, CA USA
Full name: Mike Adams

Re: best way to get only main lines from uci engine

Post by adams161 »

thanks,

Just pv, have to make sure I'm doing that. I noticed the screen shot i had been looking at that had been spammy was an observed game, so if moves were coming in that would repeatedly request lines. So maybe it's not as bad as i think

Mike