play Xiangqi (Chinese chess) on Linux Xboard 4.9.1

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

play Xiangqi (Chinese chess) on Linux Xboard 4.9.1

Postby kuiba » 28 Mar 2020, 10:05

play Xiangqi (Chinese chess) on Linux Xboard 4.9.1

在 Linux 下用 Xboard 玩中国象棋

OS: Debian 10.2 amd64
Xboard 4.9.1
Xiangqi Engine (3 optional): maxqi, hoixiangqi, sjaakii

------------
NOTICE:
Becouse I don't find any button to upload pictures, so I pass a URL ( in Chinese)
------------

see detail and screenshots here:
https://forums.debiancn.org/t/topic/2264
Image
--
Image
--
Image
--
Image



---------------

# xboard-xiangqi

#### 一、介绍

* 用 Xboard 玩中国象棋。命令: xboard-xiangqi
* version 4.9.1-7, 2020-3-28 updated, by Careone;

#### 二、软件架构
all

#### 三、安装教程

1. 安装依赖的软件包: sudo apt-get install xboard fairymax
2. 安装推荐的软件包: sudo apt-get install hoichess sjaakii
3. 推荐安装第三方主题包 (DEB): xboard-xiangqi-themes 。下载地址:
https://sourceforge.net/projects/emacsl ... d-xiangqi/

#### 四、Xboard 下的中国象棋引擎

1. maxqi: 象棋水平一般(大致相当于腾迅天天象棋的“业3-业4”水平)。
软件包 fairymax 自带。通常默认已安装;

2. hoixiangqi: 象棋水平一般(大致相当于腾迅天天象棋的“业3-业5”水平)。
需要安装软件包 hoichess;

3. sjaakii: 象棋水平较高(大致相当于腾迅天天象棋的“业5-业6”水平)。
需要安装软件包 sjaakii, 并使用 -variant xiangqi 选项,指定棋种为中国象棋。

* 腾迅天天象棋-残局闯关全部360关: 其中 81.3% 以上 (293/360) 的棋局, 可以使用
sjaakii 中国象棋引擎自动解出;

* 《适情雅趣》残局谱 (2009年李浭版) 全部551局的前100局, 81% (81/100) 可以使用
sjaakii 中国象棋引擎自动解出;第101-551局的 86.9% (392/451),可以使用
Winboard 4.6 自带的象眼 (EleEye) 引擎自动解出。其余棋局, 可以用其它象棋软件引擎
解出,或者手动编辑走法。

#### 五、使用说明

1. xboard-xiangqi 直接启动中国象棋
2. xboard-xiangqi -s 49 指定棋格大小为 49x49。默认为49, 推荐为47-65
3. xboard-xiangqi -t wood 使用木质的棋子/棋盘主题
4. xboard-xiangqi --nologo 不显示象棋引擎的 LOGO 图片。这样程序界面会小一些

5. xboard-xiangqi -sj -lf [数字1-551]
加载棋例《适情雅趣》残局谱第 1-551 局的任意一个 FEN 局面(相当于挑战残局)
-sj 代表使用棋力较强的中国象棋引擎 sjaakii

6. xboard-xiangqi -lg [PGN文件] [数字序号]
打开 PGN 对局/棋谱文件中的指定棋局。如果未指定文件和数字,则打开棋例

7. xboard-xiangqi -h 查看帮助信息和更多功能

#### 六、相关软件包和技术说明

Linux下用XBoard玩中国象棋
2020-2-23, by Careone

适用系统: Debian/ Ubuntu/ Deepin/ UOS

步骤一: 安装 xboard 和 hoichess 软件包

sudo apt-get install xboard hoichess
说明:软件包 hoichess 中,包含一个 XBoard 中国象棋引擎 hoixiangqi

步骤二: 下载并安装软件包 xboard-xiangqi
另外,还可以安装附加的棋子棋盘图片主题包 xboard-xiangqi-themes

下载地址:
DEB 安装包:
https://sourceforge.net/projects/emacsl ... d-xiangqi/
源码: https://gitee.com/atzlinux/xboard-xiangqi

步骤三:直接运行 xboard-xiangqi 即可启动 XBoard 中国象棋。
另外,还可以使用 -s 选项来指定棋子大小。如:
xboard-xiangqi -s 60

指定棋格大小为 60x60。 默认为 49。推荐为 47-65。
说明: 如果小于 47,则程序上部的菜单栏可能消失。

其它常用功能:可以使用 -t 选项使用其它象棋主题。如:

* 2. 木纹主题
xboard-xiangqi -t wood

* 3. CCBridge 象棋桥主题
xboard-xiangqi -t ccbridge

* 4. 东萍象棋主题
xboard-xiangqi -t dpxq

#### 七、自定义棋盘、棋子的技术说明

1. 自定义 [棋盘图片] 的技术说明:中国象棋棋盘图片文件后面,需要加上 -9x10 字样,如
xqboard-wood-9x10.png,
这样在缩放棋盘时,九宫斜线中间才不会出现断线或者错位;
2. 自定义 [棋子图片] 的技术说明:只支持 PNG 或者 SVG 这两种图片格式;

#### 八、挑战中国象棋古谱残局和其它棋局

1. 挑战《适情雅趣》残局谱551例(2009年李浭版):
xboard-xiangqi -sqyq -lg
也可以直接指定第几局(如第467局,马杀单士):
xboard-xiangqi -sqyq -lg 467

2. 挑战腾迅天天象棋----残局闯关550例:
xboard-xiangqi -ttxq -lg

* 说明1: 从 xboard-xiangqi 4.9.1-6 开始, 支持上面两种残局棋例
* 说明2: 从 xboard-xiangqi 4.9.1-7 开始, 新增功能选项 -sp, --sample, 同时收录了
更多的经典古谱残局棋例的 FEN 局面文件。用法示例:

3. 显示中国象棋棋例列表
xboard-xiangqi -sp

输出示例如下(可以在 -sp 选项后面加上数字编号,来指定棋例文件):
----------------------------------
查看可用的 Xboard 中国象棋 PGN/FEN/EPD/POS 棋例文件...
棋例目录: /usr/share/games/xboard/samples/xiangqi/
* 1 xq_A.EPD_基本杀法_041.fen
* 2 xq_B.EPD_基本战术_048.fen
* 3 xq_C.EPD_中局杀法_153.fen
* 4 xq_D.EPD_象棋杀着大全_575.fen
* 5 xq_E.EPD_残局攻杀谱_114.fen
* 6 xq_engine-debug.fen
* 7 xq_F.EPD_象棋实用残局_第一集_300.fen
* 8 xq_FUNNY.EPD_趣味象棋_240.fen
* 9 xq_G.EPD_象棋实用残局_第二集_300.fen
* 10 xq_H.EPD_橘中秘_残局篇_137.fen
* 11 xq_I.EPD_适情雅趣_550.fen
* 12 xq_J.EPD_烂柯神机_249.fen
* 13 xq_K.EPD_象局汇存_100.fen
* 14 xq_L.EPD_江湖百局秘谱_100.fen
* 15 xq_sqyq_2009-551f.fen
* 16 xxq-shiQingYaQu_2009-551f.fen
* 17 xxq-shiQingYaQu_2009-551p.pgn
* 18 xxq-tianTianXQ-cg360f.fen
* 19 xxq-tianTianXQ-cg360p.pgn
----------------------------------

4. 加载指定的第几个(如第6个)棋例文件
xboard-xiangqi -sp 8 -lf
说明:第6个棋例文件 xq_engine-debug.fen ,收录了《适情雅趣》551局,以及
腾迅天天象棋----残局闯关360局,不能用 sjaakii 中国象棋引擎正常解出的
棋例(共145例)。可用于重点测试、修正其它中国象棋引擎的可靠性;
或用于新的中国象棋引擎的测试用例。

#### 九、Xboard 常见问题

1. 如果同时打开了多个 xboard 程序,这时如果用 pkill xboard 命令批量杀死 Xboard
程序,则下次运行 xboard 或者 xboard-xiangqi 时,可能会报错:无法读取XX文件,或者无
法识别的选项。

* 原因: 在用 pkill 命令批量杀死多个 xboard 程序时,可能会在配置文件的最后面,写入
错误的数据。如: xboard 中国象棋的个人配置文件 ~/.xboard-xiangqi-rc , 或者
xboard 的配置文件 ~/.xboardrc
* 解决: 删除个人配置文件最后面的错误数据;或者直接删除整个配置文件。

#### 十、WinBoard 中国象棋

* Xboard 移植到 Windows 操作系统后,叫做 WinBoard。

1. WinBoard 热门论坛 (英文版): http://www.open-aurec.com/wbforum/

2. Windows 操作系统下的中国象棋软件和引擎:
象棋百科全书网(中文): http://www.xqbase.com/resource.htm#downloads

3. WinBoard 中国象棋专用版介绍 (英文版):
http://home.hccnet.nl/h.g.muller/XQwinboard.html

* Winboard 4.6 中国象棋专用版
在网上搜索 winboard-XQ.exe 即可。参考下载地址:
http://hgm.nubati.net/WinBoard-XQ.exe
文件大小: 1.3 MB

对应的版本是早期的 WinBoard 4.6 版本 (程序界面为英文,不包含中文菜单翻译文件)。
这个版本自带中国象棋引擎“象眼 (EleEye) 3.1”, 棋力水平大约相当于腾迅天天象棋
“业5-业7”的水平。另外还自带了其它几种中国象棋引擎(包括“浅红”引擎)。

* Winboard 最新版为 4.8.0 (截止2020年3月)
在网上搜索, 或者在Windows电脑软件下载站点查找 WinBoard Portable 即可。
参考下载地址: https://portableapps.com/apps/games/winboard_portable
文件大小: 3 MB
程序发布日期: 2016-05-20
操作系统平台: Windows XP/Vista/7/8/10

这一版本自带有简体和繁体中文翻译文件,但默认菜单界面为英文。默认打开国际象棋
(chess),而不是中国象棋 (Xiangqi)。同样自带有中国象棋引擎“象眼 (EleEye) 3.1”和
其它几种中国象棋引擎(包括“浅红”引擎)。

#### 十一、码云特技

1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
kuiba
 
Posts: 7
Joined: 27 Mar 2020, 14:09

Re: play Xiangqi (Chinese chess) on Linux Xboard 4.9.1

Postby H.G.Muller » 05 Apr 2020, 13:02

I made no attempt to read all the Chinese, so perhaps some of what I am going to say has been said above already. But note the following:

* HaQiKi D is a closed-source Xiangqi engine stronger than the mentioned ones, and a Windows executable of it is available at http://home.hccnet.nl/h.g.muller/XQ.html .
* UCI2WB, which should also be available as Debian package, is an adapter that allows engines that use UCI-like protocols (such as UCCI) under WinBoard/XBoard.
* Elephant Eye is an open-source UCCI engine.
* Windows binaries of many other UCCI engines are available from http://www.xqbase.com .
User avatar
H.G.Muller
 
Posts: 3222
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: play Xiangqi (Chinese chess) on Linux Xboard 4.9.1

Postby kuiba » 10 Apr 2020, 05:40

H.G.Muller wrote:I made no attempt to read all the Chinese, so perhaps some of what I am going to say has been said above already. But note the following:

* HaQiKi D is a closed-source Xiangqi engine stronger than the mentioned ones, and a Windows executable of it is available at http://home.hccnet.nl/h.g.muller/XQ.html .
* UCI2WB, which should also be available as Debian package, is an adapter that allows engines that use UCI-like protocols (such as UCCI) under WinBoard/XBoard.
* Elephant Eye is an open-source UCCI engine.
* Windows binaries of many other UCCI engines are available from http://www.xqbase.com .


very thanks for your review frist!

I should say something:

* HaQiKi D, yes a good Xiangqi engine, I tested. But most of Xiangqi engines are UCCI, and less use UCI, and some others use WB or Polyglot adapter.
but in Linux, I test on Debian 10.3, found 3 Xboard Xiangqi engines only: Maxqi, hoixiangqi, sjaakii.
-- Is there a Linux version HaQiKi D ? I tried to find it, but don't known where to get it.

* UCI2WB can't work for Xiangqi UCCI engines, such as EleEye;

* EleEye has linux version, bin named eleeye_engine, but there's no Linux UCCI2WB bin for UCCI Xiangqi engines.

* I also made a WinBoard-XQ_4.8.0.zip for Windows, includes 20+ Xiangqi engines (which download from www.xqbase.com) and logos.
based on WinBoard-XQ 4.5.0 and Winboard 4.8.0.

URL for WinBoard-XQ_4.8.0:
viewtopic.php?f=2&t=54628

download from here:
https://sourceforge.net/projects/emacsl ... nboard-XQ/

best regards!
kuiba
 
Posts: 7
Joined: 27 Mar 2020, 14:09

Re: play Xiangqi (Chinese chess) on Linux Xboard 4.9.1

Postby H.G.Muller » 10 Apr 2020, 14:58

UCCI should be no problem for UCI2WB. Just run it with the option -x . (And for USI use -s .) In UCI mode (default) it even uses the Cyclone dialect of UCI when the variant is Xiangqi.

If XBoard is properly configured to automatically invoke UCI2WB, by running it once as

xboard -uxiAdapter {uci2wb -%variant "%fcp" "%fd"}

you can tick the UCCI/USI checkbox in the Load Engine dialog when you register the UCCI engine, and it should run without problems. (Well, cross your fingers... Many UCCI engines are quite non-compliant, and often do not respond to options they claim to have... Elephant Eye should be OK, though; it is the reference implementation of UCCI.)

HaQiKi D is not open source. I forgot whether I ever released a Linux binary for it. Perhaps I should.

[Edit] I actually did have HaQiKi D running on Linux (Ubuntu 10.04, 64-bit). I guess I did try out and generate the end-game tables there, many years ago. I uploaded the binary now to http://hgm.nubati.net/haqikid . I am not sure if it would also run on other Linux systems; usually one installs from source in Linux.
User avatar
H.G.Muller
 
Posts: 3222
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: play Xiangqi (Chinese chess) on Linux Xboard 4.9.1

Postby kuiba » 12 Apr 2020, 14:52

thanks a lot!

* the URL http://hgm.nubati.net/haqikid , I can't open it for Error 404. maybe is outdate, or some other reasons.

* I tried many times for Xiangqi UCCI engine EleEye 3.15 (engine output shows UXI2WB). some times, it works, but after 14 loops, the black stopped and not work any more. It happend 2 times with the same Errors:
UCI2WB: eleeye died on me

CMD:
Code: Select all
xboard -variant xiangqi -fcp eleeye -fUCCI -scp eleeye -sUCCI -autoLogo true -logoSize 100


and in most cases, the EleEye not work, with Error:
the second engine error ... broken pipe.

--------
maybe I need more debug.

Image
kuiba
 
Posts: 7
Joined: 27 Mar 2020, 14:09

Re: play Xiangqi (Chinese chess) on Linux Xboard 4.9.1

Postby H.G.Muller » 12 Apr 2020, 19:34

The message "Eleeye died on me" is given by UCI2WB when the engine process unexpectedly terminates (i.e. without having been send a 'quit' command). This should be considered an engine bug, as UCCI engines are not supposed to exit under any other circumstances. But sadly many engines can be made to crash by sending them non-compliant commands. I also discovered that many UCCI engines crash when you send them more than 100 moves in the position-moves command.

It seems at least that there is some success in running Elephant Eye through UCI2WB: your screen shot shows that you can set it thinking, and its output appears in the Engine Output window. To figure out exactly what goes wrong, it would be best to first make sure you have the most recent version of UCI2WB. Which can be obtained from the git repository at http://hgm.nubati.net/cgi-bin/gitweb.cgi (latest snapshot). Then you can configure XBoard to use UCI2WB in debug mode, through

xboard -uxiAdapter {uci2wb debug -%variant "%fcp" "%fd"}

This will cause it to report everything that was received from or sent to the UCCI engine also to the GUI. You can then run Elephant Eye under XBoard with the extra XBoard option -debug

xboard -variant xiangqi -fcp eleeye -fUCCI -scp eleeye -sUCCI -autoLogo true -logoSize 100 -debug

to have it create a log of everything sent to or received from the 'engine' (in this case UCI2WB) in the file xboard.debug in the current dierctory. And then, when a crash occur, post the last hundred or so lines from xboard.debug here, so that we can see what goes on just before the crash, and thus hopefully what causes it..

I tried to get Elephant Eye to run on Linux myself, but had some problems: Ubuntu 10.04 is not supported anymore, so I could not access any repositories. And I also cannot access the Debian website from that machine, because the FireFox complains there is no common encryption standard. I had Elephant Eye sources on that machine, but only for the Windows version.

Sorry about HaQiKi D. Turns out I uploaded the file to the wrong directory on my server. (The one below the public root.) Now I moved it to the server root, so the link should work now. There already was an older version in the server root, but it was gzipped (haqikid.gz).
User avatar
H.G.Muller
 
Posts: 3222
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: play Xiangqi (Chinese chess) on Linux Xboard 4.9.1

Postby kuiba » 13 Apr 2020, 23:42

* download EleEye Xiangqi UCCI engine Debian/Ubuntu DEB packages.
and the bin named /usr/games/eleeye_engine

package name:
eleeye_0.29.6-2.1_amd64.deb 05-Mar-2017 01:11 44K
eleeye_0.29.6-2.1_i386.deb

http://mirrors.163.com/debian/pool/main/g/gmchess/

* about haqikid Xiangqi engine for Linux

I download it from your URL
http://hgm.nubati.net/haqikid
It works. but only 1 loop, and then do nothing.

CMD:
xboard -variant xiangqi -fcp haqikid -scp haqikid

* here can download some Xiangqi logo (100x50, png), such as EleEye, HoiXiangqi...
https://sourceforge.net/projects/emacsl ... gqi/logos/

Image
kuiba
 
Posts: 7
Joined: 27 Mar 2020, 14:09

Re: play Xiangqi (Chinese chess) on Linux Xboard 4.9.1

Postby H.G.Muller » 18 Apr 2020, 12:32

I now installed a more-recent Ubuntu (18.04) on a VM. From there I could access the Debian website, and download the EleEye package you mention. It did not want to install through the software installer, though. That is, when I click 'Install', the command 'eleeye_engine' is still not recognized as a valid command from a terminal. By opening the .deb package with the archive manager I can look at the files inside, and it seems the engine is expected to go into /usr/games (which would be in my PATH). But no new files appear there.

So I extracted the eleeye_engine from the .deb package with the archive manager in my home directory. This seems to work. I could use it under XBoard + UCI2WB through the command

xboard -fcp ./eleeye_engine -fUCCI -variant xiangqi

Problem is that it doesn't have access to its book, so it starts thinking from move one, and it doesn't sensibly use its time. At 40 moves/5 min it thinks 1:25 on the first move, at 40 moves/min it thinks 30 sec. And in both cases it plays CxH, so I guess it badly needs the book. (But HaQiKi D suffers from that too; its own opening play badly sucks.)

I also downloaded the haqikid binary there. It is like you say: it only plays one move, and then it hangs. Problem seems to be that it does not recognize there is input when it is pondering, and thus keeps pondering forever. Apparently the system calls it uses to detect new input are not compatible with this Ubuntu version. I am not even sure they worked on Ubuntu 10.04 where I compiled it, as I only had it there to test its use of End-Game Tables, and I probably did not have ponder on when I did those tests. I will look into it. I do not use different system calls than in my other engine (e.g. in Fairy-Max to check for input during analysis), and perhaps recompiling on the system itself would already cure it.

With pondering switched off HaQiKi D worked fine. But if I play it against Elephant Eye at 40 moves/min, the latter uses up all its time for the first 2 moves, and then starts moving without thinking, which gets it checkmated in just a few moves.

[Edit] Some progress:

I can now confirm that pondering doesn't even work in in HaQiKi D in Ubuntu 10.04, or when I compile and run it on 18.04. Haven't found the cause yet.

The strange time usage of Elephant Eye was apparently caused by the time control: I was not really doing 40 moves/min as I thought, but 1-min sudden death. In this mode the no increment is sent with the 'go' command; this was only done for true incremental TC (inc != 0), as is common practice in UCI. But in UCCI the increment/oppincrement parameters are perhaps mandatory, and not 0 by default. When I switched XBoard to classical TC time usage became normal.

That Elephant Eye self-play games were hanging after a number of moves was due to a bug in the draw-handling of UCI2WB: it was looking for an incoming command 'offer draw' from the GUI, while in fact the command to offer a draw to the engine is plain 'draw'. So when the opponent Elephant Eye offered a draw, and this was relayed to the other engine through the 'draw' command, that command was not recognized by UCI2WB, and instead of being processed it was queued for sending to the engine, just in front of the incoming move, so that it was hiding the latter, so that the engine was set to ponder rather than to think on the next position.
User avatar
H.G.Muller
 
Posts: 3222
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: play Xiangqi (Chinese chess) on Linux Xboard 4.9.1

Postby H.G.Muller » 18 Apr 2020, 19:06

OK, I think everything should be fixed now. I must have had the source of a broken HaQiKi D version on Linux, as the ponder bug was caused by using the input buffer also for the ponder move, and that should never have worked on Windows either.

The fixed version of HaQiKi D is now uploaded to http://hgm.nubati.net/haqikid

The source code of a new version of UCI2WB can be obtained from my on-line repository at http://hgm.nubati.net/cgi-bin/gitweb.cgi . This should be able to run Elephant Eye now without problems at classical, incremental and sudden-death TC, and even allow it to agree a draw with itself!
User avatar
H.G.Muller
 
Posts: 3222
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: play Xiangqi (Chinese chess) on Linux Xboard 4.9.1

Postby kuiba » 20 Apr 2020, 06:52

# 2020-4-20, updated by Careone

#### file name:
/usr/share/games/plugins/xboard/eleeye_engine.eng

#### Content Sample:
plugin spec 0.0
uci2wb -x eleeye_engine
xiangqi

* 1. I made a new DEB package named 'haqikid', with the new bin haqikid. it works fine, but sometime it play strangely.
download: https://sourceforge.net/projects/emacsl ... i/haqikid/

I test Xiangqi engines on xboard 4.9.1, such as:
maxqi, hoixiangqi, sjaakii, eleeye_engine and haqikid.

engines from weak to powerful:
maxqi < hoixiangqi < (sjaakii, eleeye_engine and haqikid)

and in testing, haqikid wins sjaakii. but hoixiangqi wins haqikid...


* 2. I released a new DEB package for xboard-xiangqi, include many Xiangqi endgames, FEN and PGN.
package: xboard-xiangqi_4.9.1-7_all.deb
download: https://sourceforge.net/projects/emacsl ... 9.1-7_deb/

usage samples:
* cmd 1: xboard-xiangqi -sp
show all Xiangqi samples

output:
---------------
查看可用的 Xboard 中国象棋 PGN/FEN/EPD/POS 棋例文件...
棋例目录: /usr/share/games/xboard/samples/xiangqi/
1 xq_A.EPD_基本杀法_041.fen
2 xq_A.EPD_基本杀法_041.pgn
3 xq_B.EPD_基本战术_048.fen
4 xq_B.EPD_基本战术_048.pgn
5 xq_C.EPD_中局杀法_153.fen
6 xq_C.EPD_中局杀法_153.pgn
7 xq_D.EPD_象棋杀着大全_575.fen
8 xq_D.EPD_象棋杀着大全_575.pgn
9 xq_E.EPD_残局攻杀谱_114.fen
10 xq_E.EPD_残局攻杀谱_114.pgn
11 xq_F.EPD_象棋实用残局_第一集_300.fen
12 xq_F.EPD_象棋实用残局_第一集_300.pgn
13 xq_FUNNY.EPD_趣味象棋_240.fen
14 xq_FUNNY.EPD_趣味象棋_240.pgn
15 xq_G.EPD_象棋实用残局_第二集_300.fen
16 xq_G.EPD_象棋实用残局_第二集_300.pgn
17 xq_H.EPD_橘中秘_残局篇_137.fen
18 xq_H.EPD_橘中秘_残局篇_137.pgn
19 xq_I.EPD_适情雅趣_550.fen
20 xq_I.EPD_适情雅趣_550.pgn
21 xq_J.EPD_烂柯神机_249.fen
22 xq_J.EPD_烂柯神机_249.pgn
23 xq_K.EPD_象局汇存_100.fen
24 xq_K.EPD_象局汇存_100.pgn
25 xq_L.EPD_江湖百局秘谱_100.fen
26 xq_L.EPD_江湖百局秘谱_100.pgn
27 xq_sqyq_2009-551f.fen
28 xq_sqyq_2009-551f.pgn
29 xxq-endgame-top10-十大残局.pgn
30 xxq_engine-debug.pgn
31 xxq-shiQingYaQu_2009-551f.fen
32 xxq-shiQingYaQu_2009-551p.pgn
33 xxq-tianTianXQ-cg360f.fen
34 xxq-tianTianXQ-cg360p.pgn
-----

* cmd 2: xboard-xiangqi -sp 29 -lg
load PGN of sample file ID 29

* cmd 3: xboard-xiangqi -sp 29 -lg 13
load PGN of sample file ID 29, FEN id 13
(white/Red has 2 cannon only, and checkmates Black full 16 piece)

* cmd 4: xboard-xiangqi -s 60
play with piece size 60x60 (default is 49x49)

* cmd 5: xboard-xiangqi -e haqikid
play with Xiangqi engine haqikid (1# and 2#)

* cmd 6: xboard-xiangqi -ee
play with Xiangqi engine eleeye_engine (1# and 2#)

-------

* 3. about latest uci2wb
on my Debian 10.3 amd64, uci2wb is v4.0,
package name: uci2wb_4.0-1_amd64.deb (by 'apt-get install uci2wb')

and I download DEB from Debian mirror pool/ a newer version is:
uci2wb_4.0-1+b1_amd64.deb, such as in URL
https://mirrors.huaweicloud.com/debian/ ... /u/uci2wb/

** 1# (debian 10.3) uci2wb_4.0-1_amd64.deb 27.4 KiB 2018-Dec-16 19:51

** 2# (debian sid) uci2wb_4.0-1+b1_amd64.deb 27.7 KiB 2019-Aug-08 00:41

** 3# (source) uci2wb_4.0.orig.tar.gz 29.4 KiB 2018-Dec-16 19:51

--

I installed the 2# uci2wb, and eleeye engine sometimes report the same bug (UCI2WB died on me)


** 4# I checked changelog and timestamp on URL http://hgm.nubati.net/cgi-bin/gitweb.cgi,
and I will try the latest uci2wb later soon.

======

best regards!
kuiba
 
Posts: 7
Joined: 27 Mar 2020, 14:09

Re: play Xiangqi (Chinese chess) on Linux Xboard 4.9.1

Postby kuiba » 20 Apr 2020, 07:34

I tired the new uci2wb v4.1, 2020-4-18 updated, found some bugs:

./uci2wb -v
UCI2WB 4.1 by H.G.Muller

./uci2wb --help
I2WB [debug] [-s] <engine.exe> [<engine directory>]
(miss: UC)

./uci2wb -h
usage is: UHI2WB [debug] [-s] <engine.exe> [<engine directory>]
U(H)I2WB ?

./uci2wb
usage is: UI2WB [debug] [-s] <engine.exe> [<engine directory>]
(miss: C)
------
maybe the variant %c sometimes are missing (var not defined)

--
(related lines in: 387, 388,755

U%cI2WB

$ grep -n --color=auto 'U%cI2WB' UCI2WB.c

output:
------
387: if(sscanf(line, "id name %[^\n]", name) == 1) printf("feature myname=\"%s (U%cI2WB)\"\n", name, sc-32);
388: if(sscanf(line, "id version %[^\n]", version) == 1 && *name) printf("feature myname=\"%s %s (U%cI2WB)\"\n", name, version, sc-32);
755: if(argc < 2) { printf("usage is: U%cI2WB [debug] [-s] <engine.exe> [<engine directory>]\n", sc-32); exit(-1); }
-----
kuiba
 
Posts: 7
Joined: 27 Mar 2020, 14:09

Re: play Xiangqi (Chinese chess) on Linux Xboard 4.9.1

Postby H.G.Muller » 20 Apr 2020, 08:35

Indeed, having the variable second character depending on protocol is intentional in the 'myname' feature (so that it will be obvious in which mode the adapter is running). But is is a bad idea to also do that in the error/help message. This should just print argv[0], which is the name that was actually used to invoke the command. And the message is obsolete anyway; it should say [-s|-x|-c] now it can also do UCCI.
User avatar
H.G.Muller
 
Posts: 3222
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 3 guests