GNU Shogi (WinBoard version)

Discussion of chess software programming and technical issues.

Moderator: Ras

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

GNU Shogi (WinBoard version)

Post by hgm »

I fixed GNU Shogi such that it again user normal WinBoard protocol, and compiled a Windows binary for it. (Nothing special like PGO, just running the Makefile under Cygwin). It can be downloaded from:

http://hgm.nubati.net/gnushogi.zip

This download includes the book in binary format, plus the required Cygwin DLLs (on which it is sadly dependent).

In the process of testing it, I also discovered some Shogi bugs in WinBoard. (SAN Promotions were not recognized, which gave trouble reading PGN files.) The latest version,which has those fixed, can be downloaded from

http://hgm.nubati.net/winboard0526.zip
User avatar
hgm
Posts: 28404
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: GNU Shogi (WinBoard version)

Post by hgm »

In a test of bullet games (40 moves/min) GNU Shogi lost 37-13 to TJshogi, the only other native WB Shogi engine. (I had to play with /autoCallFlag off to prevent GNU Shogi losing on time in most games.) There was not a single illegal-move or false-claim problem, so I guess the conversion is fully succesful now.
TonyJH
Posts: 183
Joined: Tue Jun 20, 2006 4:41 am
Location: USA

Re: GNU Shogi (WinBoard version)

Post by TonyJH »

Nice. Maybe this GNU Shogi can be included in future WinBoard packages. And maybe the shogi font too.
User avatar
hgm
Posts: 28404
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: GNU Shogi (WinBoard version)

Post by hgm »

Perhaps. Although currently it is bit bulky (950kB compressed) to include it as an add-on that hardly anyone will eventually install. This is because it still has to include the cygwin1.dll, which eats 90% of the space. I should first learn how to compile with -mno-cygwin.

I would also like to make the patches more optional. E.g. make everything I changed dependent on a run-time flag that is set only on reception of an xboard command. So that the patches do not alter the existing behavior in any way if you do not run under WinBoard, and can go in the main line of the GNU Shogi project.
yoshiharu
Posts: 56
Joined: Sat Nov 11, 2006 11:14 pm

Re: GNU Shogi (WinBoard version)

Post by yoshiharu »

Hi HGM,
I downloaded both gnushogi and the version of winboard you linked. I tried to put the things together, but it didn't work out.
I launch gnushogi in winboard with this line in winboard.ini
GNUShogi /fcp="gnushogi.exe -B gnushogi.bbk" /fd=<gnushogi folder> /variant shogi

When I start the winboard, I wait a few second to make the engine started, then I make a move (for the record, 1. 7g7f). Then bad things happen, since the engine answers, but the immediately winboard retracts the move and says "Illegal move "b6" (rejected by first chess program)".
This is the relevant excerpt of the winboard.debug file

4890 >first : time 30000
4890 >first : otim 30000
book hit = (NULL)
4890 >first : c3c4
4922 <first : time 30000 0
4922 <first : otime 30000 0
4922 <first : 1. 7g7f 300000
4922 <first : # White matches 1 pattern(s)
4922 <first : # Black matches 5 pattern(s)
4922 <first : stage = 4
4922 <first : balance[black] = 50 balance[white] = 50
4922 <first :
4922 <first : Move# 1 Target = 100 Clock: 30000
4922 <first : move b7b6
machine move 1, castling = 45 45 45 45 45 45
move to parse: b7b6
45 45 45 45 45 45 Legality test? b7b6
TC string = '+40/5'
mps=40 tc=300000 inc=0
CoordsToAlgebraic, piece=22 (3,6)-(3,5) -
45 45 45 45 45 45 Legality test? b7b6
movetype=33, promochar=0=-
MateTest: K=1, my=20, his=20
move: b7b6
, parse: b6 (
)
repeat test fmm=2 bmm=0 ep=-4, reps=6
2 ep=-3
1 ep=-3
0 ep=-4
silence
5047 <first : Gen 0 Node 0 Tree 29 Eval 0 Rate 0 EC 0/0 RS hi 0 lo 0
5047 <first : Hin/Hout/Tcol/Coll/Fin/Fout = 0/0/0/0/0/0
5047 <first : Hint: 7i6h
5047 <first : Illegal move c1d2
TC string = '+40/5'
mps=40 tc=300000 inc=0
GameEnds(40, xboard exit, 2)
10187 >first : result * {xboard exit}
10187 >first : force
10187 >first : quit


Have you got an idea of what's going on?

Cheers, Mauro
TonyJH
Posts: 183
Joined: Tue Jun 20, 2006 4:41 am
Location: USA

Re: GNU Shogi (WinBoard version)

Post by TonyJH »

Looks like this is a problem with GNU Shogi that has to do with pondering. For now you can disable pondering in Winboard and this problem won't happen.
(options -> general -> ponder next move)

It is repeatable in GNU Shogi in console mode:

GNU Shogi 1.3.2p0
hard
c3c4

1. 7g7f 287820
move b8f8
Illegal move b2d4
User avatar
hgm
Posts: 28404
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: GNU Shogi (WinBoard version)

Post by hgm »

OK, I will have a look at it. I have not tested with ponder on. I usually play engine-engine with ponder off, and I had no reason to suspect pondering, because I did not really change anything there. (All I did was change some of the printed messages, and the move format. And comment out some lines in a routine that, as far as I could see, was never used in xboard mode.)

So it is pretty weird that pondering does not work. It could be that this is a Cygwin problem, that would even occur in my compilation of the unmodified source. I will test that first.
yoshiharu
Posts: 56
Joined: Sat Nov 11, 2006 11:14 pm

Re: GNU Shogi (WinBoard version)

Post by yoshiharu »

TonyJH wrote:Looks like this is a problem with GNU Shogi that has to do with pondering. For now you can disable pondering in Winboard and this problem won't happen.
You are right!

Cheers, Mauro
Dann Corbit
Posts: 12799
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: GNU Shogi (WinBoard version)

Post by Dann Corbit »

hgm wrote:I fixed GNU Shogi such that it again user normal WinBoard protocol, and compiled a Windows binary for it. (Nothing special like PGO, just running the Makefile under Cygwin). It can be downloaded from:

http://hgm.nubati.net/gnushogi.zip

This download includes the book in binary format, plus the required Cygwin DLLs (on which it is sadly dependent).

In the process of testing it, I also discovered some Shogi bugs in WinBoard. (SAN Promotions were not recognized, which gave trouble reading PGN files.) The latest version,which has those fixed, can be downloaded from

http://hgm.nubati.net/winboard0526.zip
Can the current Winboard also connect with USI interface?
User avatar
hgm
Posts: 28404
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: GNU Shogi (WinBoard version)

Post by hgm »

No, there is no adapter for that yet.

Perhaps there will be, when I feel the need to test my own Shogi engine (Shokidoki) against stonger opponents. But I doubt if I will get to that stage before the Olmpiad, in September. I am not so sure there are that many USI engines anyway, although I heard rumors that Spear has converted now. And Bonanza already supported it through an adapter. But these engines are in the stratosphere, and I still will have a very long way to go before they could become useful as opponents.