mohzus wrote:However, I do not really know how to add the games to the book. What I did was opening the .pgn of the 2 games, manually go through each game up to the very last move and then select "File >> Save Game as book", twice for each game. If I don't go through the games I get that there are no games to add to the book. I repeated the process 2 or 3 times so I might have saved 6 times the 2 games in the .bin file.
There should be no need to go through the games. Save Games to Book is a 'batch command' that processes all the files in the game list. I didn't go through any games, and I did get a non-empty book. I did duplicate the games with an editor first, though, in the PGN file, before loading it in WinBoard.
But I think using the original file with each game appearing once should also work, if you just load the PGN, and select Save Games to Book 3 times. (The second time it will refuse the command, because the book already exists from the first time, and requests you to do it again (i.e. a third time) if you really want to overwrite, I added this as a safety measure, to prevent someone hitting the menu item by accident from overwriting a valuable book.)
The problem is that I cannot open the .bin with xboard (when I do this, it sets up a strange position with white pawns only on some squares of the board and there are no moves, no games) to examine how many lines I added.
What do you mean, "open the book"? Are you trying to use Load Game on it? That would never work; Load Game is a command for PGN game files, not for books, Bin books are not in PGN format, and in fact contain no games at all, as I already mentioned.
If I added too many, I'd like to delete some because later I plan to add new lines and they won't be selected with the same priority than the most numerous lines I suppose.
You can check with Edit Book. Just go to a position that should be in the book (e.g. by loading one of the games on which you based it, and playing through it with the Edit Book window open). You will see the list of moves for the position, together with their weights. The weights will tell you the number of games the move occurred in succesfully.
The fact that I cannot examine the .bin book is a problem for me. I tried to open it with scidvspc too but no position would appear, as if the book was invalid (while it is not since engines can use it without problems).
Bin books cannot be examined. When I said they contain (position, move) pairs, i should have mentioned that the position is actually encoded as a 64-bit hash key. This cannot be decoded into a position. Not even in theory, as many positions would map to the same key. (There are much more than 2^64 Chess positions). And certainly not in practice, as it could only be done by random search, which would take millions of years. If SCID can display books for normal Chess it must use a trick: it probably guesses which positions might be in the book, and then probes for their hash key in the book. And the only way to guess is by starting from the opening position, to see if it is in the book, and for every position that is in the book, generate the daughter positions, and check if they are in the book. But of course it would not find any positions from wild5 that way. It only would if it started guessing from the wild5 opening position, which it probably doesn't (and probably cannot be made to do.)
I also plan to merge the book.bin with another .bin book used for normal chess. So that when I let the engine on FICS, it will use a single book able to handle both normal chess and the wild 5 variant.
That should be possible, even with Polyglot. Because the book is non-decodable, Polyglot could never know that it is a variant book, and should merge it like any other. In XBoard you could only do it if you had the PGN you based the normal Chess book on. Then you could use the Save Games to Book for that, and then open the wild5 file, and do it again to add it. I guess I could make an "Import Book" command to load an existing book into the memory buffer, or even add it to it, so that you could merge books with XBoard as well. But Polyglot should do it fine. (At least for variants that would not have unusual move encoding, e.g. because the board is not 8x8. Otherwise it might become pedantic even during merge.)