Showing posts with label Endgame. Show all posts
Showing posts with label Endgame. Show all posts

Tuesday, July 27, 2010

Endgames with DTC value greater than 240

In my previous version of program, I used one byte for storing DTC (distance to conversion) value. The biggest number allowed was 240. I used number greater than 240 for house keeping purpose. At that time, I was hoping there would not be DTC value too big and planned on solving it only when it is necessary. It is necessary! When I was building krn*kr* endgames, there were a few endgames exceeding this limit. I have done the changes to the code and solved the problem, but I didn't have their corresponding statistic pages until today. In the rook endgame list, you should be able to find:

krnbkrbb
krnekrbe
krnekre

These three endgame databases have DTC value greater than 240. The krnbkrbb endgame even has order upto 81 -- the biggest I have ever seen. You can enjoy them through the autoplay function of interactive Javascript board. It's mind boggling to me, and I could not understand them at all. :-) However, you are welcome to study it and post your comments.

Saturday, December 8, 2007

A bug or not?

In the previous post, Michael mentioned in the comment stating the EGDB is good except a bug related to indefinite checking and chasing. I will take this chance to explain the situation. Chinese chess is different from western chess in interpreting indefinite checking/chasing. In western chess, three-fold repetitions lead to a draw. However, the win/draw/loss condition is depending on the context of checking/chasing in Chinese chess. The best solution I can come up so far is to treat indefinite checking/chasing as seed positions with win/draw/loss status based on Asian rules. Retrograde analysis was then used from this point on. This method lead to some problems (or bugs in some people's mind). First of all, distance to mate is hard to define if indefinite checking/chasing is involved. How many moves will you count when the losing side repetitive checks several times then moves to an inferior position? Since I could not solve this problem, I define the indefinite checking/chasing positions as seed positions with order. They are treated as final positions if the losing side refuses to change the pattern and is declared loss. In this case, this is the terminal node. However, if the losing side finally decide to move to inferior position with lesser order, there are more moves to be played. Take the first position raised by Michael as example, 硨七進三 keeps the following positions in the order 0. By keeping the positions in order 0, final win is ensured with certain depth. However, 硨七進二 will force positions to order 1, then drop back to order 0. We don't know for sure it is a longer sequence or shorter one. My current strategy is to keep it in lower order. As for the second position, moving red pawn left and right will force black knight to indefinitely chasing, so it has to move out of pattern or lose immediately. However, keep moving red pawn left will also force black knight to break out chasing pattern. These are two different ways to win. I propose a way for sure win. However, it may not be the shortest win due to the indefinite checking/chasing condition. To some people, it is not "perfect" in the sense it is not aesthetic to their point of view. To me, it is a practical way to solve indefinite checking/chasing situation with perfect win/draw/loss information. I don't have better solution so far. Is it a bug? To me, it is just a practical solution given the problem set. It's not a bug to me. :-)

Thursday, December 6, 2007

马兵残局 -- 马底兵能否必胜单士象?

马兵残局 is a interesting and difficult endgame. 马底兵vs单士象 is especially interesting. It was said to be a win pattern in some places, and draw pattern in other places. If you look 马兵残局 up at 东萍棋谱仓库, you will see 5 positions are said to be draw. These positions are copied from endgame book. However, if you look up these positions from EGDB, you will see they are all win positions. According to the statistics page of EGDB, 马兵vs单士象 is win for red, even it is 马底兵vs单士象. The following links are some posts pertain to this topic.

http://www.gdchess.com/bbs/dispbbs.asp?boardID=4&ID=15695&page=1
http://www.hgchess.com/bbs/dispbbs.asp?boardID=48&ID=12991&page=1
http://www.gdchess.com/bbs/dispbbs.asp?boardid=4&replyid=28709&id=16560&page=1&skin=0&Star=1

Here is another link that concludes knight-bottom pawn side will win.

http://www.zgxqds.com/zixun_info.asp?id=99

Sunday, December 2, 2007

The endgame play in Movesky

I was fortunate to meet the author of 东萍棋谱仓库 over MSN last night. He offered me a VIP account in his database. I finally can check the so called 顶尖对局 in the database. The games are played in the highest level of Movesky with 30-minutes time control. I have checked with some endgame play to see in this over-the-board plays, how often do these top players, some with computer assistance, miss the winning or drawing move?

In the case of knpkpbb endgame, there are 12 incidents in the 顶尖对局 database. There are 3 wins and 3 draws hold, which means the outcome of the games matches the calculation of EGDB. In other word, the players didn't make blunder. In other 6 games, there are 5 missed win and 1 missed draw, which means the moving side missed the chance to win or to draw. These are 50% of improving space. I wonder if people study EGDB more, these kind of misses will be reduced.

With the method I mention in the previous post, this kind of survey became relative easy. If you find this to be useful, you may want to consider registering a VIP account from 东萍棋谱仓库.

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:

http://www.k4it.de/index.php?topic=egtb&lang=en

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.

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

The PAGE

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

http://lpforth.forthfreak.net/endgame.html

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.