pzorin / qgo

qGo is a Go Client (IGS, WING, LGS, WBaduk/CyberORO, Tygem, Tom, and eWeiqi) based on Qt 5. No active development is happening nor should any be expected.
GNU General Public License v2.0
81 stars 34 forks source link

Doesn't work with leela-zero #54

Open infinity0 opened 6 years ago

infinity0 commented 6 years ago

https://github.com/gcp/leela-zero

I see this https://github.com/pzorin/qgo/blob/master/src/gtp/qgtp.cpp#L75

But leela-zero supports both GTP 2 with or without command numbers, and playing by hand works. In fact leela-zero gives back a move but qgo does not update the UI:

QGtp::openGtpSession( "/usr/games/leelaz" , "--gtp -q --weights /home/infinity0/.cache/leela-zero/best-network" )
flush -> protocol_version
** QGtp::slot_readFromStdout():  = 2
** QGtp::waitResponse():  '2'
flush -> boardsize 19
** QGtp::slot_readFromStdout():  = 
** QGtp::waitResponse():  ''
flush -> clear_board
** QGtp::slot_readFromStdout():  = 
** QGtp::waitResponse():  ''
flush -> komi 7.50
** QGtp::slot_readFromStdout():  = 
** QGtp::waitResponse():  ''
flush -> clear_board
** QGtp::slot_readFromStdout():  = 
** QGtp::waitResponse():  ''
flush -> play black D4
** QGtp::slot_readFromStdout():  = 
** QGtp::waitResponse():  ''
flush -> genmove white
** QGtp::slot_readFromStdout():  = Q4
Deleting BoardWindow

I'm also not sure why it says "play black D4" when in the qgo UI it's drawn as D16.

pzorin commented 5 years ago

I've never looked at that part of the code, but it is certainly very wrong given the part of the code that I did look at. I don't have hardware on which leela-zero would run decently, so I won't investigate.

jackyf commented 2 years ago

Have had the same issue with fuego (http://fuego.sourceforge.net/). Commenting line 74 in qgtp.cpp indeed solves the issue, just as the issue reporter did anticipate.