Tuesday, November 27, 2007

UBB interface in 东萍棋谱仓库

This thread contains a long discussion of rook-cannon endgame. I think it is interesting. The main author uses UBB interface, which has become very popular Chinese chess board presentation in forum discussion. It was developed mainly to aid the Chinese chess databases hold in 东萍棋谱仓库.

There are a couple of functions in the UBB interface interest me a lot. First of all, this interface has a button link directly to the Chinese chess endgame databases query system. If the board position is available in my databases, it will automatically generate a page with the query string. That is a very neat feature. So far, it works well except the position sequence with black to move first. I have been trying to contact the author of UBB to fix it without success. If you know the author, maybe you can tell him/her to contact me by email.

To link to EGDB, click on right lower corner 棋谱搜索 button, then click on 搜索当前残局解法. It will bring you to the right page. Sometimes, it will be in background window, so look for which window it brings the page up.

Another way to use this UBB interface is to arrange piece on the board and then look for the position in EGDB so you don't have to input fen string yourself. You can also copy fen string from other program and look up the position in EGDB. To use it, click on 导出导入 button. For endgame, click on 清空棋盘 then move the piece to your intended position. Look for more pieces on 添加棋子. After you are done with arrangement, click on 将左侧局面设为开始. After this step, follow the method in previous paragraph to find the corresponding EGDB position. In the same 导出导入 screen, you can find way to paste in fen string.

There are many preset positions copied from ancient books that you may find interesting. If you like the service there, you can show your support by registering as higher-class user.

Have fun!

Monday, November 26, 2007

Western chess endgame website

There is a very good western chess endgame databases query website available here:


If you are capable of writing this kind of utility, I will be happy to hear from you so we can also have this nice interface available.

Sunday, November 25, 2007

Original poem

I feel the title of previous post is very suitable for endgame databases, so I spend some time to do a google search. Here is the whole poem.




Wednesday, November 21, 2007

獨翻舊局辨錯著 冷笑古人心許誰

Accidentally, I found a article in 【PChome電腦家庭雜誌】which introduce Chinese Chess Endgame Databases Query System. There is explanation in Chinese chess move notation. Should be a good read.


Long ago, meifire wrote a article called 神機妙算 in 東萍象棋網絡雜誌第八期, where he introduced me and the inception of EGDB. It should be a interesting read if you are interested in EGDB.

Monday, November 19, 2007

Total endgames as of today (2007/11/19)

I have completed this stage of server update. As of today, there are total 1,334 endgame databases available. Currently, it is filling up my third hard disk and growing. More and more, it is harder to add new endgame databases as each one that has not been done is rather big and will take long time to construct. While I am building more that I think are more interesting, I always welcome the suggestions. If you see some endgame missing that you really want to see, please leave a comment here. You will see it sooner. Please limit total attacking pieces under four.

Updated databases

I have been building new databases since 2003. The indefinite chasing bug was fixed later so all the databases were re-constructed with new algorithm. Since then, new databases were added periodically. Due to the expansion of databases, my server can no longer host the full set of databases as it only has two USB ports for my USB hard disks. Recently, I obtained a old PC that has 6 usable USB ports, so I have put all the databases I have so far into the server. If you check the database list and look for the built date. Anything built in 2007 should be the new addition. There are some databases having quite long line. Here are some examples:

Thank cck for Java Chessboard

krcbkree 硨炮仕--車象象 175

Thank cck for Java Chessboard

You can look for more examples. Enjoy!

Friday, November 16, 2007


For people who wonder why the "lpforth.forthfreak.net" domain name, here is the explanation.

The Chinese Endgame Databases Project started when I wanted to write a Chinese chess program to beat some of my friends. Naturally, I use my most proficient programming language "Forth" to write the program. Forth is a peculiar language that some people just grow inert in using it after they obtain the ability. I am one of them. Over the years, I even wrote a couple of compilers for it. One runs under Linux environment (lpforth), the other runs under Palm OS (ppforth). lpforth actually stands for "Linux pForth", and not something else. ppforth stands for "Palm pForth". When I first had my EGDB server running, I had an IP address as web address. One of the Forthers, Lothar Schmidt, saw it and provided me with "lpforth.forthfreak.net" domain name free of charge. My thanks to Mr. Schmidt.


Four posts down and I have not listed the link to the content page. Here it is:


This link should also present in my profile. There are traditional Chinese version as well as English version. I figure the people who can read simplified Chinese should also be able to read traditional Chinese. As for English reader, the Chinese name for the pieces should not be the problem. If there is one, I welcome you post comment or leave me email.

EGDB and Engine

An interesting discussion in AI-Master regarding endgame use in Chinese chess engine.

Some history regarding indefinite chasing

When I first have EGDB available over internet, I was not sure if it was correct. I basically followed Haw-ren Fang's paper (Haw-ren Fang, Tsan-sheng Hsu and Shun-chin Hsu. "Indefinite Sequence of Moves in Chinese Chess Endgames", Proc. 3rd International Conference on Computers and Games (CG), to appear in a Springer-Verlag LNCS volume, 2002.) and hoped it would be correct. I didn't know if anyone will actually look into the databases. I was surprised to find out "meifire" asked in AI-Master forum if my server was still up while it was temperately off-line. He later found mistakes in positions pertain to indefinite chasing. He even went into length in explaining how to view Asian rules in a simplified way, which prompt me to modify the code so it could generate correct databases. I constructed all the EGDB again with the new algorithm and posted the databases again. This time, meifire didn't find indefinite chasing error until one day he raised a position here.

Thank cck for Java Chessboard

Click here to see the position in EGDB.

It lead to a interesting discussion and an unexpected conclusion. I thought it is a significant history of EGDB. :-)

Initial plan for this blog

Ok! The first blog post went smoothly, so I can safely write more now. My plan for this blog is to add some quick and current informations relevant to the Chinese Chess Endgame Databases (EGDB). Examples are:

1. announcing the newly constructed endgame databases
2. posting links to discussions that are related to EGDB
3. posting interesting positions that EGDB plays interesting role
4. random thoughts on EGDB
5. any things pertain to EGDB
6. some thoughts on Chinese chess programming

In the meantime, I welcome anyone adding any kind of comments related or not related to EGDB.

The plan may morph any time. The goal is for everyone to enjoy this space.

Blog opening

I have set up this blog to add some current informations regarding the Chinese Chess Endgame Databases. I have plan to upgrade the server recently. Hopefully, some bigger databases that I have can now be also available to everyone through cgi interface.