Opening Book
Posted: 28 Apr 2006, 20:11
Hello,
I'm new to this forum. My name is Bernd, I'm a CS student and I am in computer chess since roughly two years now working on a Java engine called King's'Out which I rewrote several times
Now to my question(s).
(1)
I want to include an opening book. I already asked at CCC and got the answer that there is no standard for opening book file formats.. nethertheless I would be glad if someone could briefly explain how to organize such a file.. after browsing some sources, messages, I consider to store hash keys (sorted) together with the moves into a file and do a binary search for each position while in book. Is this a common way to do it? Are there better ways? Are there at least some formats some programs share?
(2)
As I'm not good at chess, I do not plan to make up a book manually. I want to generate one form a PGN file. Could someone just give me some general ideas about that. How many plies are common? Should some lines be longer than others? What can I do with the information about who won the game/is it used? Are moves always chosen by the frequence they are played at a certain position?...
(3)
From the starting position you are "in book". That means I try to lookup a book move for each position encountered and will do *no* search.. until a position with no book move is found. Upon then I am out of book and will not try to lookup book moves. Is this o.k. or are there better ways to handle openings...
Thanks much in advance for your answers...
Greetings,
Bernd
I'm new to this forum. My name is Bernd, I'm a CS student and I am in computer chess since roughly two years now working on a Java engine called King's'Out which I rewrote several times
Now to my question(s).
(1)
I want to include an opening book. I already asked at CCC and got the answer that there is no standard for opening book file formats.. nethertheless I would be glad if someone could briefly explain how to organize such a file.. after browsing some sources, messages, I consider to store hash keys (sorted) together with the moves into a file and do a binary search for each position while in book. Is this a common way to do it? Are there better ways? Are there at least some formats some programs share?
(2)
As I'm not good at chess, I do not plan to make up a book manually. I want to generate one form a PGN file. Could someone just give me some general ideas about that. How many plies are common? Should some lines be longer than others? What can I do with the information about who won the game/is it used? Are moves always chosen by the frequence they are played at a certain position?...
(3)
From the starting position you are "in book". That means I try to lookup a book move for each position encountered and will do *no* search.. until a position with no book move is found. Upon then I am out of book and will not try to lookup book moves. Is this o.k. or are there better ways to handle openings...
Thanks much in advance for your answers...
Greetings,
Bernd