GNU Shogi?

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

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

GNU Shogi?

Post by hgm »

Does anyone know how to compile GNU Shogi to run it under Windows?
User avatar
Jaap Weidemann
Posts: 62
Joined: Mon Aug 14, 2006 3:47 am
Location: Stellenbosch, South Africa

Re: GNU Shogi?

Post by Jaap Weidemann »

Hi HG,

Have you tried Cygwin?

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

Re: GNU Shogi?

Post by hgm »

Yes, I tried that, but I am getting compilation errors, so I must be doing something wrong. I do not understand how the makefile works, and it seems you need another utility (which I am not familiar with at all) to generate a config.h file needed in the compilation, which is not included in the release package.
User avatar
Jim Ablett
Posts: 2359
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: GNU Shogi?

Post by Jim Ablett »

Hi All,

I've managed to port GnuShogi to windows using cygwin.
Console mode only, no gui/protocol support (so get your chessboards out!)

Start from the command line: 'gnushogi -R' <no quotes>
then wait 10-15 seconds while it load in it's opening books.
After this type 'help' for full list of comands.

Bugs: Some of the command line options maybe broken.

GnuShogi 1.3 win32

http://www.zshare.net/download/49227234050e13/
Mirrors:
http://w14.easy-share.com/10241051.html
http://myfreefilehosting.com/f/248902a413_0.94MB

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

Re: GNU Shogi?

Post by hgm »

Hmm, useful exercise. I already learned that my /alphaRank option to Winboard_F numbers the ranks in reverse, starting with 'a' where tehe pieces of the side that has the first move are located. But when I let gnushogi start by typing 'go', it comes with '7g7f', i.e. it moves a pawn from the 'g' rank in stead of the 'c' rank. Apparently the rank counting starts from the other end.
User avatar
hgm
Posts: 28417
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: GNU Shogi?

Post by hgm »

OK, I got it working. With the /alphaRank=TRUE option I was able to play an engine-engine game between two GNUShogis under Winboard_F! :shock:

This despite the fact that GNUShogi is not a Winboard engine at all, and violates the protocol rather heavily. But Winboard has always been quite tolerant against the frivoulous way GNUChess abuses the protocol, and GNUShogi is a descendent of that.

I had to add a few libnes of code in Winboard, though, to ignore the engine outputs "White matches (N) patterns" and "Black matches (N) patterns", which were recognized by WinBoard as "white mates" and "black mates" :evil:

In addition to that, I had to add "white\n" to the /secondInitString, as otherwise they insisted on playing with the same color, not accepting each other's moves. I am not sure why that is.

Anyway, this was the game (western PGN notation, which Winboard can read back).
[Event "Computer Chess Game"]
[Site "FOM-RHKA8J2A5WY"]
[Date "2007.11.15"]
[Round "-"]
[White "gnushogi"]
[Black "gnushogi"]
[Result "0-1"]
[TimeControl "40/60"]
[Variant "shogi"]

1. c4 g6 2. i4 Bxb2+ 3. Rxb2 B*6e 4. Ke2 Bxh3+ 5. B*5d +Be6 6. Bxg6 Sg8 7.
c5 +Bf6 8. Be4 b6 9. c6 3¨3f 10. Bxc6 Sd8 11. P*3c P*7f 12. Gc2 P*3g 13.
Be4 Gf8 14. c4 +Bxb2 15. Sxb2 R*8c 16. Ni3 Sg7 17. P*8h Sxh8 18. Sf2 Sg7
19. Gg1 Rh4+ 20. B*7b Gg8 21. c5 +Rg5 22. Gd2 +Rxc5 23. f4 Gc8 24. f5 +Rd6
25. a4 Kf8 26. Nc3 Sh8 27. a5 +Re6 28. Gf1 Ng7 29. Ge1 i6 30. Bh3 d6 31.
Bg4 g5 32. Bh3 Sg9 33. Gdd1 b5 34. Sc1 +Re5 35. Sf3 +Rxe4 36. Sxe4 B*8b 37.
R*6a Bxg3+ 38. Rh1 +Bxh3 39. Rxh3 B*7d 40. Rf3 Bxf3+ 41. Sxf3 R*8b 42. B*6b
Rxf2+ 43. Gxf2 B*5e 44. R*8i Li7 45. Ri9+ Sh8 46. +Rxb9 Rxb9 47. B*5h Kxe8
48. N*7f Sg9 49. Sd2 Bxi1+ 50. a6 R*9b 51. Nh5 Rxf2+ 52. Kxf2 B*8d 53. Kg2
G*7c 54. Kg1 L*7b 55. Sxg2 Gf2#
{Black mates} 0-1
and final-position FEN:

lr4s2/2gsk1g2/p1p1ppnpl/P2p2N1p/1p3PpN1/7bP/1PNPP4/3S1gS2/L2G2K1+b w RLppp 1 56
Last edited by hgm on Fri Nov 16, 2007 12:05 am, edited 1 time in total.
User avatar
hgm
Posts: 28417
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: GNU Shogi?

Post by hgm »

And the final position:

Image