meifire 其實對殘局庫的瞭解已經很透徹了。很多地方也解釋得比我清楚,所以我就從他的回答基礎上,再加說明。
meifire:
"order的含义在残局库的主页上有说明.我理解是:在当前局面前往被吃子的局面的途中,还要经过多少次弱势方可以长将或长捉的局面.
由此得到的几点推论:
對於只有一方有攻擊子的盤面,Order 都是 0,因为弱方无法长捉或长将
在order是正数时,value的值表示距离下一个弱势方可以长将或长捉的局面的着数.
当order 是正数,value为0时,弱势方的推荐着法都会造成长将或长捉对方,当弱势方被迫变着时,order就会减少(感觉似乎应该是减1,但我发现过例子是减很多的),而value重新变为正值,开始前往下一个长将或长捉局面,直到order为0,value也为0,则是到达吃子局面."
___________
meifire 的解釋清楚而正確。對order不見得只減1的觀察也是正確的。order會逐漸變小,通常在換捉不同子時,減的數目較可能會大於1。
關於看起來像是錯的推薦走法,我己經被問很多次了。不少人因此而認為殘局庫的結論是錯的。我一直想解釋清楚,但一直沒有用中文做過。一樣,我們從meifire的說明開始:
meifire:
残局库推荐着法首先当然是看结果,如果一种走法的结果为和,另一种为胜,当然选可胜的;
其次看哪种着法可以最快的吃子,不单独考虑"将死"和"欠行",因为残局库认为出现这些情况后,就是一方被迫送吃自己的将/帅,包含在"吃子"这种情况里了.而在考虑吃子时也不会优先考虑将/帅被吃的情况.
~~~~~~~~
會有看似錯誤的推薦走法,最主要根源於我最原先的一個設計決定。殘局庫可以記錄到吃將軍的步數(distance to mate, DTM),或是到吃任何一子,而進入子殘局庫的步數 (distance to conversion,DTC)。
在考慮過象棋的特性,以及殘局庫製造的效率,我最後選擇了 DTC。原因如下:
1. 由於象棋有長將及長捉的規定, DTM 似乎不太能夠成立。每次長將或長捉應算幾步?
2. DTC 在程式的運行上有較高的效率。
然而在選擇 DTC 後,便帶來了一些人觀察到的不自然現象。由於吃子勝和將死被視為同等,所以會有推薦走法出現一步殺的情形。在沒有更好的方法前,我只能選取我覺得最好的方法。
Friday, February 22, 2008
Thursday, January 31, 2008
WMWifiRouter
WMWifiRouter
What is this to do with EGDB? You will ask. To be able to access my EGDB website through iPhone, I used an O2 Windows Mobile phone as interface to the 3G mobile network. The way I introduced in previous blog will work well, but it suffered from one drawback. The connect will drop out every 5 to 10 minutes. It is quite annoying if you want to use it for a long time. I came across WMWifiRouter the other day, and found it to be a excellent program for this purpose. It keep the connect on and you can even turn off the screen. My O2 can last for about 1 hour continuous use. I once even used it inside a car running on the highway without problem and disconnection. You can try it out. Here is another review which give high mark to the program. The main page may be down sometimes. You may have to try often.Friday, December 28, 2007
Safari in iPhone
The bigtext version of EGDB query system is usable now over Safari for iPhone. Some improvements are wanted. However, it is usable for now.
Thursday, December 27, 2007
3G iPhone
iPhone? What is the relationship between EGDB and iPhone? Since the day I had EGDB posted on the net, I always want to be able to access EGDB anywhere I want, which could be the park people playing Chinese chess. I have a Palm Treo 650 connecting to a 3G phone just to do that (among other things). Being able to connect to internet anywhere has a special appeal to me for a long time. The Treo interface is not so great when compared to iPhone. What if I can have a iPhone with 3G connection? It will be great. I didn't know a way to achieve that until one day I saw the following article:
http://www.pyrofersprojects.com/3gipod/3gipod.html
It described exactly what I want before Apple starts to sell 3G iPhone. Immediately, I tried out the idea in Apple store and prove it works as expect. I then bought a iPhone, and a XDA O2 atom as my 3G/3.5G modem. The combination works wonderfully. Now I can access my EGDB anywhere I want with good speed and good interface as long as there is 3G service available, which is pretty ubiquitous here.
I am pretty happy to have the combination. Saying that, there are still some rooms for improvement.
1. Of course, if there is true 3G/3.5G iPhone then I don't have to carry another phone as modem, it will be much better. For this, we have to wait for Apple.
2. XDA O2 atom runs out of battery really fast when both data connection and WiFi are on.
3. Safari refuses to run my big text interface as I intend it to be and no Java is available for it. I now stick to small text interface. Let me see if I can fix big text version from my cgi script.
If you also use iPhone to access EGDB, welcome you to leave your comments here.
http://www.pyrofersprojects.com/3gipod/3gipod.html
It described exactly what I want before Apple starts to sell 3G iPhone. Immediately, I tried out the idea in Apple store and prove it works as expect. I then bought a iPhone, and a XDA O2 atom as my 3G/3.5G modem. The combination works wonderfully. Now I can access my EGDB anywhere I want with good speed and good interface as long as there is 3G service available, which is pretty ubiquitous here.
I am pretty happy to have the combination. Saying that, there are still some rooms for improvement.
1. Of course, if there is true 3G/3.5G iPhone then I don't have to carry another phone as modem, it will be much better. For this, we have to wait for Apple.
2. XDA O2 atom runs out of battery really fast when both data connection and WiFi are on.
3. Safari refuses to run my big text interface as I intend it to be and no Java is available for it. I now stick to small text interface. Let me see if I can fix big text version from my cgi script.
If you also use iPhone to access EGDB, welcome you to leave your comments here.
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
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 东萍棋谱仓库.
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 东萍棋谱仓库.
Subscribe to:
Posts (Atom)