janggi-korea wrote:My book has movements connected by lines and movements not connected. There aren't many locations for line that are not connected. Do not worry.
For the unconnected lines, would it be enough to do a look-head of one move to find them? That should still be feasible.
BTW, I did the 'sort' and 'uniq' now on the book data, and this leaves me with 292 moves. I was wrong about the original number of moves: the book was 8192 bytes, which is only 511 moves (as each move occupies 16 bytes, and there is one dummy entry to identify the end of the book). That means quite a few moves got lost in the process. I suspect these are the disconnected lines.
In "view or edit game file" mode, you cannot see the initial starting position. When I loaded the engine again in play mode, I was able to see the first move book edit.
By "not see" you mean the moves for it in the Edit Book window? I do see those (even for the starting position) with the WinBoard version that does the Pawn -> Marshall substitution. But in general the issue is not in which mode you start, but whether the engine (when you start it with an engine) succeeds in altering some of the game paramenters (such as switching back the parent variant to xiangqi, or replace the Pawns by Marshalls).
BTW, I noticed that I also need a second substitution to be able to read your original book, namely the King. In Xiangqi I use a different symbol for that, because the royal piece there does not move as a King in Chess, but as a the piece known as a Wazir. So WinBoard uses its Wazir symbol for it. When I implemented Janggi as a standard variant, I just copied this from the Xiangqi implementation. But now that I think about it, there isn't really any need for this. The board topology in the Palace for Janggi is irregular, so you cannot say that a piece has a certain move, and in the center and corners it actually does move like a King in Chess (confined to the Palace). So I wonder if it would not be better to switch back to using the conventional King symbol for Janggi.
The pgn sample file I gave you was made by manual(hand) work. It is the movement record of the "human janggi masters". before, I made about 30,000 games of PGN files. i will use this to test further. However, since it is the symbol and FEN value of the existing xiangqi variant, it will have to be converted back to the current janggi variant.
By using WinBoard with the additional option -pieceNickNames ".N....B..n....b." it should be able to recognize games with FENs that use the old notation.
I have some questions.
1. What does {??/??} mean? In other words, does that mean 41 victorious moves in 60 games? In some cases, the number at the end is higher.
53.2% 41 ih3 {41/60}
13.0% 10 Hc2 {10/16}
6.5% 5 ab3 {5/13}
27.3% 21 Hg2 {21/33}
0.0% 0 ed3 {0/1}
The 'official' meaning of those numbers in a Polyglot book is the 'learn information': number of times the move was played, and number of half-points scored with it. Polyglot books store 3 16-bit numeric items for each move, the weight, and this learn info. Normally books are created with the learn info at 0. Engines that use the book can keep record of the success they had with each opening, and thus learn which openings do not suit them, and then later avoid those. WinBoard does not implement such 'book learning', because the book there is meant for use with many different engines. So the learn fields are just ignored.
In the automatic book creation I use these fields to store the number of draws and losses (or something like that). This to allow the creation to be continued by adding more games. The weight of the moves is nrOfDraws + 2*nrOfWins, and doesn't allow full reconstruction of the W/D/L info (which is needed when constructing a book through 'Monte-Carlo book mode').
2. How do we solve the left-right symmetric coordinate problem to increase efficiency?
(Essentially, the horizontal symmetry is the same moving coordinate, and it is classified separately in the pgn file. Depending on the characteristics of the people, the starting position is the content played by selecting left-right.
However, it would be better to enter the same in the book espectively.) To avoid repeating book making twice.
Indeed, I see the problem. WinBoard doesn't have any special feature for this. Until now the only variant where such symmetry exists was Xiangqi; western variants tend to be asymmetric because of King/Queen placement or castling, most Shogi variants are asymmetric. I didn't think it was worth it to put in a feature that would be needed so rarely, and when I made a Xiangqi book I just did duplicate the book.
It should not be very difficult to add some code that would probe the book for the mirrorred position (and reflect the retrieved move) if the first probe failed. The problem is more to decide when this should be done. If I make it dependent on the (parent) variant being Xiangqi or Janggi, it would interfere with the use of asymmetric engine-defined variants that use Xiangqi or Janggi as a parent. So perhaps this feature should be switched on only explicitly by the user through a WinBoard option (e.g. -symBook).
3. Is there a way to combine the existing book with the currently created book? (bin+bin=stronger bin)
Chess has many "pgn tools" to help with this. But there is no janggi currently, and I don't know how.
Polyglot can 'merge' books. Normally Polyglot only understands orthodox Chess, but I don't think it tries to interpret the meaning of the move field when merging books. (It would be impossible to translate the hash key back to a position, so it has no clue about the position anyway.) So the merge function of it could be used to combine books for any variant.
Memo: If i currently make a book with pgn, it is just the probability of movement of human masters, but the book I gave you is a book that I analyzed by referring to it. Sometimes the engine movement is more efficient than human movement, and human movement is thought to be overvalued.
Beware that I discovered a problem with PGN games saved from WinBoard: it is not always able to read those back. In Janggi it can happen that two Pawns are able to move to the same square, and then giving only the target square is ambiguous. So the notation needs to use an extra 'disambiguator', like ab3 or cb3. This problem of course existed in Xiangqi as well, and WinBoard does properly disambiguate Pawn moves there. But only when they are across the River. For Janggi it would have to do it everywhere. I still have to fix that.